You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/11/10 22:39:08 UTC
[01/50] [abbrv] incubator-mynewt-core git commit: newtmgr - increase
hdr-len to account for err code
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/master 7aee85161 -> 8694d49e8
newtmgr - increase hdr-len to account for err code
This addresses a bug in transmission of newtmgr error responses. For
outgoing error responses, the header always indicated a length of 0.
The fix is to adjust the header's length to account for the error code
field.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c694835e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c694835e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c694835e
Branch: refs/heads/master
Commit: c694835ef8cca79f672263582d563ad3e393823a
Parents: 290c683
Author: Christopher Collins <cc...@apache.org>
Authored: Sat Nov 5 12:10:00 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Sat Nov 5 12:10:00 2016 -0700
----------------------------------------------------------------------
mgmt/newtmgr/src/newtmgr.c | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c694835e/mgmt/newtmgr/src/newtmgr.c
----------------------------------------------------------------------
diff --git a/mgmt/newtmgr/src/newtmgr.c b/mgmt/newtmgr/src/newtmgr.c
index f54d552..bd7474d 100644
--- a/mgmt/newtmgr/src/newtmgr.c
+++ b/mgmt/newtmgr/src/newtmgr.c
@@ -100,7 +100,11 @@ nmgr_send_err_rsp(struct nmgr_transport *nt, struct os_mbuf *m,
if (!hdr) {
return;
}
+
mgmt_cbuf_setoerr(&nmgr_task_cbuf.n_b, rc);
+ hdr->nh_len +=
+ cbor_encode_bytes_written(&nmgr_task_cbuf.n_b.encoder);
+
hdr->nh_len = htons(hdr->nh_len);
hdr->nh_flags = NMGR_F_CBOR_RSP_COMPLETE;
nt->nt_output(nt, nmgr_task_cbuf.n_out_m);
[32/50] [abbrv] incubator-mynewt-core git commit: MYNEWT-475: BSP
cleanup
Posted by cc...@apache.org.
MYNEWT-475: BSP cleanup
Modification of stm32f4 linker scripts and bsp.yml files.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c61985b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c61985b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c61985b3
Branch: refs/heads/master
Commit: c61985b33baed5125acecdd5802e8c3e358ec944
Parents: 0c51338
Author: William San Filippo <wi...@runtime.io>
Authored: Wed Nov 9 09:07:24 2016 -0800
Committer: William San Filippo <wi...@runtime.io>
Committed: Wed Nov 9 09:08:08 2016 -0800
----------------------------------------------------------------------
hw/bsp/nucleo-f401re/boot-nucleo-f401re.ld | 172 +---------------
hw/bsp/nucleo-f401re/bsp.yml | 8 +-
hw/bsp/nucleo-f401re/nucleo-f401re.ld | 188 +-----------------
.../boot-olimex_stm32-e407_devboard.ld | 181 +----------------
hw/bsp/olimex_stm32-e407_devboard/bsp.yml | 8 +-
.../olimex_stm32-e407_devboard.ld | 190 +-----------------
.../stm32f4discovery/boot-stm32f4discovery.ld | 181 +----------------
hw/bsp/stm32f4discovery/bsp.yml | 8 +-
hw/bsp/stm32f4discovery/stm32f4discovery.ld | 190 +-----------------
hw/mcu/stm/stm32f4xx/stm32f401.ld | 199 +++++++++++++++++++
hw/mcu/stm/stm32f4xx/stm32f407.ld | 3 +
11 files changed, 244 insertions(+), 1084 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/nucleo-f401re/boot-nucleo-f401re.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nucleo-f401re/boot-nucleo-f401re.ld b/hw/bsp/nucleo-f401re/boot-nucleo-f401re.ld
index 1e476de..aaff5b8 100644
--- a/hw/bsp/nucleo-f401re/boot-nucleo-f401re.ld
+++ b/hw/bsp/nucleo-f401re/boot-nucleo-f401re.ld
@@ -6,7 +6,7 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
@@ -16,177 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-/* Linker script for STM32F401 when running the boot loader */
/* Linker script to configure memory regions. */
MEMORY
-{
+{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 16K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 96K
}
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __end__
- * end
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __coredata_start__
- * __coredata_end__
- * __corebss_start__
- * __corebss_end__
- * __ecoredata
- * __ecorebss
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __vector_tbl_reloc__ = .;
- KEEP(*(.isr_vector))
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- KEEP(*(.eh_frame*))
- } > FLASH
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > FLASH
-
- __exidx_end = .;
-
- . = ALIGN(8);
- __etext = .;
-
- .coredata : AT (__etext)
- {
- __coredata_start__ = .;
- *(.data.core)
- . = ALIGN(8);
- __coredata_end__ = .;
- } > RAM
-
- __ecoredata = __etext + SIZEOF(.coredata);
-
- .data : AT (__ecoredata)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- KEEP(*(.jcr*))
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
-
- } > RAM
-
- .corebss (NOLOAD):
- {
- . = ALIGN(4);
- __corebss_start__ = .;
- *(.bss.core)
- . = ALIGN(4);
- __corebss_end__ = .;
- *(.corebss*)
- *(.bss.core.nz)
- . = ALIGN(4);
- __ecorebss = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- __HeapBase = .;
- __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM; stack limit is bottom of stack */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-}
-
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/nucleo-f401re/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nucleo-f401re/bsp.yml b/hw/bsp/nucleo-f401re/bsp.yml
index 52f2dbc..cd4a8c6 100644
--- a/hw/bsp/nucleo-f401re/bsp.yml
+++ b/hw/bsp/nucleo-f401re/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "nucleo-f401re.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-nucleo-f401re.ld"
+bsp.linkerscript:
+ - "nucleo-f401re.ld"
+ - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f401.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nucleo-f401re.ld"
+ - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f401.ld"
bsp.downloadscript: "nucleo-f401re_download.sh"
bsp.debugscript: "nucleo-f401re_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/nucleo-f401re/nucleo-f401re.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nucleo-f401re/nucleo-f401re.ld b/hw/bsp/nucleo-f401re/nucleo-f401re.ld
index 54f884a..692dc27 100644
--- a/hw/bsp/nucleo-f401re/nucleo-f401re.ld
+++ b/hw/bsp/nucleo-f401re/nucleo-f401re.ld
@@ -6,7 +6,7 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
@@ -16,193 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-/* Linker script for STM32F401 when running from flash and using the bootloader */
/* Linker script to configure memory regions. */
MEMORY
-{
+{
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 128K /* First image slot. */
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 96K
}
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __end__
- * end
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __coredata_start__
- * __coredata_end__
- * __corebss_start__
- * __corebss_end__
- * __ecoredata
- * __ecorebss
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- /* Reserve space at the start of the image for the header. */
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- KEEP(*(.eh_frame*))
- } > FLASH
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > FLASH
-
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .coredata : AT (__etext)
- {
- __coredata_start__ = .;
- *(.data.core)
- . = ALIGN(4);
- __coredata_end__ = .;
- } > RAM
-
- __ecoredata = __etext + SIZEOF(.coredata);
-
- .data : AT (__ecoredata)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- KEEP(*(.jcr*))
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
-
- } > RAM
-
- .corebss (NOLOAD):
- {
- . = ALIGN(4);
- __corebss_start__ = .;
- *(.bss.core)
- . = ALIGN(4);
- __corebss_end__ = .;
- *(.corebss*)
- *(.bss.core.nz)
- . = ALIGN(4);
- __ecorebss = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- __HeapBase = .;
- __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
-
- _ram_start = ORIGIN(RAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM; stack limit is bottom of stack */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-}
-
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/olimex_stm32-e407_devboard/boot-olimex_stm32-e407_devboard.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/boot-olimex_stm32-e407_devboard.ld b/hw/bsp/olimex_stm32-e407_devboard/boot-olimex_stm32-e407_devboard.ld
index a20252c..342de6a 100755
--- a/hw/bsp/olimex_stm32-e407_devboard/boot-olimex_stm32-e407_devboard.ld
+++ b/hw/bsp/olimex_stm32-e407_devboard/boot-olimex_stm32-e407_devboard.ld
@@ -6,7 +6,7 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
@@ -16,187 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-/* Linker script for STM32F407 when running code from SRAM */
/* Linker script to configure memory regions. */
MEMORY
-{
+{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 32K
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
}
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __end__
- * end
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __coredata_start__
- * __coredata_end__
- * __corebss_start__
- * __corebss_end__
- * __ecoredata
- * __ecorebss
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __vector_tbl_reloc__ = .;
- KEEP(*(.isr_vector))
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- KEEP(*(.eh_frame*))
- } > FLASH
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > FLASH
-
- __exidx_end = .;
-
- . = ALIGN(8);
- __etext = .;
-
- .coredata : AT (__etext)
- {
- __coredata_start__ = .;
- *(.data.core)
- . = ALIGN(8);
- __coredata_end__ = .;
- } > CCM
-
- __ecoredata = __etext + SIZEOF(.coredata);
-
- /* This section is here so that the start of .data has the same VMA and LMA */
- .ram_coredata (NOLOAD):
- {
- . = . + SIZEOF(.coredata);
- } > RAM
-
- .data : AT (__ecoredata)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- KEEP(*(.jcr*))
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
-
- } > RAM
-
- .corebss (NOLOAD):
- {
- . = ALIGN(4);
- __corebss_start__ = .;
- *(.bss.core)
- . = ALIGN(4);
- __corebss_end__ = .;
- *(.corebss*)
- *(.bss.core.nz)
- . = ALIGN(4);
- __ecorebss = .;
- } > CCM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- __HeapBase = .;
- __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > CCM
-
- /* Set stack top to end of CCM; stack limit is bottom of stack */
- __StackTop = ORIGIN(CCM) + LENGTH(CCM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Check for CCM overflow */
- ASSERT(__StackLimit >= __ecorebss, "CCM overflow!")
-}
-
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/bsp.yml b/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
index 2c7c41c..c623c75 100644
--- a/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
+++ b/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "olimex_stm32-e407_devboard.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-olimex_stm32-e407_devboard.ld"
+bsp.linkerscript:
+ - "olimex_stm32-e407_devboard.ld"
+ - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-olimex_stm32-e407_devboard.ld"
+ - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
bsp.downloadscript: "olimex_stm32-e407_devboard_download.sh"
bsp.debugscript: "olimex_stm32-e407_devboard_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard.ld b/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard.ld
index 5870a3e..3382dcc 100755
--- a/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard.ld
+++ b/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard.ld
@@ -6,7 +6,7 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
@@ -21,193 +21,11 @@
/* Linker script to configure memory regions. */
MEMORY
-{
+{
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 384K /* First image slot. */
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
}
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __end__
- * end
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __coredata_start__
- * __coredata_end__
- * __corebss_start__
- * __corebss_end__
- * __ecoredata
- * __ecorebss
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- /* Reserve space at the start of the image for the header. */
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- KEEP(*(.eh_frame*))
- } > FLASH
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > FLASH
-
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .coredata : AT (__etext)
- {
- __coredata_start__ = .;
- *(.data.core)
- . = ALIGN(4);
- __coredata_end__ = .;
- } > CCM
-
- __ecoredata = __etext + SIZEOF(.coredata);
-
- .data : AT (__ecoredata)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- KEEP(*(.jcr*))
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
-
- } > RAM
-
- .corebss (NOLOAD):
- {
- . = ALIGN(4);
- __corebss_start__ = .;
- *(.bss.core)
- . = ALIGN(4);
- __corebss_end__ = .;
- *(.corebss*)
- *(.bss.core.nz)
- . = ALIGN(4);
- __ecorebss = .;
- } > CCM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- __HeapBase = .;
- __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
-
- _ram_start = ORIGIN(RAM);
- _ccram_start = ORIGIN(CCM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > CCM
-
- /* Set stack top to end of CCM; stack limit is bottom of stack */
- __StackTop = ORIGIN(CCM) + LENGTH(CCM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Check for CCM overflow */
- ASSERT(__StackLimit >= __ecorebss, "CCM overflow!")
-}
-
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/stm32f4discovery/boot-stm32f4discovery.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f4discovery/boot-stm32f4discovery.ld b/hw/bsp/stm32f4discovery/boot-stm32f4discovery.ld
index a20252c..342de6a 100644
--- a/hw/bsp/stm32f4discovery/boot-stm32f4discovery.ld
+++ b/hw/bsp/stm32f4discovery/boot-stm32f4discovery.ld
@@ -6,7 +6,7 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
@@ -16,187 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-/* Linker script for STM32F407 when running code from SRAM */
/* Linker script to configure memory regions. */
MEMORY
-{
+{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 32K
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
}
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __end__
- * end
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __coredata_start__
- * __coredata_end__
- * __corebss_start__
- * __corebss_end__
- * __ecoredata
- * __ecorebss
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __vector_tbl_reloc__ = .;
- KEEP(*(.isr_vector))
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- KEEP(*(.eh_frame*))
- } > FLASH
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > FLASH
-
- __exidx_end = .;
-
- . = ALIGN(8);
- __etext = .;
-
- .coredata : AT (__etext)
- {
- __coredata_start__ = .;
- *(.data.core)
- . = ALIGN(8);
- __coredata_end__ = .;
- } > CCM
-
- __ecoredata = __etext + SIZEOF(.coredata);
-
- /* This section is here so that the start of .data has the same VMA and LMA */
- .ram_coredata (NOLOAD):
- {
- . = . + SIZEOF(.coredata);
- } > RAM
-
- .data : AT (__ecoredata)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- KEEP(*(.jcr*))
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
-
- } > RAM
-
- .corebss (NOLOAD):
- {
- . = ALIGN(4);
- __corebss_start__ = .;
- *(.bss.core)
- . = ALIGN(4);
- __corebss_end__ = .;
- *(.corebss*)
- *(.bss.core.nz)
- . = ALIGN(4);
- __ecorebss = .;
- } > CCM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- __HeapBase = .;
- __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > CCM
-
- /* Set stack top to end of CCM; stack limit is bottom of stack */
- __StackTop = ORIGIN(CCM) + LENGTH(CCM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Check for CCM overflow */
- ASSERT(__StackLimit >= __ecorebss, "CCM overflow!")
-}
-
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/stm32f4discovery/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f4discovery/bsp.yml b/hw/bsp/stm32f4discovery/bsp.yml
index f3962e0..cbfc1d4 100644
--- a/hw/bsp/stm32f4discovery/bsp.yml
+++ b/hw/bsp/stm32f4discovery/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "stm32f4discovery.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-stm32f4discovery.ld"
+bsp.linkerscript:
+ - "stm32f4discovery.ld"
+ - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-stm32f4discovery.ld"
+ - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
bsp.downloadscript: "stm32f4discovery_download.sh"
bsp.debugscript: "stm32f4discovery_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/bsp/stm32f4discovery/stm32f4discovery.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f4discovery/stm32f4discovery.ld b/hw/bsp/stm32f4discovery/stm32f4discovery.ld
index f3d1abd..3382dcc 100644
--- a/hw/bsp/stm32f4discovery/stm32f4discovery.ld
+++ b/hw/bsp/stm32f4discovery/stm32f4discovery.ld
@@ -6,7 +6,7 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
@@ -21,193 +21,11 @@
/* Linker script to configure memory regions. */
MEMORY
-{
+{
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 384K /* First image slot. */
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
}
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __end__
- * end
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __coredata_start__
- * __coredata_end__
- * __corebss_start__
- * __corebss_end__
- * __ecoredata
- * __ecorebss
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- /* Reserve space at the start of the image for the header. */
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- KEEP(*(.eh_frame*))
- } > FLASH
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > FLASH
-
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .coredata : AT (__etext)
- {
- __coredata_start__ = .;
- *(.data.core)
- . = ALIGN(4);
- __coredata_end__ = .;
- } > CCM
-
- __ecoredata = __etext + SIZEOF(.coredata);
-
- .data : AT (__ecoredata)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP(*(.preinit_array))
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP(*(SORT(.init_array.*)))
- KEEP(*(.init_array))
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP(*(SORT(.fini_array.*)))
- KEEP(*(.fini_array))
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- KEEP(*(.jcr*))
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
-
- } > RAM
-
- .corebss (NOLOAD):
- {
- . = ALIGN(4);
- __corebss_start__ = .;
- *(.bss.core)
- . = ALIGN(4);
- __corebss_end__ = .;
- *(.corebss*)
- *(.bss.core.nz)
- . = ALIGN(4);
- __ecorebss = .;
- } > CCM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- __HeapBase = .;
- __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
-
- _ram_start = ORIGIN(RAM);
- _ccram_start = ORIGIN(CCRAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > CCM
-
- /* Set stack top to end of CCM; stack limit is bottom of stack */
- __StackTop = ORIGIN(CCM) + LENGTH(CCM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Check for CCM overflow */
- ASSERT(__StackLimit >= __ecorebss, "CCM overflow!")
-}
-
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/mcu/stm/stm32f4xx/stm32f401.ld
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/stm32f401.ld b/hw/mcu/stm/stm32f4xx/stm32f401.ld
new file mode 100644
index 0000000..3533cfb
--- /dev/null
+++ b/hw/mcu/stm/stm32f4xx/stm32f401.ld
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* Linker script to place sections and symbol values. Should be used together
+ * with other linker script that defines memory regions FLASH and RAM.
+ * It references following symbols, which must be defined in code:
+ * Reset_Handler : Entry of reset handler
+ *
+ * It defines following symbols, which code can use without definition:
+ * __exidx_start
+ * __exidx_end
+ * __etext
+ * __data_start__
+ * __preinit_array_start
+ * __preinit_array_end
+ * __init_array_start
+ * __init_array_end
+ * __fini_array_start
+ * __fini_array_end
+ * __data_end__
+ * __bss_start__
+ * __bss_end__
+ * __end__
+ * end
+ * __HeapBase
+ * __HeapLimit
+ * __StackLimit
+ * __StackTop
+ * __stack
+ * __coredata_start__
+ * __coredata_end__
+ * __corebss_start__
+ * __corebss_end__
+ * __ecoredata
+ * __ecorebss
+ */
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+ /* Reserve space at the start of the image for the header. */
+ .imghdr (NOLOAD):
+ {
+ . = . + _imghdr_size;
+ } > FLASH
+
+ .text :
+ {
+ __isr_vector_start = .;
+ KEEP(*(.isr_vector))
+ __isr_vector_end = .;
+ *(.text*)
+
+ KEEP(*(.init))
+ KEEP(*(.fini))
+
+ /* .ctors */
+ *crtbegin.o(.ctors)
+ *crtbegin?.o(.ctors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+ *(SORT(.ctors.*))
+ *(.ctors)
+
+ /* .dtors */
+ *crtbegin.o(.dtors)
+ *crtbegin?.o(.dtors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
+ *(SORT(.dtors.*))
+ *(.dtors)
+
+ *(.rodata*)
+
+ KEEP(*(.eh_frame*))
+ } > FLASH
+
+ .ARM.extab :
+ {
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ } > FLASH
+
+ __exidx_start = .;
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > FLASH
+
+ __exidx_end = .;
+
+ __etext = .;
+
+ .vector_relocation :
+ {
+ . = ALIGN(4);
+ __vector_tbl_reloc__ = .;
+ . = . + (__isr_vector_end - __isr_vector_start);
+ . = ALIGN(4);
+ } > RAM
+
+ .coredata : AT (__etext)
+ {
+ __coredata_start__ = .;
+ *(.data.core)
+ . = ALIGN(4);
+ __coredata_end__ = .;
+ } > RAM
+
+ __ecoredata = __etext + SIZEOF(.coredata);
+
+ .data : AT (__ecoredata)
+ {
+ __data_start__ = .;
+ *(vtable)
+ *(.data*)
+
+ /* preinit data */
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP(*(.preinit_array))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+
+ . = ALIGN(4);
+ /* init data */
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP(*(SORT(.init_array.*)))
+ KEEP(*(.init_array))
+ PROVIDE_HIDDEN (__init_array_end = .);
+
+
+ . = ALIGN(4);
+ /* finit data */
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP(*(SORT(.fini_array.*)))
+ KEEP(*(.fini_array))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+
+ KEEP(*(.jcr*))
+ . = ALIGN(4);
+ /* All data end */
+ __data_end__ = .;
+
+ } > RAM
+
+ .corebss (NOLOAD):
+ {
+ . = ALIGN(4);
+ __corebss_start__ = .;
+ *(.bss.core)
+ . = ALIGN(4);
+ __corebss_end__ = .;
+ *(.corebss*)
+ *(.bss.core.nz)
+ . = ALIGN(4);
+ __ecorebss = .;
+ } > RAM
+
+ .bss :
+ {
+ . = ALIGN(4);
+ __bss_start__ = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ __bss_end__ = .;
+ } > RAM
+
+ __HeapBase = .;
+ __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
+
+ _ram_start = ORIGIN(RAM);
+
+ /* .stack_dummy section doesn't contains any symbols. It is only
+ * used for linker to calculate size of stack sections, and assign
+ * values to stack symbols later */
+ .stack_dummy (COPY):
+ {
+ *(.stack*)
+ } > RAM
+
+ /* Set stack top to end of RAM; stack limit is bottom of stack */
+ __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+ __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+ PROVIDE(__stack = __StackTop);
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c61985b3/hw/mcu/stm/stm32f4xx/stm32f407.ld
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/stm32f407.ld b/hw/mcu/stm/stm32f4xx/stm32f407.ld
index f193bf5..1d06f76 100644
--- a/hw/mcu/stm/stm32f4xx/stm32f407.ld
+++ b/hw/mcu/stm/stm32f4xx/stm32f407.ld
@@ -181,6 +181,9 @@ SECTIONS
__HeapBase = .;
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
+ _ram_start = ORIGIN(RAM);
+ _ccram_start = ORIGIN(CCM);
+
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
[06/50] [abbrv] incubator-mynewt-core git commit: bleprph_oic;
use new os_eventq mechanism.
Posted by cc...@apache.org.
bleprph_oic; use new os_eventq mechanism.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c55ab97b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c55ab97b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c55ab97b
Branch: refs/heads/master
Commit: c55ab97b6a0c3c64b13a58588626c711486cec8f
Parents: acd2663
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 7 14:16:58 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 7 14:16:58 2016 -0800
----------------------------------------------------------------------
apps/bleprph_oic/src/main.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c55ab97b/apps/bleprph_oic/src/main.c
----------------------------------------------------------------------
diff --git a/apps/bleprph_oic/src/main.c b/apps/bleprph_oic/src/main.c
index 31e9009..72e2f5e 100755
--- a/apps/bleprph_oic/src/main.c
+++ b/apps/bleprph_oic/src/main.c
@@ -28,6 +28,7 @@
#include "hal/hal_gpio.h"
#include "console/console.h"
#include "imgmgr/imgmgr.h"
+#include "mgmt/mgmt.h"
/* BLE */
#include "nimble/ble.h"
@@ -46,6 +47,10 @@ struct log bleprph_log;
#define BLEPRPH_TASK_PRIO 1
#define BLEPRPH_STACK_SIZE (OS_STACK_ALIGN(336))
+static struct os_eventq bleprph_evq;
+static struct os_task bleprph_task;
+static os_stack_t bleprph_stack[BLEPRPH_STACK_SIZE];
+
static int bleprph_gap_event(struct ble_gap_event *event, void *arg);
/**
@@ -243,6 +248,17 @@ bleprph_on_sync(void)
bleprph_advertise();
}
+/*
+ * Event loop for the main bleprph task.
+ */
+static void
+bleprph_task_handler(void *unused)
+{
+ while (1) {
+ os_eventq_run(&bleprph_evq);
+ }
+}
+
/**
* main
*
@@ -269,6 +285,19 @@ main(void)
/* Initialize the NimBLE host configuration. */
log_register("ble_hs", &ble_hs_log, &log_console_handler, NULL, LOG_SYSLEVEL);
+ os_eventq_init(&bleprph_evq);
+ os_eventq_dflt_set(&bleprph_evq);
+
+ /*
+ * Create the bleprph task. All omgr and NimBLE host operations are
+ * performed in this task.
+ */
+ os_task_init(&bleprph_task, "bleprph", bleprph_task_handler,
+ NULL, BLEPRPH_TASK_PRIO, OS_WAIT_FOREVER,
+ bleprph_stack, BLEPRPH_STACK_SIZE);
+ mgmt_evq_set(&bleprph_evq);
+ ble_hs_evq_set(&bleprph_evq);
+
ble_coap_gatt_srv_init();
ble_hs_cfg.reset_cb = bleprph_on_reset;
ble_hs_cfg.sync_cb = bleprph_on_sync;
[47/50] [abbrv] incubator-mynewt-core git commit: Merge
remote-tracking branch 'apache/master' into develop
Posted by cc...@apache.org.
Merge remote-tracking branch 'apache/master' into develop
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/406eeb0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/406eeb0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/406eeb0c
Branch: refs/heads/master
Commit: 406eeb0c2fc736f3a13c8d7320c0b65eb44474c4
Parents: 858f94e 7aee851
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Nov 10 11:06:24 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Nov 10 11:06:24 2016 -0800
----------------------------------------------------------------------
README.md | 2 +-
net/nimble/transport/uart/src/ble_hci_uart.c | 8 ++++++--
repository.yml | 3 ++-
3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/406eeb0c/net/nimble/transport/uart/src/ble_hci_uart.c
----------------------------------------------------------------------
diff --cc net/nimble/transport/uart/src/ble_hci_uart.c
index 530c5e4,663c817..13b32d3
--- a/net/nimble/transport/uart/src/ble_hci_uart.c
+++ b/net/nimble/transport/uart/src/ble_hci_uart.c
@@@ -38,17 -36,8 +38,21 @@@
#include "transport/uart/ble_hci_uart.h"
+#define BLE_HCI_UART_EVT_COUNT \
+ (MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT) + MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT))
+
+/***
- * NOTE:
++ * NOTES:
+ * The UART HCI transport doesn't use event buffer priorities. All incoming
- * and outgoing events and commands use buffers from the same pool.
++ * and outgoing events use buffers from the same pool.
++ *
++ * The "skip" definitions are here so that when buffers cannot be allocated,
++ * the command or acl packets are simply skipped so that the HCI interface
++ * does not lose synchronization and resets dont (necessarily) occur.
+ */
+
/* XXX: for now, define this here */
-#ifdef FEATURE_BLE_DEVICE
+#if MYNEWT_VAL(BLE_DEVICE)
extern void ble_ll_data_buffer_overflow(void);
extern void ble_ll_hw_error(uint8_t err);
[07/50] [abbrv] incubator-mynewt-core git commit: newtmgr/mgmt;
rename nmgr_evq_set() -> mgmt_evq_set()
Posted by cc...@apache.org.
newtmgr/mgmt; rename nmgr_evq_set() -> mgmt_evq_set()
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/da398bd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/da398bd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/da398bd2
Branch: refs/heads/master
Commit: da398bd2246bcae923817857f430b39c31f5fe53
Parents: c55ab97
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 7 14:21:06 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 7 14:21:06 2016 -0800
----------------------------------------------------------------------
mgmt/mgmt/include/mgmt/mgmt.h | 1 +
mgmt/newtmgr/include/newtmgr/newtmgr.h | 1 -
mgmt/newtmgr/src/newtmgr.c | 2 +-
3 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/da398bd2/mgmt/mgmt/include/mgmt/mgmt.h
----------------------------------------------------------------------
diff --git a/mgmt/mgmt/include/mgmt/mgmt.h b/mgmt/mgmt/include/mgmt/mgmt.h
index bd3354b..9856405 100644
--- a/mgmt/mgmt/include/mgmt/mgmt.h
+++ b/mgmt/mgmt/include/mgmt/mgmt.h
@@ -89,6 +89,7 @@ const struct mgmt_handler *mgmt_find_handler(uint16_t group_id,
uint16_t handler_id);
struct os_eventq *mgmt_evq_get(void);
+void mgmt_evq_set(struct os_eventq *evq);
#ifdef __cplusplus
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/da398bd2/mgmt/newtmgr/include/newtmgr/newtmgr.h
----------------------------------------------------------------------
diff --git a/mgmt/newtmgr/include/newtmgr/newtmgr.h b/mgmt/newtmgr/include/newtmgr/newtmgr.h
index 9f87655..2349578 100644
--- a/mgmt/newtmgr/include/newtmgr/newtmgr.h
+++ b/mgmt/newtmgr/include/newtmgr/newtmgr.h
@@ -68,7 +68,6 @@ struct nmgr_transport {
nmgr_transport_get_mtu_func_t nt_get_mtu;
};
-void nmgr_evq_set(struct os_eventq *evq);
void nmgr_event_put(struct os_event *ev);
int nmgr_task_init(void);
int nmgr_transport_init(struct nmgr_transport *nt,
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/da398bd2/mgmt/newtmgr/src/newtmgr.c
----------------------------------------------------------------------
diff --git a/mgmt/newtmgr/src/newtmgr.c b/mgmt/newtmgr/src/newtmgr.c
index bd7474d..242b188 100644
--- a/mgmt/newtmgr/src/newtmgr.c
+++ b/mgmt/newtmgr/src/newtmgr.c
@@ -55,7 +55,7 @@ mgmt_evq_get(void)
}
void
-nmgr_evq_set(struct os_eventq *evq)
+mgmt_evq_set(struct os_eventq *evq)
{
os_eventq_designate(&nmgr_evq, evq, NULL);
}
[40/50] [abbrv] incubator-mynewt-core git commit: Additional fix for
part2linkerscript relative paths
Posted by cc...@apache.org.
Additional fix for part2linkerscript relative paths
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ca0fe744
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ca0fe744
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ca0fe744
Branch: refs/heads/master
Commit: ca0fe7448ce041e2276b4c4efaaeead8ce4f42ec
Parents: 8e986d2
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 16:34:53 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 16:34:53 2016 -0800
----------------------------------------------------------------------
hw/bsp/bmd300eval/bsp.yml | 2 +-
hw/bsp/nrf51-blenano/bsp.yml | 2 +-
hw/bsp/nrf51dk-16kbram/bsp.yml | 2 +-
hw/bsp/nrf51dk/bsp.yml | 2 +-
hw/bsp/nrf52dk/bsp.yml | 2 +-
hw/bsp/rb-nano2/bsp.yml | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ca0fe744/hw/bsp/bmd300eval/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/bsp.yml b/hw/bsp/bmd300eval/bsp.yml
index 239825c..5f31de9 100644
--- a/hw/bsp/bmd300eval/bsp.yml
+++ b/hw/bsp/bmd300eval/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/bmd300eval/boot-nrf52xxaa.ld"
- "hw/mcu/nordic/nrf52xxx/nrf52.ld"
-bsp.part2linkerscript: "hw/bsp/split-bmd300eval.ld"
+bsp.part2linkerscript: "hw/bsp/bmd300eval/split-bmd300eval.ld"
bsp.downloadscript: "hw/bsp/bmd300eval/bmd300eval_download.sh"
bsp.debugscript: "hw/bsp/bmd300eval/bmd300eval_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ca0fe744/hw/bsp/nrf51-blenano/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/bsp.yml b/hw/bsp/nrf51-blenano/bsp.yml
index 8fa5fe0..c174892 100644
--- a/hw/bsp/nrf51-blenano/bsp.yml
+++ b/hw/bsp/nrf51-blenano/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf51-blenano/boot-nrf51xxac.ld"
- "hw/mcu/nordic/nrf51xxx/nrf51.ld"
-bsp.part2linkerscript: "hw/bsp/split-nrf51dk.ld"
+bsp.part2linkerscript: "hw/bsp/nrf51-blenano/split-nrf51dk.ld"
bsp.downloadscript: "hw/bsp/nrf51-blenano/nrf51dk_download.sh"
bsp.debugscript: "hw/bsp/nrf51-blenano/nrf51dk_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ca0fe744/hw/bsp/nrf51dk-16kbram/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/bsp.yml b/hw/bsp/nrf51dk-16kbram/bsp.yml
index 901422e..78ef8a7 100644
--- a/hw/bsp/nrf51dk-16kbram/bsp.yml
+++ b/hw/bsp/nrf51dk-16kbram/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld"
- "hw/mcu/nordic/nrf51xxx/nrf51.ld"
-bsp.part2linkerscript: "hw/bsp/split-nrf51dk-16kbram.ld"
+bsp.part2linkerscript: "hw/bsp/nrf51dk-16kbram/split-nrf51dk-16kbram.ld"
bsp.downloadscript: "hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh"
bsp.debugscript: "hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ca0fe744/hw/bsp/nrf51dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/bsp.yml b/hw/bsp/nrf51dk/bsp.yml
index 9e5fc78..5e78d60 100644
--- a/hw/bsp/nrf51dk/bsp.yml
+++ b/hw/bsp/nrf51dk/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf51dk/boot-nrf51xxac.ld"
- "hw/mcu/nordic/nrf51xxx/nrf51.ld"
-bsp.part2linkerscript: "hw/bsp/split-nrf51dk.ld"
+bsp.part2linkerscript: "hw/bsp/nrf51dk/split-nrf51dk.ld"
bsp.downloadscript: "hw/bsp/nrf51dk/nrf51dk_download.sh"
bsp.debugscript: "hw/bsp/nrf51dk/nrf51dk_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ca0fe744/hw/bsp/nrf52dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/bsp.yml b/hw/bsp/nrf52dk/bsp.yml
index 41142cb..d0e5fc1 100644
--- a/hw/bsp/nrf52dk/bsp.yml
+++ b/hw/bsp/nrf52dk/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf52dk/boot-nrf52xxaa.ld"
- "hw/mcu/nordic/nrf52xxx/nrf52.ld"
-bsp.part2linkerscript: "hw/bsp/split-nrf52dk.ld"
+bsp.part2linkerscript: "hw/bsp/nrf52dk/split-nrf52dk.ld"
bsp.downloadscript: "hw/bsp/nrf52dk/nrf52dk_download.sh"
bsp.debugscript: "hw/bsp/nrf52dk/nrf52dk_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ca0fe744/hw/bsp/rb-nano2/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/bsp.yml b/hw/bsp/rb-nano2/bsp.yml
index 13ca042..4be5b52 100644
--- a/hw/bsp/rb-nano2/bsp.yml
+++ b/hw/bsp/rb-nano2/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/rb-nano2/boot-nrf52xxaa.ld"
- "hw/mcu/nordic/nrf52xxx/nrf52.ld"
-bsp.part2linkerscript: "hw/bsp/split-rb-nano2.ld"
+bsp.part2linkerscript: "hw/bsp/rb-nano2/split-rb-nano2.ld"
bsp.downloadscript: "hw/bsp/rb-nano2/rb-nano2_download.sh"
bsp.debugscript: "hw/bsp/rb-nano2/rb-nano2_debug.sh"
[36/50] [abbrv] incubator-mynewt-core git commit: rb-nano2 - Use
OpenOCD's cmsis-dap.cfg; not ours.
Posted by cc...@apache.org.
rb-nano2 - Use OpenOCD's cmsis-dap.cfg; not ours.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c63a0831
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c63a0831
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c63a0831
Branch: refs/heads/master
Commit: c63a083158b07b75143b2b88cf9acf24713b89c6
Parents: 7ad9747
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 14:02:29 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 14:45:49 2016 -0800
----------------------------------------------------------------------
hw/bsp/rb-nano2/cmsis-dap.cfg | 12 ------------
hw/bsp/rb-nano2/rb-nano2_debug.sh | 2 +-
hw/bsp/rb-nano2/rb-nano2_download.sh | 2 +-
3 files changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c63a0831/hw/bsp/rb-nano2/cmsis-dap.cfg
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/cmsis-dap.cfg b/hw/bsp/rb-nano2/cmsis-dap.cfg
deleted file mode 100644
index 7251280..0000000
--- a/hw/bsp/rb-nano2/cmsis-dap.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# ARM CMSIS-DAP compliant adapter
-#
-# http://www.keil.com/support/man/docs/dapdebug/
-#
-
-interface cmsis-dap
-
-#set WORKAREASIZE 0x2000
-
-# Optionally specify the serial number of CMSIS-DAP usb device.
-#cmsis_dap_serial 02200201E6661E601B98E3B9
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c63a0831/hw/bsp/rb-nano2/rb-nano2_debug.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/rb-nano2_debug.sh b/hw/bsp/rb-nano2/rb-nano2_debug.sh
index 4ac2d94..8cd53c8 100755
--- a/hw/bsp/rb-nano2/rb-nano2_debug.sh
+++ b/hw/bsp/rb-nano2/rb-nano2_debug.sh
@@ -30,7 +30,7 @@
. $CORE_PATH/hw/scripts/openocd.sh
FILE_NAME=$BIN_BASENAME.elf
-CFG="-s $BSP_PATH -f cmsis-dap.cfg -f nrf52.cfg"
+CFG="-f interface/cmsis-dap.cfg -f target/nrf52.cfg"
EXTRA_JTAG_CMD="$EXTRA_JTAG_CMD; nrf52.cpu configure -event gdb-detach {resume;shutdown}"
openocd_debug
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c63a0831/hw/bsp/rb-nano2/rb-nano2_download.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/rb-nano2_download.sh b/hw/bsp/rb-nano2/rb-nano2_download.sh
index f027618..d772862 100755
--- a/hw/bsp/rb-nano2/rb-nano2_download.sh
+++ b/hw/bsp/rb-nano2/rb-nano2_download.sh
@@ -31,7 +31,7 @@
. $CORE_PATH/hw/scripts/openocd.sh
-CFG="-s $BSP_PATH -f cmsis-dap.cfg -f nrf52.cfg"
+CFG="-f interface/cmsis-dap.cfg -f target/nrf52.cfg"
if [ "$MFG_IMAGE" ]; then
FLASH_OFFSET=0
[20/50] [abbrv] incubator-mynewt-core git commit: BLE host - Fix
incorrect expiry issue
Posted by cc...@apache.org.
BLE host - Fix incorrect expiry issue
Sometimes an event expiry would get "dropped"; the event would not
expire at the appropriate time. Instead, the event would expire late,
simultaneuous with the following event.
The bug was: a relative time was being compared against an absolute
time, yielding an incorrect result.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/fcef18f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/fcef18f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/fcef18f3
Branch: refs/heads/master
Commit: fcef18f37d3e9dd1c3069351db2093e693e495db
Parents: ed47568
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Nov 7 17:23:01 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 13:28:34 2016 -0800
----------------------------------------------------------------------
net/nimble/host/src/ble_hs.c | 5 ++++-
net/nimble/host/test/src/ble_gap_test.c | 14 +++++++-------
net/nimble/host/test/src/ble_hs_adv_test.c | 4 ++--
net/nimble/host/test/src/ble_hs_conn_test.c | 6 ++++--
net/nimble/host/test/src/ble_hs_test_util.c | 3 ++-
net/nimble/host/test/src/ble_hs_test_util.h | 1 +
net/nimble/host/test/src/ble_os_test.c | 9 +++++++++
7 files changed, 29 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcef18f3/net/nimble/host/src/ble_hs.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs.c b/net/nimble/host/src/ble_hs.c
index 63b04ed..7f7383b 100644
--- a/net/nimble/host/src/ble_hs.c
+++ b/net/nimble/host/src/ble_hs.c
@@ -221,6 +221,8 @@ ble_hs_heartbeat_timer_reset(uint32_t ticks)
void
ble_hs_heartbeat_sched(int32_t ticks_from_now)
{
+ os_time_t abs_time;
+
if (ticks_from_now == BLE_HS_FOREVER) {
return;
}
@@ -228,8 +230,9 @@ ble_hs_heartbeat_sched(int32_t ticks_from_now)
/* Reset heartbeat timer if it is not currently scheduled or if the
* specified time is sooner than the current expiration time.
*/
+ abs_time = os_time_get() + ticks_from_now;
if (!os_callout_queued(&ble_hs_heartbeat_timer) ||
- OS_TIME_TICK_LT(ticks_from_now, ble_hs_heartbeat_timer.c_ticks)) {
+ OS_TIME_TICK_LT(abs_time, ble_hs_heartbeat_timer.c_ticks)) {
ble_hs_heartbeat_timer_reset(ticks_from_now);
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcef18f3/net/nimble/host/test/src/ble_gap_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_gap_test.c b/net/nimble/host/test/src/ble_gap_test.c
index 1b531db..8acf2f2 100644
--- a/net/nimble/host/test/src/ble_gap_test.c
+++ b/net/nimble/host/test/src/ble_gap_test.c
@@ -1359,7 +1359,7 @@ ble_gap_test_util_adv(uint8_t own_addr_type, uint8_t peer_addr_type,
if (fail_status == 0 || cmd_fail_idx >= cmd_idx) {
rc = ble_hs_test_util_adv_start(own_addr_type, peer_addr_type,
- peer_addr, &adv_params,
+ peer_addr, &adv_params, BLE_HS_FOREVER,
ble_gap_test_util_connect_cb, NULL,
cmd_fail_idx - cmd_idx, fail_status);
@@ -1433,7 +1433,7 @@ TEST_CASE(ble_gap_test_case_adv_bad_args)
adv_params = ble_hs_test_util_adv_params;
adv_params.disc_mode = 43;
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_PUBLIC,
- peer_addr, &adv_params,
+ peer_addr, &adv_params, BLE_HS_FOREVER,
ble_gap_test_util_connect_cb, NULL, 0, 0);
TEST_ASSERT(rc == BLE_HS_EINVAL);
TEST_ASSERT(!ble_gap_adv_active());
@@ -1442,7 +1442,7 @@ TEST_CASE(ble_gap_test_case_adv_bad_args)
adv_params = ble_hs_test_util_adv_params;
adv_params.conn_mode = 27;
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_PUBLIC,
- peer_addr, &adv_params,
+ peer_addr, &adv_params, BLE_HS_FOREVER,
ble_gap_test_util_connect_cb, NULL, 0, 0);
TEST_ASSERT(rc == BLE_HS_EINVAL);
TEST_ASSERT(!ble_gap_adv_active());
@@ -1451,7 +1451,7 @@ TEST_CASE(ble_gap_test_case_adv_bad_args)
adv_params = ble_hs_test_util_adv_params;
adv_params.conn_mode = BLE_GAP_CONN_MODE_DIR;
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, 12,
- peer_addr, &adv_params,
+ peer_addr, &adv_params, BLE_HS_FOREVER,
ble_gap_test_util_connect_cb, NULL, 0, 0);
TEST_ASSERT(rc == BLE_HS_EINVAL);
TEST_ASSERT(!ble_gap_adv_active());
@@ -1459,13 +1459,13 @@ TEST_CASE(ble_gap_test_case_adv_bad_args)
/*** Advertising already in progress. */
adv_params = ble_hs_test_util_adv_params;
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_PUBLIC,
- peer_addr, &adv_params,
+ peer_addr, &adv_params, BLE_HS_FOREVER,
ble_gap_test_util_connect_cb, NULL, 0, 0);
TEST_ASSERT(rc == 0);
TEST_ASSERT(ble_gap_adv_active());
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_PUBLIC,
- peer_addr, &adv_params,
+ peer_addr, &adv_params, BLE_HS_FOREVER,
ble_gap_test_util_connect_cb, NULL, 0, 0);
TEST_ASSERT(rc == BLE_HS_EALREADY);
TEST_ASSERT(ble_gap_adv_active());
@@ -1500,7 +1500,7 @@ ble_gap_test_util_adv_verify_dflt_params(uint8_t own_addr_type,
adv_params.high_duty_cycle = 0;
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_PUBLIC,
- peer_addr, &adv_params,
+ peer_addr, &adv_params, BLE_HS_FOREVER,
ble_gap_test_util_connect_cb, NULL, 0, 0);
TEST_ASSERT_FATAL(rc == 0);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcef18f3/net/nimble/host/test/src/ble_hs_adv_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_hs_adv_test.c b/net/nimble/host/test/src/ble_hs_adv_test.c
index beb8417..b441a84 100644
--- a/net/nimble/host/test/src/ble_hs_adv_test.c
+++ b/net/nimble/host/test/src/ble_hs_adv_test.c
@@ -155,7 +155,7 @@ ble_hs_adv_test_misc_tx_and_verify_data(
TEST_ASSERT_FATAL(rc == 0);
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, 0, NULL, &adv_params,
- NULL, NULL, 0, 0);
+ BLE_HS_FOREVER, NULL, NULL, 0, 0);
TEST_ASSERT_FATAL(rc == 0);
/* Discard the adv-enable command. */
@@ -169,7 +169,7 @@ ble_hs_adv_test_misc_tx_and_verify_data(
TEST_ASSERT_FATAL(rc == 0);
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, 0, NULL, &adv_params,
- NULL, NULL, 0, 0);
+ BLE_HS_FOREVER, NULL, NULL, 0, 0);
TEST_ASSERT_FATAL(rc == 0);
/* Discard the adv-enable command. */
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcef18f3/net/nimble/host/test/src/ble_hs_conn_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_hs_conn_test.c b/net/nimble/host/test/src/ble_hs_conn_test.c
index 0972350..4ba92d2 100644
--- a/net/nimble/host/test/src/ble_hs_conn_test.c
+++ b/net/nimble/host/test/src/ble_hs_conn_test.c
@@ -107,7 +107,8 @@ TEST_CASE(ble_hs_conn_test_direct_connectable_success)
adv_params = ble_hs_test_util_adv_params;
adv_params.conn_mode = BLE_GAP_CONN_MODE_DIR;
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_PUBLIC,
- addr, &adv_params, NULL, NULL, 0, 0);
+ addr, &adv_params, BLE_HS_FOREVER,
+ NULL, NULL, 0, 0);
TEST_ASSERT(rc == 0);
TEST_ASSERT(!ble_gap_master_in_progress());
@@ -167,7 +168,8 @@ TEST_CASE(ble_hs_conn_test_undirect_connectable_success)
adv_params = ble_hs_test_util_adv_params;
adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
rc = ble_hs_test_util_adv_start(BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_PUBLIC,
- addr, &adv_params, NULL, NULL, 0, 0);
+ addr, &adv_params, BLE_HS_FOREVER,
+ NULL, NULL, 0, 0);
TEST_ASSERT(rc == 0);
TEST_ASSERT(!ble_gap_master_in_progress());
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcef18f3/net/nimble/host/test/src/ble_hs_test_util.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_hs_test_util.c b/net/nimble/host/test/src/ble_hs_test_util.c
index 9afd660..58e3345 100644
--- a/net/nimble/host/test/src/ble_hs_test_util.c
+++ b/net/nimble/host/test/src/ble_hs_test_util.c
@@ -666,6 +666,7 @@ int
ble_hs_test_util_adv_start(uint8_t own_addr_type,
uint8_t peer_addr_type, const uint8_t *peer_addr,
const struct ble_gap_adv_params *adv_params,
+ int32_t duration_ms,
ble_gap_event_fn *cb, void *cb_arg,
int fail_idx, uint8_t fail_status)
{
@@ -706,7 +707,7 @@ ble_hs_test_util_adv_start(uint8_t own_addr_type,
ble_hs_test_util_set_ack_seq(acks);
rc = ble_gap_adv_start(own_addr_type, peer_addr_type, peer_addr,
- BLE_HS_FOREVER, adv_params, cb, cb_arg);
+ duration_ms, adv_params, cb, cb_arg);
return rc;
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcef18f3/net/nimble/host/test/src/ble_hs_test_util.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_hs_test_util.h b/net/nimble/host/test/src/ble_hs_test_util.h
index db4e94c..923be22 100644
--- a/net/nimble/host/test/src/ble_hs_test_util.h
+++ b/net/nimble/host/test/src/ble_hs_test_util.h
@@ -115,6 +115,7 @@ int ble_hs_test_util_adv_start(uint8_t own_addr_type,
uint8_t peer_addr_type,
const uint8_t *peer_addr,
const struct ble_gap_adv_params *adv_params,
+ int32_t duration_ms,
ble_gap_event_fn *cb, void *cb_arg,
int fail_idx, uint8_t fail_status);
int ble_hs_test_util_adv_stop(uint8_t hci_status);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcef18f3/net/nimble/host/test/src/ble_os_test.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_os_test.c b/net/nimble/host/test/src/ble_os_test.c
index 067f0ac..7830242 100644
--- a/net/nimble/host/test/src/ble_os_test.c
+++ b/net/nimble/host/test/src/ble_os_test.c
@@ -62,8 +62,15 @@ ble_os_test_init_app_task(void)
static void
ble_os_test_misc_init(void)
{
+ extern os_time_t g_os_time;
+
ble_hs_test_util_init_no_start();
+ /* Allow the OS to approach tick rollover. This will help ensure host
+ * timers don't break when the tick counter resets.
+ */
+ g_os_time = UINT32_MAX - 10 * OS_TICKS_PER_SEC;
+
/* Receive acknowledgements for the startup sequence. We sent the
* corresponding requests when the host task was started.
*/
@@ -197,6 +204,8 @@ ble_os_disc_test_task_handler(void *arg)
*/
cb_called = 0;
+ os_time_delay(10);
+
/* Make sure there are no created connections and no connections in
* progress.
*/
[16/50] [abbrv] incubator-mynewt-core git commit: MYNEWT-475: BSP
Cleanup
Posted by cc...@apache.org.
MYNEWT-475: BSP Cleanup
Modification of nrf linker scripts. The linker scripts are now split
apart into part variation specific linker scripts for images and
the bootloader. Common linker scripts are now located in the
mcu directories. The bsp.yml files now specify the two split
scripts. Users can still override these the default scripts
with specific ones using the bsp.yml file.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/cd9214ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/cd9214ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/cd9214ed
Branch: refs/heads/master
Commit: cd9214edcae1a70809fd94b56c0661bfeda68baa
Parents: 90067c9
Author: William San Filippo <wi...@runtime.io>
Authored: Tue Nov 8 11:15:32 2016 -0800
Committer: William San Filippo <wi...@runtime.io>
Committed: Tue Nov 8 11:21:00 2016 -0800
----------------------------------------------------------------------
hw/bsp/arduino_primo_nrf52/boot-nrf52xxaa.ld | 25 +++
hw/bsp/arduino_primo_nrf52/boot-primo.ld | 191 ------------------
hw/bsp/arduino_primo_nrf52/bsp.yml | 8 +-
hw/bsp/arduino_primo_nrf52/nrf52xxaa.ld | 25 +++
hw/bsp/arduino_primo_nrf52/primo.ld | 202 -------------------
hw/bsp/bmd300eval/bmd300eval.ld | 202 -------------------
hw/bsp/bmd300eval/boot-bmd300eval.ld | 195 ------------------
hw/bsp/bmd300eval/boot-nrf52xxaa.ld | 25 +++
hw/bsp/bmd300eval/bsp.yml | 8 +-
hw/bsp/bmd300eval/nrf52xxaa.ld | 25 +++
.../nrf51-arduino_101/boot-nrf51-arduino_101.ld | 177 ----------------
hw/bsp/nrf51-arduino_101/boot-nrf51xxaa.ld | 27 +++
hw/bsp/nrf51-arduino_101/bsp.yml | 8 +-
hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld | 185 -----------------
hw/bsp/nrf51-arduino_101/nrf51xxaa.ld | 26 +++
hw/bsp/nrf51-blenano/boot-nrf51dk.ld | 178 ----------------
hw/bsp/nrf51-blenano/boot-nrf51xxac.ld | 27 +++
hw/bsp/nrf51-blenano/bsp.yml | 8 +-
hw/bsp/nrf51-blenano/nrf51dk.ld | 184 -----------------
hw/bsp/nrf51-blenano/nrf51xxac.ld | 25 +++
hw/bsp/nrf51dk-16kbram/boot-nrf51dk-16kbram.ld | 178 ----------------
hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld | 27 +++
hw/bsp/nrf51dk-16kbram/bsp.yml | 8 +-
hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram.ld | 186 -----------------
hw/bsp/nrf51dk-16kbram/nrf51xxaa.ld | 26 +++
hw/bsp/nrf51dk/boot-nrf51dk.ld | 178 ----------------
hw/bsp/nrf51dk/boot-nrf51xxac.ld | 27 +++
hw/bsp/nrf51dk/bsp.yml | 8 +-
hw/bsp/nrf51dk/nrf51dk.ld | 186 -----------------
hw/bsp/nrf51dk/nrf51xxac.ld | 25 +++
hw/bsp/nrf52dk/boot-nrf52dk.ld | 191 ------------------
hw/bsp/nrf52dk/boot-nrf52xxaa.ld | 25 +++
hw/bsp/nrf52dk/bsp.yml | 8 +-
hw/bsp/nrf52dk/nrf52dk.ld | 202 -------------------
hw/bsp/nrf52dk/nrf52xxaa.ld | 25 +++
hw/bsp/rb-nano2/boot-nrf52xxaa.ld | 25 +++
hw/bsp/rb-nano2/boot-rb-nano2.ld | 191 ------------------
hw/bsp/rb-nano2/bsp.yml | 8 +-
hw/bsp/rb-nano2/nrf52xxaa.ld | 25 +++
hw/bsp/rb-nano2/rb-nano2.ld | 202 -------------------
hw/mcu/nordic/nrf51xxx/nrf51.ld | 180 +++++++++++++++++
hw/mcu/nordic/nrf52xxx/nrf52.ld | 196 ++++++++++++++++++
hw/mcu/stm/stm32f4xx/stm32f407.ld | 200 ++++++++++++++++++
43 files changed, 1034 insertions(+), 3044 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/arduino_primo_nrf52/boot-nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/boot-nrf52xxaa.ld b/hw/bsp/arduino_primo_nrf52/boot-nrf52xxaa.ld
new file mode 100755
index 0000000..d1f1b99
--- /dev/null
+++ b/hw/bsp/arduino_primo_nrf52/boot-nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/arduino_primo_nrf52/boot-primo.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/boot-primo.ld b/hw/bsp/arduino_primo_nrf52/boot-primo.ld
deleted file mode 100755
index 8c47d2e..0000000
--- a/hw/bsp/arduino_primo_nrf52/boot-primo.ld
+++ /dev/null
@@ -1,191 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following
- * caveat:
- * 1. It does not get zeroed at init-time.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/arduino_primo_nrf52/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/bsp.yml b/hw/bsp/arduino_primo_nrf52/bsp.yml
index 79cc731..e5d2f2a 100644
--- a/hw/bsp/arduino_primo_nrf52/bsp.yml
+++ b/hw/bsp/arduino_primo_nrf52/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "primo.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-primo.ld"
+bsp.linkerscript:
+ - "nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.part2linkerscript: "split-primo.ld"
bsp.downloadscript: primo_download.sh
bsp.debugscript: primo_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/arduino_primo_nrf52/nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/nrf52xxaa.ld b/hw/bsp/arduino_primo_nrf52/nrf52xxaa.ld
new file mode 100755
index 0000000..9433e37
--- /dev/null
+++ b/hw/bsp/arduino_primo_nrf52/nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/arduino_primo_nrf52/primo.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/primo.ld b/hw/bsp/arduino_primo_nrf52/primo.ld
deleted file mode 100755
index e131176..0000000
--- a/hw/bsp/arduino_primo_nrf52/primo.ld
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following two
- * caveats:
- * 1. It does not get zeroed at init-time.
- * 2. You cannot use it as source memory for EasyDMA.
- *
- * This section exists because of a hardware defect; see errata 33 and 34
- * in nrf52 errata sheet.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- _ram_start = ORIGIN(RAM);
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/bmd300eval/bmd300eval.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/bmd300eval.ld b/hw/bsp/bmd300eval/bmd300eval.ld
deleted file mode 100755
index d90df34..0000000
--- a/hw/bsp/bmd300eval/bmd300eval.ld
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following two
- * caveats:
- * 1. It does not get zeroed at init-time.
- * 2. You cannot use it as source memory for EasyDMA.
- *
- * This section exists because of a hardware defect; see errata 33 and 34
- * in nrf52 errata sheet.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- _ram_start = ORIGIN(RAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/bmd300eval/boot-bmd300eval.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/boot-bmd300eval.ld b/hw/bsp/bmd300eval/boot-bmd300eval.ld
deleted file mode 100755
index 1ed2c14..0000000
--- a/hw/bsp/bmd300eval/boot-bmd300eval.ld
+++ /dev/null
@@ -1,195 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following two
- * caveats:
- * 1. It does not get zeroed at init-time.
- * 2. You cannot use it as source memory for EasyDMA.
- *
- * This section exists because of a hardware defect; see errata 33 and 34
- * in STM32F40x errata sheet.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/bmd300eval/boot-nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/boot-nrf52xxaa.ld b/hw/bsp/bmd300eval/boot-nrf52xxaa.ld
new file mode 100755
index 0000000..d1f1b99
--- /dev/null
+++ b/hw/bsp/bmd300eval/boot-nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/bmd300eval/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/bsp.yml b/hw/bsp/bmd300eval/bsp.yml
index c01e1ec..8a39786 100644
--- a/hw/bsp/bmd300eval/bsp.yml
+++ b/hw/bsp/bmd300eval/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "bmd300eval.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-bmd300eval.ld"
+bsp.linkerscript:
+ - "nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.part2linkerscript: "split-bmd300eval.ld"
bsp.downloadscript: bmd300eval_download.sh
bsp.debugscript: bmd300eval_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/bmd300eval/nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/nrf52xxaa.ld b/hw/bsp/bmd300eval/nrf52xxaa.ld
new file mode 100755
index 0000000..9433e37
--- /dev/null
+++ b/hw/bsp/bmd300eval/nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-arduino_101/boot-nrf51-arduino_101.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/boot-nrf51-arduino_101.ld b/hw/bsp/nrf51-arduino_101/boot-nrf51-arduino_101.ld
deleted file mode 100755
index 20a5b2c..0000000
--- a/hw/bsp/nrf51-arduino_101/boot-nrf51-arduino_101.ld
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-arduino_101/boot-nrf51xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/boot-nrf51xxaa.ld b/hw/bsp/nrf51-arduino_101/boot-nrf51xxaa.ld
new file mode 100755
index 0000000..d02106e
--- /dev/null
+++ b/hw/bsp/nrf51-arduino_101/boot-nrf51xxaa.ld
@@ -0,0 +1,27 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-arduino_101/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/bsp.yml b/hw/bsp/nrf51-arduino_101/bsp.yml
index 9e587a8..73c23bb 100644
--- a/hw/bsp/nrf51-arduino_101/bsp.yml
+++ b/hw/bsp/nrf51-arduino_101/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
-bsp.linkerscript: "nrf51-arduino_101.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-nrf51-arduino_101.ld"
+bsp.linkerscript:
+ - "nrf51xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf51xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.downloadscript: nrf51dk-16kbram_download.sh
bsp.debugscript: nrf51dk-16kbram_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld b/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld
deleted file mode 100755
index 631f446..0000000
--- a/hw/bsp/nrf51-arduino_101/nrf51-arduino_101.ld
+++ /dev/null
@@ -1,185 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- /* Keep first in RAM, as well as in bootloader */
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- _ram_start = ORIGIN(RAM);
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-arduino_101/nrf51xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/nrf51xxaa.ld b/hw/bsp/nrf51-arduino_101/nrf51xxaa.ld
new file mode 100755
index 0000000..2a41a06
--- /dev/null
+++ b/hw/bsp/nrf51-arduino_101/nrf51xxaa.ld
@@ -0,0 +1,26 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-blenano/boot-nrf51dk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/boot-nrf51dk.ld b/hw/bsp/nrf51-blenano/boot-nrf51dk.ld
deleted file mode 100755
index 1d514a5..0000000
--- a/hw/bsp/nrf51-blenano/boot-nrf51dk.ld
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-blenano/boot-nrf51xxac.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/boot-nrf51xxac.ld b/hw/bsp/nrf51-blenano/boot-nrf51xxac.ld
new file mode 100755
index 0000000..25ccbd2
--- /dev/null
+++ b/hw/bsp/nrf51-blenano/boot-nrf51xxac.ld
@@ -0,0 +1,27 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
+
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-blenano/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/bsp.yml b/hw/bsp/nrf51-blenano/bsp.yml
index 7bf5d0a..c1bb248 100644
--- a/hw/bsp/nrf51-blenano/bsp.yml
+++ b/hw/bsp/nrf51-blenano/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
-bsp.linkerscript: "nrf51dk.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-nrf51dk.ld"
+bsp.linkerscript:
+ - "nrf51xxac.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf51xxac.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.part2linkerscript: "split-nrf51dk.ld"
bsp.downloadscript: nrf51dk_download.sh
bsp.debugscript: nrf51dk_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-blenano/nrf51dk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/nrf51dk.ld b/hw/bsp/nrf51-blenano/nrf51dk.ld
deleted file mode 100755
index 094f2c4..0000000
--- a/hw/bsp/nrf51-blenano/nrf51dk.ld
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- /* Keep first in RAM, as well as in bootloader */
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51-blenano/nrf51xxac.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/nrf51xxac.ld b/hw/bsp/nrf51-blenano/nrf51xxac.ld
new file mode 100755
index 0000000..1e36529
--- /dev/null
+++ b/hw/bsp/nrf51-blenano/nrf51xxac.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk-16kbram/boot-nrf51dk-16kbram.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/boot-nrf51dk-16kbram.ld b/hw/bsp/nrf51dk-16kbram/boot-nrf51dk-16kbram.ld
deleted file mode 100755
index ce95980..0000000
--- a/hw/bsp/nrf51dk-16kbram/boot-nrf51dk-16kbram.ld
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld b/hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld
new file mode 100755
index 0000000..d02106e
--- /dev/null
+++ b/hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld
@@ -0,0 +1,27 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk-16kbram/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/bsp.yml b/hw/bsp/nrf51dk-16kbram/bsp.yml
index b1615e0..03b17bc 100644
--- a/hw/bsp/nrf51dk-16kbram/bsp.yml
+++ b/hw/bsp/nrf51dk-16kbram/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
-bsp.linkerscript: "nrf51dk-16kbram.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-nrf51dk-16kbram.ld"
+bsp.linkerscript:
+ - "nrf51xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf51xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.part2linkerscript: "split-nrf51dk-16kbram.ld"
bsp.downloadscript: nrf51dk-16kbram_download.sh
bsp.debugscript: nrf51dk-16kbram_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram.ld b/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram.ld
deleted file mode 100755
index bae91f1..0000000
--- a/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram.ld
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- /* Keep first in RAM, as well as in bootloader */
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- _ram_start = ORIGIN(RAM);
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk-16kbram/nrf51xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/nrf51xxaa.ld b/hw/bsp/nrf51dk-16kbram/nrf51xxaa.ld
new file mode 100755
index 0000000..2a41a06
--- /dev/null
+++ b/hw/bsp/nrf51dk-16kbram/nrf51xxaa.ld
@@ -0,0 +1,26 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk/boot-nrf51dk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/boot-nrf51dk.ld b/hw/bsp/nrf51dk/boot-nrf51dk.ld
deleted file mode 100755
index 1d514a5..0000000
--- a/hw/bsp/nrf51dk/boot-nrf51dk.ld
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x8000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk/boot-nrf51xxac.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/boot-nrf51xxac.ld b/hw/bsp/nrf51dk/boot-nrf51xxac.ld
new file mode 100755
index 0000000..25ccbd2
--- /dev/null
+++ b/hw/bsp/nrf51dk/boot-nrf51xxac.ld
@@ -0,0 +1,27 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
+
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/bsp.yml b/hw/bsp/nrf51dk/bsp.yml
index 7bf5d0a..c1bb248 100644
--- a/hw/bsp/nrf51dk/bsp.yml
+++ b/hw/bsp/nrf51dk/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
-bsp.linkerscript: "nrf51dk.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-nrf51dk.ld"
+bsp.linkerscript:
+ - "nrf51xxac.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf51xxac.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.part2linkerscript: "split-nrf51dk.ld"
bsp.downloadscript: nrf51dk_download.sh
bsp.debugscript: nrf51dk_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk/nrf51dk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/nrf51dk.ld b/hw/bsp/nrf51dk/nrf51dk.ld
deleted file mode 100755
index 21f6aab..0000000
--- a/hw/bsp/nrf51dk/nrf51dk.ld
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- /* Keep first in RAM, as well as in bootloader */
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- _ram_start = ORIGIN(RAM);
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
[48/50] [abbrv] incubator-mynewt-core git commit: MYNEWT-139:
Regression testing on target devices
Posted by cc...@apache.org.
MYNEWT-139: Regression testing on target devices
Add support for semaphore and mempool testing on devices.
Refactor tests so that applications control resource allocation.
Add experimental code to suspend tasks.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/bd6933cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/bd6933cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/bd6933cd
Branch: refs/heads/master
Commit: bd6933cdcb4366c8c5259c16661eb232cd6c43f9
Parents: 406eeb0
Author: Peter Snyder <pe...@apache.org>
Authored: Thu Nov 10 13:29:40 2016 -0800
Committer: Peter Snyder <pe...@apache.org>
Committed: Thu Nov 10 13:29:40 2016 -0800
----------------------------------------------------------------------
kernel/os/include/os/os_sched.h | 1 +
kernel/os/include/os/os_task.h | 5 +-
kernel/os/src/os_sched.c | 29 ++++
kernel/os/src/os_task.c | 34 ++++
kernel/os/test/src/eventq_test.c | 2 -
kernel/os/test/src/eventq_test.h | 6 +
kernel/os/test/src/mempool_test.c | 168 ++-----------------
kernel/os/test/src/mempool_test.h | 16 +-
kernel/os/test/src/mutex_test.c | 96 ++++++++---
kernel/os/test/src/mutex_test.h | 41 +----
kernel/os/test/src/os_test.c | 30 +++-
kernel/os/test/src/os_test_priv.h | 19 +++
kernel/os/test/src/sem_test.c | 63 +++++--
kernel/os/test/src/sem_test.h | 23 ---
.../test/src/testcases/os_mempool_test_case.c | 150 +++++++++++++++++
.../os/test/src/testcases/os_mutex_test_basic.c | 8 +-
.../test/src/testcases/os_mutex_test_case_1.c | 21 +--
.../test/src/testcases/os_mutex_test_case_2.c | 23 ++-
.../os/test/src/testcases/os_sem_test_basic.c | 9 +-
.../os/test/src/testcases/os_sem_test_case_1.c | 13 +-
.../os/test/src/testcases/os_sem_test_case_2.c | 18 +-
.../os/test/src/testcases/os_sem_test_case_3.c | 18 +-
.../os/test/src/testcases/os_sem_test_case_4.c | 18 +-
23 files changed, 488 insertions(+), 323 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/include/os/os_sched.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_sched.h b/kernel/os/include/os/os_sched.h
index 5f55a2d..df14ced 100644
--- a/kernel/os/include/os/os_sched.h
+++ b/kernel/os/include/os/os_sched.h
@@ -35,6 +35,7 @@ void os_sched_os_timer_exp(void);
os_error_t os_sched_insert(struct os_task *);
int os_sched_sleep(struct os_task *, os_time_t nticks);
int os_sched_wakeup(struct os_task *);
+int os_sched_suspend(struct os_task *);
void os_sched_resort(struct os_task *);
os_time_t os_sched_wakeup_ticks(os_time_t now);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/include/os/os_task.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_task.h b/kernel/os/include/os/os_task.h
index 04de257..3aa46d5 100644
--- a/kernel/os/include/os/os_task.h
+++ b/kernel/os/include/os/os_task.h
@@ -46,7 +46,8 @@ struct os_task_obj
/* Task states */
typedef enum os_task_state {
OS_TASK_READY = 1,
- OS_TASK_SLEEP = 2
+ OS_TASK_SLEEP = 2,
+ OS_TASK_SUSPEND = 3
} os_task_state_t;
/* Task flags */
@@ -95,6 +96,8 @@ struct os_task {
int os_task_init(struct os_task *, const char *, os_task_func_t, void *,
uint8_t, os_time_t, os_stack_t *, uint16_t);
+int os_task_suspend(struct os_task *t);
+
uint8_t os_task_count(void);
struct os_task_info {
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/src/os_sched.c
----------------------------------------------------------------------
diff --git a/kernel/os/src/os_sched.c b/kernel/os/src/os_sched.c
index 44ccd02..da90de1 100644
--- a/kernel/os/src/os_sched.c
+++ b/kernel/os/src/os_sched.c
@@ -194,6 +194,35 @@ os_sched_sleep(struct os_task *t, os_time_t nticks)
}
/**
+ * os sched suspend
+ *
+ * XXX
+ * NOTE - This routine is currently experimental and not ready for common use
+ *
+ * Stops a task and removes it from the run list
+ *
+ * @return int
+ *
+ * NOTE: must be called with interrupts disabled! This function does not call
+ * the scheduler
+ */
+int
+os_sched_suspend(struct os_task *t)
+{
+
+ if (t->t_state == OS_TASK_SLEEP) {
+ TAILQ_REMOVE(&g_os_sleep_list, t, t_os_list);
+ } else if (t->t_state == OS_TASK_READY) {
+ TAILQ_REMOVE(&g_os_run_list, t, t_os_list);
+ }
+ t->t_state = OS_TASK_SUSPEND;
+ t->t_next_wakeup = 0;
+ t->t_flags |= OS_TASK_FLAG_NO_TIMEOUT;
+
+ return OS_OK;
+}
+
+/**
* os sched wakeup
*
* Called to wake up a task. Waking up a task consists of setting the task state
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/src/os_task.c
----------------------------------------------------------------------
diff --git a/kernel/os/src/os_task.c b/kernel/os/src/os_task.c
index 9f7c2be..7254c8e 100644
--- a/kernel/os/src/os_task.c
+++ b/kernel/os/src/os_task.c
@@ -146,6 +146,40 @@ err:
return (rc);
}
+/*
+ * Suspend specified task
+ * XXX
+ * NOTE: This interface is currently experimental and not ready for common use
+ */
+int
+os_task_suspend(struct os_task *t)
+{
+ struct os_task *current;
+ int rc;
+ os_sr_t sr;
+
+ current = os_sched_get_current_task();
+ /*
+ * Can't suspend yourself
+ */
+ if (t->t_taskid == current->t_taskid) {
+ return OS_INVALID_PARM;
+ }
+
+ /*
+ * If state is not READY or SLEEP, assume task has not been initialized
+ */
+ if (t->t_state != OS_TASK_READY && t->t_state != OS_TASK_SLEEP)
+ {
+ return OS_NOT_STARTED;
+ }
+
+ OS_ENTER_CRITICAL(sr);
+ rc = os_sched_suspend(t);
+ OS_EXIT_CRITICAL(sr);
+ return rc;
+}
+
/**
* Iterate through tasks, and return the following information about them:
*
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/eventq_test.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/eventq_test.c b/kernel/os/test/src/eventq_test.c
index 5696645..01e8f3f 100644
--- a/kernel/os/test/src/eventq_test.c
+++ b/kernel/os/test/src/eventq_test.c
@@ -24,8 +24,6 @@
#include "os_test_priv.h"
#include "os/os_eventq.h"
-#define MY_STACK_SIZE (5120)
-#define POLL_STACK_SIZE (4096)
/* Task 1 sending task */
/* Define task stack and task object */
#define SEND_TASK_PRIO (1)
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/eventq_test.h
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/eventq_test.h b/kernel/os/test/src/eventq_test.h
index 14eeb83..7d9af3d 100644
--- a/kernel/os/test/src/eventq_test.h
+++ b/kernel/os/test/src/eventq_test.h
@@ -30,8 +30,14 @@
#extern "C" {
#endif
+#if MYNEWT_VAL(SELFTEST)
#define MY_STACK_SIZE (5120)
#define POLL_STACK_SIZE (4096)
+#else
+#define MY_STACK_SIZE (128)
+#define POLL_STACK_SIZE (32) /* for now */
+#endif
+
/* Task 1 sending task */
/* Define task stack and task object */
#define SEND_TASK_PRIO (1)
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/mempool_test.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/mempool_test.c b/kernel/os/test/src/mempool_test.c
index c5ab365..1f4d23a 100644
--- a/kernel/os/test/src/mempool_test.c
+++ b/kernel/os/test/src/mempool_test.c
@@ -22,13 +22,6 @@
#include "os/os.h"
#include "os_test_priv.h"
-/* Create a memory pool for testing */
-#define NUM_MEM_BLOCKS (10)
-#define MEM_BLOCK_SIZE (80)
-
-/* Limit max blocks for testing */
-#define MEMPOOL_TEST_MAX_BLOCKS (128)
-
#if OS_CFG_ALIGNMENT == OS_CFG_ALIGN_4
int alignment = 4;
#else
@@ -39,7 +32,8 @@ int alignment = 8;
struct os_mempool g_TstMempool;
/* Test memory pool buffer */
-os_membuf_t TstMembuf[OS_MEMPOOL_SIZE(NUM_MEM_BLOCKS, MEM_BLOCK_SIZE)];
+os_membuf_t *TstMembuf;
+uint32_t TstMembufSz;
/* Array of block pointers. */
void *block_array[MEMPOOL_TEST_MAX_BLOCKS];
@@ -61,152 +55,26 @@ mempool_test_get_pool_size(int num_blocks, int block_size)
}
void
-mempool_test(int num_blocks, int block_size)
+os_mempool_ts_pretest(void* arg)
{
- int cnt;
- int true_block_size;
- int mem_pool_size;
- uint32_t test_block;
- uint8_t *tstptr;
- void **free_ptr;
- void *block;
- os_error_t rc;
-
- /* Check for too many blocks */
- TEST_ASSERT(num_blocks <= MEMPOOL_TEST_MAX_BLOCKS);
-
- rc = os_mempool_init(&g_TstMempool, num_blocks, MEM_BLOCK_SIZE,
- &TstMembuf[0], "TestMemPool");
- TEST_ASSERT_FATAL(rc == 0, "Error creating memory pool %d", rc);
-
- TEST_ASSERT(g_TstMempool.mp_num_free == num_blocks,
- "Number of free blocks not equal to total blocks!");
-
- TEST_ASSERT(SLIST_FIRST(&g_TstMempool) == (void *)&TstMembuf[0],
- "Free list pointer does not point to first block!");
-
- mem_pool_size = mempool_test_get_pool_size(num_blocks, block_size);
- TEST_ASSERT(mem_pool_size == sizeof(TstMembuf),
- "Total memory pool size not correct! (%d vs %lu)",
- mem_pool_size, (unsigned long)sizeof(TstMembuf));
-
- /* Get the real block size */
-#if (OS_CFG_ALIGNMENT == OS_CFG_ALIGN_4)
- true_block_size = (g_TstMempool.mp_block_size + 3) & ~3;
-#else
- true_block_size = (g_TstMempool.mp_block_size + 7) & ~7;
-#endif
-
- /* Traverse free list. Better add up to number of blocks! */
- cnt = 0;
- free_ptr = (void **)&TstMembuf;
- tstptr = (uint8_t *)&TstMembuf;
- while (1) {
- /* Increment # of elements by 1 */
- ++cnt;
-
- /* If the free list is NULL, leave */
- if (*free_ptr == NULL) {
- break;
- }
-
- TEST_ASSERT(((uint8_t *)*free_ptr - (uint8_t *)free_ptr) ==
- true_block_size,
- "Free pointers are more than one block apart!");
-
- /* Move to next memory block */
- tstptr += true_block_size;
-
- TEST_ASSERT(*free_ptr == (void *)tstptr,
- "Error: free_ptr=%p testptr=%p\n", *free_ptr, tstptr);
-
- free_ptr = *free_ptr;
- }
-
- /* Last one in list better be NULL */
- TEST_ASSERT(cnt == g_TstMempool.mp_num_blocks,
- "Free list contains too many elements (%u)", cnt);
-
- /* Get a block */
- block = os_memblock_get(&g_TstMempool);
- TEST_ASSERT(block != NULL,
- "Error: get block fails when pool should have elements");
-
- TEST_ASSERT(g_TstMempool.mp_num_free == (num_blocks-1),
- "Number of free blocks incorrect (%u vs %u)",
- g_TstMempool.mp_num_free, (num_blocks-1));
-
- /* Put back the block */
- rc = os_memblock_put(&g_TstMempool, block);
- TEST_ASSERT(rc == 0, "Put block fails with error code=%d\n", rc);
-
- TEST_ASSERT(g_TstMempool.mp_num_free == num_blocks,
- "Number of free blocks incorrect (%u vs %u)",
- g_TstMempool.mp_num_free, num_blocks);
-
- /* remove all the blocks. Make sure we get count. */
- memset(block_array, 0, sizeof(block_array));
- cnt = 0;
- while (1) {
- block = os_memblock_get(&g_TstMempool);
- if (block == NULL) {
- break;
- }
- block_array[cnt] = block;
- ++cnt;
- if (cnt == MEMPOOL_TEST_MAX_BLOCKS) {
- break;
- }
- }
-
- TEST_ASSERT((cnt == g_TstMempool.mp_num_blocks) &&
- (cnt != MEMPOOL_TEST_MAX_BLOCKS),
- "Got more blocks than mempool contains (%d vs %d)",
- cnt, g_TstMempool.mp_num_blocks);
-
- /* Better be no free blocks left! */
- TEST_ASSERT(g_TstMempool.mp_num_free == 0,
- "Got all blocks but number free not zero! (%d)",
- g_TstMempool.mp_num_free);
-
- /* Now put them all back */
- for (cnt = 0; cnt < g_TstMempool.mp_num_blocks; ++cnt) {
- rc = os_memblock_put(&g_TstMempool, block_array[cnt]);
- TEST_ASSERT(rc == 0,
- "Error putting back block %p (cnt=%d err=%d)",
- block_array[cnt], cnt, rc);
- }
-
- /* Better be no free blocks left! */
- TEST_ASSERT(g_TstMempool.mp_num_free == g_TstMempool.mp_num_blocks,
- "Put all blocks but number free not equal to total!");
-
- /* Better get error when we try these things! */
- rc = os_memblock_put(NULL, block_array[0]);
- TEST_ASSERT(rc != 0,
- "Should have got an error trying to put to null pool");
-
- rc = os_memblock_put(&g_TstMempool, NULL);
- TEST_ASSERT(rc != 0, "No error trying to put to NULL block");
-
- TEST_ASSERT(os_memblock_get(NULL) == NULL,
- "No error trying to get a block from NULL pool");
+ sysinit();
+}
- /* Attempt to free a block outside the range of the membuf */
- test_block = g_TstMempool.mp_membuf_addr;
- test_block -= 4;
- rc = os_memblock_put(&g_TstMempool, (void *)test_block);
- TEST_ASSERT(rc == OS_INVALID_PARM, "No error freeing bad block address");
+void
+os_mempool_ts_posttest(void* arg)
+{
+ return;
+}
- test_block += (true_block_size * g_TstMempool.mp_num_blocks) + 100;
- rc = os_memblock_put(&g_TstMempool, (void *)test_block);
- TEST_ASSERT(rc == OS_INVALID_PARM, "No error freeing bad block address");
+void
+os_mempool_test_init(void *arg)
+{
+ TstMembufSz = (sizeof(os_membuf_t) *
+ OS_MEMPOOL_SIZE(NUM_MEM_BLOCKS, MEM_BLOCK_SIZE));
+ TstMembuf = malloc(TstMembufSz);
- /* Attempt to free on bad boundary */
- test_block = g_TstMempool.mp_membuf_addr;
- test_block += (true_block_size / 2);
- rc = os_memblock_put(&g_TstMempool, (void *)test_block);
- TEST_ASSERT(rc == OS_INVALID_PARM, "No error freeing bad block address");
+ tu_suite_set_pre_test_cb(os_mempool_ts_pretest, NULL);
+ tu_suite_set_post_test_cb(os_mempool_ts_posttest, NULL);
}
TEST_CASE_DECL(os_mempool_test_case)
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/mempool_test.h
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/mempool_test.h b/kernel/os/test/src/mempool_test.h
index 6f15e33..8a4d50a 100644
--- a/kernel/os/test/src/mempool_test.h
+++ b/kernel/os/test/src/mempool_test.h
@@ -29,12 +29,19 @@
#extern "C" {
#endif
+/* Limit max blocks for testing */
+#ifndef MEMPOOL_TEST_MAX_BLOCKS
+#define MEMPOOL_TEST_MAX_BLOCKS (128)
+#endif
+
/* Create a memory pool for testing */
-#define NUM_MEM_BLOCKS (10)
+#ifndef MEM_BLOCK_SIZE
#define MEM_BLOCK_SIZE (80)
+#endif
-/* Limit max blocks for testing */
-#define MEMPOOL_TEST_MAX_BLOCKS (128)
+#ifndef NUM_MEM_BLOCKS
+#define NUM_MEM_BLOCKS (10)
+#endif
extern int alignment;
@@ -42,7 +49,8 @@ extern int alignment;
extern struct os_mempool g_TstMempool;
/* Test memory pool buffer */
-extern os_membuf_t TstMembuf[OS_MEMPOOL_SIZE(NUM_MEM_BLOCKS, MEM_BLOCK_SIZE)];
+extern os_membuf_t *TstMembuf;
+extern uint32_t TstMembufSz;
/* Array of block pointers. */
extern void *block_array[MEMPOOL_TEST_MAX_BLOCKS];
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/mutex_test.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/mutex_test.c b/kernel/os/test/src/mutex_test.c
index c381cdd..8af567a 100644
--- a/kernel/os/test/src/mutex_test.c
+++ b/kernel/os/test/src/mutex_test.c
@@ -27,11 +27,24 @@
#include "os_test_priv.h"
#ifdef ARCH_sim
-#define MUTEX_TEST_STACK_SIZE 1024
-#else
-#define MUTEX_TEST_STACK_SIZE 256
+#define MUTEX_TEST_STACK_SIZE OS_STACK_ALIGN(1024)
#endif
+#if MYNEWT_VAL(SELFTEST)
+struct os_task task1;
+os_stack_t *stack1;
+
+struct os_task task2;
+os_stack_t *stack2;
+
+struct os_task task3;
+os_stack_t *stack3;
+
+struct os_task task4;
+os_stack_t *stack4;
+#endif /* MYNEWT_VAL(SELFTEST) */
+
+#if 0
struct os_task task14;
os_stack_t stack14[OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE)];
@@ -48,11 +61,12 @@ os_stack_t stack17[OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE)];
#define TASK15_PRIO (5)
#define TASK16_PRIO (6)
#define TASK17_PRIO (7)
+#endif
-volatile int g_task14_val;
-volatile int g_task15_val;
-volatile int g_task16_val;
-volatile int g_task17_val;
+volatile int g_task1_val;
+volatile int g_task2_val;
+volatile int g_task3_val;
+volatile int g_task4_val;
struct os_mutex g_mutex1;
struct os_mutex g_mutex2;
@@ -138,23 +152,23 @@ mutex_test_basic_handler(void *arg)
}
void
-mutex_test1_task14_handler(void *arg)
+mutex_test1_task1_handler(void *arg)
{
os_error_t err;
struct os_task *t;
int iters;
t = os_sched_get_current_task();
- TEST_ASSERT(t->t_func == mutex_test1_task14_handler);
+ TEST_ASSERT(t->t_func == mutex_test1_task1_handler);
for (iters = 0; iters < 3; iters++) {
os_time_delay(OS_TICKS_PER_SEC / 10);
- g_task14_val = 1;
+ g_task1_val = 1;
err = os_mutex_pend(&g_mutex1, OS_TICKS_PER_SEC / 10);
TEST_ASSERT(err == OS_OK);
- TEST_ASSERT(g_task16_val == 1);
+ TEST_ASSERT(g_task3_val == 1);
os_time_delay(OS_TICKS_PER_SEC / 10);
}
@@ -163,28 +177,28 @@ mutex_test1_task14_handler(void *arg)
}
void
-mutex_test2_task14_handler(void *arg)
+mutex_test2_task1_handler(void *arg)
{
os_error_t err;
struct os_task *t;
int iters;
t = os_sched_get_current_task();
- TEST_ASSERT(t->t_func == mutex_test2_task14_handler);
+ TEST_ASSERT(t->t_func == mutex_test2_task1_handler);
for (iters = 0; iters < 3; iters++) {
err = os_mutex_pend(&g_mutex1, 0);
TEST_ASSERT(err == OS_OK, "err=%d", err);
- g_task14_val = 1;
+ g_task1_val = 1;
os_time_delay(OS_TICKS_PER_SEC / 10);
/*
- * Task17 should have its mutex wait flag set; at least the first time
+ * Task4 should have its mutex wait flag set; at least the first time
* through!
*/
if (iters == 0) {
- TEST_ASSERT(task17.t_flags & OS_TASK_FLAG_MUTEX_WAIT);
+ TEST_ASSERT(task4.t_flags & OS_TASK_FLAG_MUTEX_WAIT);
}
if (g_mutex_test == 4) {
@@ -199,7 +213,7 @@ mutex_test2_task14_handler(void *arg)
}
void
-task15_handler(void *arg)
+mutex_task2_handler(void *arg)
{
os_error_t err;
struct os_task *t;
@@ -207,7 +221,7 @@ task15_handler(void *arg)
if (g_mutex_test == 1) {
while (1) {
t = os_sched_get_current_task();
- TEST_ASSERT(t->t_func == task15_handler);
+ TEST_ASSERT(t->t_func == mutex_task2_handler);
os_time_delay(OS_TICKS_PER_SEC / 20);
while (1) {
@@ -227,7 +241,7 @@ task15_handler(void *arg)
while (1) {
t = os_sched_get_current_task();
- TEST_ASSERT(t->t_func == task15_handler);
+ TEST_ASSERT(t->t_func == mutex_task2_handler);
err = os_mutex_pend(&g_mutex1, OS_TICKS_PER_SEC * 10);
if (g_mutex_test == 4) {
@@ -242,7 +256,7 @@ task15_handler(void *arg)
}
void
-task16_handler(void *arg)
+mutex_task3_handler(void *arg)
{
os_error_t err;
struct os_task *t;
@@ -250,17 +264,17 @@ task16_handler(void *arg)
if (g_mutex_test == 1) {
while (1) {
t = os_sched_get_current_task();
- TEST_ASSERT(t->t_func == task16_handler);
+ TEST_ASSERT(t->t_func == mutex_task3_handler);
/* Get mutex 1 */
err = os_mutex_pend(&g_mutex1, OS_TIMEOUT_NEVER);
TEST_ASSERT(err == OS_OK);
- while (g_task14_val != 1) {
+ while (g_task1_val != 1) {
/* Wait till task 1 wakes up and sets val. */
}
- g_task16_val = 1;
+ g_task3_val = 1;
err = os_mutex_release(&g_mutex1);
TEST_ASSERT(err == OS_OK);
@@ -278,7 +292,7 @@ task16_handler(void *arg)
while (1) {
t = os_sched_get_current_task();
- TEST_ASSERT(t->t_func == task16_handler);
+ TEST_ASSERT(t->t_func == mutex_task3_handler);
err = os_mutex_pend(&g_mutex1, OS_TICKS_PER_SEC * 10);
if (g_mutex_test == 4) {
@@ -298,14 +312,14 @@ task16_handler(void *arg)
}
void
-task17_handler(void *arg)
+mutex_task4_handler(void *arg)
{
os_error_t err;
struct os_task *t;
while (1) {
t = os_sched_get_current_task();
- TEST_ASSERT(t->t_func == task17_handler);
+ TEST_ASSERT(t->t_func == mutex_task4_handler);
if (g_mutex_test == 5) {
err = os_mutex_pend(&g_mutex1, OS_TICKS_PER_SEC / 10);
@@ -329,6 +343,36 @@ task17_handler(void *arg)
}
}
+void
+os_mutex_ts_pretest(void* arg)
+{
+ sysinit();
+}
+
+void
+os_mutex_ts_posttest(void* arg)
+{
+ return;
+}
+
+void
+os_mutex_test_init(void *arg)
+{
+#if MYNEWT_VAL(SELFTEST)
+ stack1 = malloc(sizeof(os_stack_t) * MUTEX_TEST_STACK_SIZE);
+ assert(stack1);
+ stack2 = malloc(sizeof(os_stack_t) * MUTEX_TEST_STACK_SIZE);
+ assert(stack2);
+ stack3 = malloc(sizeof(os_stack_t) * MUTEX_TEST_STACK_SIZE);
+ assert(stack3);
+ stack4 = malloc(sizeof(os_stack_t) * MUTEX_TEST_STACK_SIZE);
+ assert(stack4);
+#endif
+
+ tu_suite_set_pre_test_cb(os_mutex_ts_pretest, NULL);
+ tu_suite_set_post_test_cb(os_mutex_ts_posttest, NULL);
+}
+
TEST_CASE_DECL(os_mutex_test_basic)
TEST_CASE_DECL(os_mutex_test_case_1)
TEST_CASE_DECL(os_mutex_test_case_2)
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/mutex_test.h
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/mutex_test.h b/kernel/os/test/src/mutex_test.h
index de2fb2f..f32231c 100644
--- a/kernel/os/test/src/mutex_test.h
+++ b/kernel/os/test/src/mutex_test.h
@@ -33,43 +33,20 @@
#extern "C" {
#endif
-#ifdef ARCH_sim
-#define MUTEX_TEST_STACK_SIZE 1024
-#else
-#define MUTEX_TEST_STACK_SIZE 256
-#endif
-
-extern struct os_task task14;
-extern os_stack_t stack14[OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE)];
-
-extern struct os_task task15;
-extern os_stack_t stack15[OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE)];
-
-extern struct os_task task16;
-extern os_stack_t stack16[OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE)];
-
-extern struct os_task task17;
-extern os_stack_t stack17[OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE)];
-
-#define TASK14_PRIO (4)
-#define TASK15_PRIO (5)
-#define TASK16_PRIO (6)
-#define TASK17_PRIO (7)
-
-extern volatile int g_task14_val;
-extern volatile int g_task15_val;
-extern volatile int g_task16_val;
-extern volatile int g_task17_val;
+extern volatile int g_task1_val;
+extern volatile int g_task2_val;
+extern volatile int g_task3_val;
+extern volatile int g_task4_val;
extern struct os_mutex g_mutex1;
extern struct os_mutex g_mutex2;
extern volatile int g_mutex_test;
void mutex_test_basic_handler(void *arg);
-void mutex_test1_task14_handler(void *arg);
-void mutex_test2_task14_handler(void *arg);
-void task15_handler(void *arg);
-void task16_handler(void *arg);
-void task17_handler(void *arg);
+void mutex_test1_task1_handler(void *arg);
+void mutex_test2_task1_handler(void *arg);
+void mutex_task2_handler(void *arg);
+void mutex_task3_handler(void *arg);
+void mutex_task4_handler(void *arg);
#ifdef __cplusplus
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/os_test.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/os_test.c b/kernel/os/test/src/os_test.c
index 1e817a7..c8e1b14 100644
--- a/kernel/os/test/src/os_test.c
+++ b/kernel/os/test/src/os_test.c
@@ -30,10 +30,11 @@
#include <sys/time.h>
#include "os/os.h"
+#if MYNEWT_VAL(SELFTEST) /* these parameters only work in a native env */
+
void
os_test_restart(void)
{
-#if MYNEWT_VAL(SELFTEST)
struct sigaction sa;
struct itimerval it;
int rc;
@@ -52,26 +53,38 @@ os_test_restart(void)
perror("Cannot set itimer");
abort();
}
-#endif /* MYNEWT_VAL(SELFTEST) */
- tu_restart();
+#if MYNEWT_VAL(SELFTEST)
+ tu_restart();
+#endif
}
+extern void os_mempool_test_init(void *arg);
+extern void os_sem_test_init(void *arg);
+extern void os_mutex_test_init(void *arg);
+
int
os_test_all(void)
{
+
+ tu_suite_set_init_cb(os_mempool_test_init, NULL);
os_mempool_test_suite();
+
+ tu_suite_set_init_cb(os_mutex_test_init, NULL);
os_mutex_test_suite();
+
+ tu_suite_set_init_cb(os_sem_test_init, NULL);
os_sem_test_suite();
+
os_mbuf_test_suite();
+
os_eventq_test_suite();
+
os_callout_test_suite();
return tu_case_failed;
}
-#if MYNEWT_VAL(SELFTEST)
-
int
main(int argc, char **argv)
{
@@ -83,5 +96,10 @@ main(int argc, char **argv)
return tu_any_failed;
}
-
+#else
+void
+os_test_restart(void)
+{
+ return;
+}
#endif
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/os_test_priv.h
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/os_test_priv.h b/kernel/os/test/src/os_test_priv.h
index 1f74a53..dc676ff 100644
--- a/kernel/os/test/src/os_test_priv.h
+++ b/kernel/os/test/src/os_test_priv.h
@@ -37,6 +37,25 @@
extern "C" {
#endif
+/*
+ * shared amongst all os tests
+ */
+extern struct os_task task1;
+extern os_stack_t *stack1;
+#define TASK1_PRIO (20)
+
+extern struct os_task task2;
+extern os_stack_t *stack2;
+#define TASK2_PRIO (21)
+
+extern struct os_task task3;
+extern os_stack_t *stack3;
+#define TASK3_PRIO (22)
+
+extern struct os_task task4;
+extern os_stack_t *stack4;
+#define TASK4_PRIO (23)
+
void os_test_restart(void);
int os_mempool_test_suite(void);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/sem_test.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/sem_test.c b/kernel/os/test/src/sem_test.c
index 8f3b163..6745a24 100644
--- a/kernel/os/test/src/sem_test.c
+++ b/kernel/os/test/src/sem_test.c
@@ -23,29 +23,22 @@
#include "os/os.h"
#include "os_test_priv.h"
+#if MYNEWT_VAL(SELFTEST)
#ifdef ARCH_sim
-#define SEM_TEST_STACK_SIZE 1024
-#else
-#define SEM_TEST_STACK_SIZE 512
+#define SEM_TEST_STACK_SIZE OS_STACK_ALIGN(1024)
#endif
-#if MYNEWT_VAL(SELFTEST)
struct os_task task1;
-os_stack_t stack1[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
+os_stack_t *stack1;
struct os_task task2;
-os_stack_t stack2[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
+os_stack_t *stack2;
struct os_task task3;
-os_stack_t stack3[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
+os_stack_t *stack3;
struct os_task task4;
-os_stack_t stack4[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
-
-#define TASK1_PRIO (1)
-#define TASK2_PRIO (2)
-#define TASK3_PRIO (3)
-#define TASK4_PRIO (4)
+os_stack_t *stack4;
#endif /* MYNEWT_VAL(SELFTEST) */
struct os_sem g_sem1;
@@ -59,7 +52,6 @@ struct os_sem g_sem1;
* order, get the semaphore, then release it and go back to sleep.
*
*/
-
char sem_test_buf[128];
/**
@@ -96,7 +88,9 @@ sem_test_sleep_task_handler(void *arg)
TEST_ASSERT(t->t_func == sem_test_sleep_task_handler);
os_time_delay(2 * OS_TICKS_PER_SEC);
+#if MYNEWT_VAL(SELFTEST)
os_test_restart();
+#endif
}
void
@@ -148,7 +142,8 @@ sem_test_basic_handler(void *arg)
TEST_ASSERT(sem->sem_tokens == 0 && SLIST_EMPTY(&sem->sem_head),
"Semaphore internals wrong after getting semaphore\n"
"%s\n"
- "Task: task=%p prio=%u", sem_test_sem_to_s(sem), t, t->t_prio);
+ "Task: task=%p prio=%u", sem_test_sem_to_s(sem),
+ t, t->t_prio);
/* Get the semaphore again; should fail */
err = os_sem_pend(sem, 0);
@@ -186,7 +181,9 @@ sem_test_basic_handler(void *arg)
"Task: task=%p prio=%u\n", sem_test_sem_to_s(sem), t,
t->t_prio);
+#if MYNEWT_VAL(SELFTEST)
os_test_restart();
+#endif
}
void
@@ -200,7 +197,6 @@ sem_test_1_task1_handler(void *arg)
t = os_sched_get_current_task();
TEST_ASSERT(t->t_func == sem_test_1_task1_handler);
-
err = os_sem_pend(&g_sem1, 0);
TEST_ASSERT(err == OS_OK);
@@ -215,13 +211,16 @@ sem_test_1_task1_handler(void *arg)
os_time_delay(OS_TICKS_PER_SEC / 10);
}
+#if MYNEWT_VAL(SELFTEST)
os_test_restart();
+#endif
}
void
sem_test_1_task2_handler(void *arg)
{
- sem_test_pend_release_loop(0, OS_TICKS_PER_SEC / 10, OS_TICKS_PER_SEC / 10);
+ sem_test_pend_release_loop(0, OS_TICKS_PER_SEC / 10,
+ OS_TICKS_PER_SEC / 10);
}
void
@@ -284,6 +283,36 @@ sem_test_4_task4_handler(void *arg)
sem_test_pend_release_loop(0, 2000, 2000);
}
+void
+os_sem_ts_pretest(void* arg)
+{
+ sysinit();
+}
+
+void
+os_sem_ts_posttest(void* arg)
+{
+ return;
+}
+
+void
+os_sem_test_init(void *arg)
+{
+#if MYNEWT_VAL(SELFTEST)
+ stack1 = malloc(sizeof(os_stack_t) * SEM_TEST_STACK_SIZE);
+ assert(stack1);
+ stack2 = malloc(sizeof(os_stack_t) * SEM_TEST_STACK_SIZE);
+ assert(stack2);
+ stack3 = malloc(sizeof(os_stack_t) * SEM_TEST_STACK_SIZE);
+ assert(stack3);
+ stack4 = malloc(sizeof(os_stack_t) * SEM_TEST_STACK_SIZE);
+ assert(stack4);
+#endif
+
+ tu_suite_set_pre_test_cb(os_sem_ts_pretest, NULL);
+ tu_suite_set_post_test_cb(os_sem_ts_posttest, NULL);
+}
+
TEST_CASE_DECL(os_sem_test_basic)
TEST_CASE_DECL(os_sem_test_case_1)
TEST_CASE_DECL(os_sem_test_case_2)
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/sem_test.h
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/sem_test.h b/kernel/os/test/src/sem_test.h
index 7327277..1d0bf09 100644
--- a/kernel/os/test/src/sem_test.h
+++ b/kernel/os/test/src/sem_test.h
@@ -30,29 +30,6 @@
#extern "C" {
#endif
-#ifdef ARCH_sim
-#define SEM_TEST_STACK_SIZE 1024
-#else
-#define SEM_TEST_STACK_SIZE 512
-#endif
-
-extern struct os_task task1;
-extern os_stack_t stack1[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
-
-extern struct os_task task2;
-extern os_stack_t stack2[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
-
-extern struct os_task task3;
-extern os_stack_t stack3[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
-
-extern struct os_task task4;
-extern os_stack_t stack4[OS_STACK_ALIGN(SEM_TEST_STACK_SIZE)];
-
-#define TASK1_PRIO (1)
-#define TASK2_PRIO (2)
-#define TASK3_PRIO (3)
-#define TASK4_PRIO (4)
-
extern struct os_sem g_sem1;
const char *sem_test_sem_to_s(const struct os_sem *sem);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_mempool_test_case.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_mempool_test_case.c b/kernel/os/test/src/testcases/os_mempool_test_case.c
index 8e5d02a..f9e8ab2 100644
--- a/kernel/os/test/src/testcases/os_mempool_test_case.c
+++ b/kernel/os/test/src/testcases/os_mempool_test_case.c
@@ -25,6 +25,156 @@
*
* @return int
*/
+void
+mempool_test(int num_blocks, int block_size)
+{
+ int cnt;
+ int true_block_size;
+ int mem_pool_size;
+ uint32_t test_block;
+ uint8_t *tstptr;
+ void **free_ptr;
+ void *block;
+ os_error_t rc;
+
+ /* Check for too many blocks */
+ TEST_ASSERT(num_blocks <= MEMPOOL_TEST_MAX_BLOCKS);
+
+ rc = os_mempool_init(&g_TstMempool, num_blocks, MEM_BLOCK_SIZE,
+ &TstMembuf[0], "TestMemPool");
+ TEST_ASSERT_FATAL(rc == 0, "Error creating memory pool %d", rc);
+
+ TEST_ASSERT(g_TstMempool.mp_num_free == num_blocks,
+ "Number of free blocks not equal to total blocks!");
+
+ TEST_ASSERT(SLIST_FIRST(&g_TstMempool) == (void *)&TstMembuf[0],
+ "Free list pointer does not point to first block!");
+
+ mem_pool_size = mempool_test_get_pool_size(num_blocks, block_size);
+ TEST_ASSERT(mem_pool_size == TstMembufSz,
+ "Total memory pool size not correct! (%d vs %lu)",
+ mem_pool_size, (unsigned long)TstMembufSz);
+
+ /* Get the real block size */
+#if (OS_CFG_ALIGNMENT == OS_CFG_ALIGN_4)
+ true_block_size = (g_TstMempool.mp_block_size + 3) & ~3;
+#else
+ true_block_size = (g_TstMempool.mp_block_size + 7) & ~7;
+#endif
+
+ /* Traverse free list. Better add up to number of blocks! */
+ cnt = 0;
+ free_ptr = (void **)TstMembuf;
+ tstptr = (uint8_t *)TstMembuf;
+ while (1) {
+ /* Increment # of elements by 1 */
+ ++cnt;
+
+ /* If the free list is NULL, leave */
+ if (*free_ptr == NULL) {
+ break;
+ }
+
+ TEST_ASSERT(((uint8_t *)*free_ptr - (uint8_t *)free_ptr) ==
+ true_block_size,
+ "Free pointers are more than one block apart!");
+
+ /* Move to next memory block */
+ tstptr += true_block_size;
+
+ TEST_ASSERT(*free_ptr == (void *)tstptr,
+ "Error: free_ptr=%p testptr=%p\n", *free_ptr, tstptr);
+
+ free_ptr = *free_ptr;
+ }
+
+ /* Last one in list better be NULL */
+ TEST_ASSERT(cnt == g_TstMempool.mp_num_blocks,
+ "Free list contains too many elements (%u/%u)",
+ cnt, g_TstMempool.mp_num_blocks);
+
+ /* Get a block */
+ block = os_memblock_get(&g_TstMempool);
+ TEST_ASSERT(block != NULL,
+ "Error: get block fails when pool should have elements");
+
+ TEST_ASSERT(g_TstMempool.mp_num_free == (num_blocks-1),
+ "Number of free blocks incorrect (%u vs %u)",
+ g_TstMempool.mp_num_free, (num_blocks-1));
+
+ /* Put back the block */
+ rc = os_memblock_put(&g_TstMempool, block);
+ TEST_ASSERT(rc == 0, "Put block fails with error code=%d\n", rc);
+
+ TEST_ASSERT(g_TstMempool.mp_num_free == num_blocks,
+ "Number of free blocks incorrect (%u vs %u)",
+ g_TstMempool.mp_num_free, num_blocks);
+
+ /* remove all the blocks. Make sure we get count. */
+ memset(block_array, 0, sizeof(block_array));
+ cnt = 0;
+ while (1) {
+ block = os_memblock_get(&g_TstMempool);
+ if (block == NULL) {
+ break;
+ }
+ block_array[cnt] = block;
+ ++cnt;
+ if (cnt == MEMPOOL_TEST_MAX_BLOCKS) {
+ break;
+ }
+ }
+
+ TEST_ASSERT((cnt == g_TstMempool.mp_num_blocks) &&
+ (cnt != MEMPOOL_TEST_MAX_BLOCKS),
+ "Got more blocks than mempool contains (%d vs %d)",
+ cnt, g_TstMempool.mp_num_blocks);
+
+ /* Better be no free blocks left! */
+ TEST_ASSERT(g_TstMempool.mp_num_free == 0,
+ "Got all blocks but number free not zero! (%d)",
+ g_TstMempool.mp_num_free);
+
+ /* Now put them all back */
+ for (cnt = 0; cnt < g_TstMempool.mp_num_blocks; ++cnt) {
+ rc = os_memblock_put(&g_TstMempool, block_array[cnt]);
+ TEST_ASSERT(rc == 0,
+ "Error putting back block %p (cnt=%d err=%d)",
+ block_array[cnt], cnt, rc);
+ }
+
+ /* Better be no free blocks left! */
+ TEST_ASSERT(g_TstMempool.mp_num_free == g_TstMempool.mp_num_blocks,
+ "Put all blocks but number free not equal to total!");
+
+ /* Better get error when we try these things! */
+ rc = os_memblock_put(NULL, block_array[0]);
+ TEST_ASSERT(rc != 0,
+ "Should have got an error trying to put to null pool");
+
+ rc = os_memblock_put(&g_TstMempool, NULL);
+ TEST_ASSERT(rc != 0, "No error trying to put to NULL block");
+
+ TEST_ASSERT(os_memblock_get(NULL) == NULL,
+ "No error trying to get a block from NULL pool");
+
+ /* Attempt to free a block outside the range of the membuf */
+ test_block = g_TstMempool.mp_membuf_addr;
+ test_block -= 4;
+ rc = os_memblock_put(&g_TstMempool, (void *)test_block);
+ TEST_ASSERT(rc == OS_INVALID_PARM, "No error freeing bad block address");
+
+ test_block += (true_block_size * g_TstMempool.mp_num_blocks) + 100;
+ rc = os_memblock_put(&g_TstMempool, (void *)test_block);
+ TEST_ASSERT(rc == OS_INVALID_PARM, "No error freeing bad block address");
+
+ /* Attempt to free on bad boundary */
+ test_block = g_TstMempool.mp_membuf_addr;
+ test_block += (true_block_size / 2);
+ rc = os_memblock_put(&g_TstMempool, (void *)test_block);
+ TEST_ASSERT(rc == OS_INVALID_PARM, "No error freeing bad block address");
+}
+
TEST_CASE(os_mempool_test_case)
{
mempool_test(NUM_MEM_BLOCKS, MEM_BLOCK_SIZE);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_mutex_test_basic.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_mutex_test_basic.c b/kernel/os/test/src/testcases/os_mutex_test_basic.c
index 3098893..2f76d89 100644
--- a/kernel/os/test/src/testcases/os_mutex_test_basic.c
+++ b/kernel/os/test/src/testcases/os_mutex_test_basic.c
@@ -20,13 +20,13 @@
TEST_CASE(os_mutex_test_basic)
{
- sysinit();
os_mutex_init(&g_mutex1);
- os_task_init(&task14, "task14", mutex_test_basic_handler, NULL,
- TASK14_PRIO, OS_WAIT_FOREVER, stack14,
- OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task1, "task1", mutex_test_basic_handler, NULL,
+ TASK1_PRIO, OS_WAIT_FOREVER, stack1, sizeof(stack1));
+#if MYNEWT_VAL(SELFTEST)
os_start();
+#endif
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_mutex_test_case_1.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_mutex_test_case_1.c b/kernel/os/test/src/testcases/os_mutex_test_case_1.c
index f3cdf0f..30a8b6c 100644
--- a/kernel/os/test/src/testcases/os_mutex_test_case_1.c
+++ b/kernel/os/test/src/testcases/os_mutex_test_case_1.c
@@ -22,27 +22,24 @@ TEST_CASE(os_mutex_test_case_1)
{
int rc;
- sysinit();
-
g_mutex_test = 1;
- g_task14_val = 0;
- g_task15_val = 0;
- g_task16_val = 0;
+ g_task1_val = 0;
+ g_task2_val = 0;
+ g_task3_val = 0;
rc = os_mutex_init(&g_mutex1);
TEST_ASSERT(rc == 0);
rc = os_mutex_init(&g_mutex2);
TEST_ASSERT(rc == 0);
- os_task_init(&task14, "task14", mutex_test1_task14_handler, NULL,
- TASK14_PRIO, OS_WAIT_FOREVER, stack14,
- OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task1, "task1", mutex_test1_task1_handler, NULL,
+ TASK1_PRIO, OS_WAIT_FOREVER, stack1, sizeof(stack1));
- os_task_init(&task15, "task15", task15_handler, NULL, TASK15_PRIO,
- OS_WAIT_FOREVER, stack15, OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task2, "task2", mutex_task2_handler, NULL, TASK2_PRIO,
+ OS_WAIT_FOREVER, stack2, sizeof(stack2));
- os_task_init(&task16, "task16", task16_handler, NULL, TASK16_PRIO,
- OS_WAIT_FOREVER, stack16, OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task3, "task3", mutex_task3_handler, NULL, TASK3_PRIO,
+ OS_WAIT_FOREVER, stack3, sizeof(stack3));
os_start();
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_mutex_test_case_2.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_mutex_test_case_2.c b/kernel/os/test/src/testcases/os_mutex_test_case_2.c
index 62129b0..eb321bf 100644
--- a/kernel/os/test/src/testcases/os_mutex_test_case_2.c
+++ b/kernel/os/test/src/testcases/os_mutex_test_case_2.c
@@ -23,24 +23,23 @@ TEST_CASE(os_mutex_test_case_2)
sysinit();
g_mutex_test = 2;
- g_task14_val = 0;
- g_task15_val = 0;
- g_task16_val = 0;
+ g_task1_val = 0;
+ g_task2_val = 0;
+ g_task3_val = 0;
os_mutex_init(&g_mutex1);
os_mutex_init(&g_mutex2);
- os_task_init(&task14, "task14", mutex_test2_task14_handler, NULL,
- TASK14_PRIO, OS_WAIT_FOREVER, stack14,
- OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task1, "task1", mutex_test2_task1_handler, NULL,
+ TASK1_PRIO, OS_WAIT_FOREVER, stack1, sizeof(stack1));
- os_task_init(&task15, "task15", task15_handler, NULL, TASK15_PRIO,
- OS_WAIT_FOREVER, stack15, OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task2, "task2", mutex_task2_handler, NULL, TASK2_PRIO,
+ OS_WAIT_FOREVER, stack2, sizeof(stack2));
- os_task_init(&task16, "task16", task16_handler, NULL, TASK16_PRIO,
- OS_WAIT_FOREVER, stack16, OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task3, "task3", mutex_task3_handler, NULL, TASK3_PRIO,
+ OS_WAIT_FOREVER, stack3, sizeof(stack3));
- os_task_init(&task17, "task17", task17_handler, NULL, TASK17_PRIO,
- OS_WAIT_FOREVER, stack17, OS_STACK_ALIGN(MUTEX_TEST_STACK_SIZE));
+ os_task_init(&task4, "task4", mutex_task4_handler, NULL, TASK4_PRIO,
+ OS_WAIT_FOREVER, stack4, sizeof(stack4));
os_start();
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_sem_test_basic.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_sem_test_basic.c b/kernel/os/test/src/testcases/os_sem_test_basic.c
index d3af5d2..2cdc9a1 100644
--- a/kernel/os/test/src/testcases/os_sem_test_basic.c
+++ b/kernel/os/test/src/testcases/os_sem_test_basic.c
@@ -22,13 +22,14 @@ TEST_CASE(os_sem_test_basic)
{
os_error_t err;
- sysinit();
-
err = os_sem_init(&g_sem1, 1);
TEST_ASSERT(err == OS_OK);
- os_task_init(&task1, "task1", sem_test_basic_handler, NULL, TASK1_PRIO,
- OS_WAIT_FOREVER, stack1, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task1, "task1", sem_test_basic_handler, NULL,
+ TASK1_PRIO, OS_WAIT_FOREVER, stack1,
+ sizeof(stack1));
+#if MYNEWT_VAL(SELFTEST)
os_start();
+#endif
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_sem_test_case_1.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_sem_test_case_1.c b/kernel/os/test/src/testcases/os_sem_test_case_1.c
index b84b950..6d603a9 100644
--- a/kernel/os/test/src/testcases/os_sem_test_case_1.c
+++ b/kernel/os/test/src/testcases/os_sem_test_case_1.c
@@ -22,21 +22,22 @@ TEST_CASE(os_sem_test_case_1)
{
os_error_t err;
- sysinit();
-
err = os_sem_init(&g_sem1, 1);
TEST_ASSERT(err == OS_OK);
os_task_init(&task1, "task1", sem_test_1_task1_handler, NULL,
TASK1_PRIO, OS_WAIT_FOREVER, stack1,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack1));
os_task_init(&task2, "task2", sem_test_1_task2_handler, NULL,
TASK2_PRIO, OS_WAIT_FOREVER, stack2,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack2));
- os_task_init(&task3, "task3", sem_test_1_task3_handler, NULL, TASK3_PRIO,
- OS_WAIT_FOREVER, stack3, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task3, "task3", sem_test_1_task3_handler, NULL,
+ TASK3_PRIO, OS_WAIT_FOREVER, stack3,
+ sizeof(stack3));
+#if MYNEWT_VAL(SELFTEST)
os_start();
+#endif
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_sem_test_case_2.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_sem_test_case_2.c b/kernel/os/test/src/testcases/os_sem_test_case_2.c
index e862b7c..e25f6ef 100644
--- a/kernel/os/test/src/testcases/os_sem_test_case_2.c
+++ b/kernel/os/test/src/testcases/os_sem_test_case_2.c
@@ -22,24 +22,26 @@ TEST_CASE(os_sem_test_case_2)
{
os_error_t err;
- sysinit();
-
err = os_sem_init(&g_sem1, 1);
TEST_ASSERT(err == OS_OK);
os_task_init(&task1, "task1", sem_test_sleep_task_handler, NULL,
TASK1_PRIO, OS_WAIT_FOREVER, stack1,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack1));
os_task_init(&task2, "task2", sem_test_2_task2_handler, NULL,
TASK2_PRIO, OS_WAIT_FOREVER, stack2,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack2));
- os_task_init(&task3, "task3", sem_test_2_task3_handler, NULL, TASK3_PRIO,
- OS_WAIT_FOREVER, stack3, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task3, "task3", sem_test_2_task3_handler, NULL,
+ TASK3_PRIO, OS_WAIT_FOREVER, stack3,
+ sizeof(stack3));
- os_task_init(&task4, "task4", sem_test_2_task4_handler, NULL, TASK4_PRIO,
- OS_WAIT_FOREVER, stack4, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task4, "task4", sem_test_2_task4_handler, NULL,
+ TASK4_PRIO, OS_WAIT_FOREVER, stack4,
+ sizeof(stack4));
+#if MYNEWT_VAL(SELFTEST)
os_start();
+#endif
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_sem_test_case_3.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_sem_test_case_3.c b/kernel/os/test/src/testcases/os_sem_test_case_3.c
index 7e367c6..2dc3dbe 100644
--- a/kernel/os/test/src/testcases/os_sem_test_case_3.c
+++ b/kernel/os/test/src/testcases/os_sem_test_case_3.c
@@ -22,24 +22,26 @@ TEST_CASE(os_sem_test_case_3)
{
os_error_t err;
- sysinit();
-
err = os_sem_init(&g_sem1, 1);
TEST_ASSERT(err == OS_OK);
os_task_init(&task1, "task1", sem_test_sleep_task_handler, NULL,
TASK1_PRIO, OS_WAIT_FOREVER, stack1,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack1));
os_task_init(&task2, "task2", sem_test_3_task2_handler, NULL,
TASK2_PRIO, OS_WAIT_FOREVER, stack2,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack2));
- os_task_init(&task3, "task3", sem_test_3_task3_handler, NULL, TASK3_PRIO,
- OS_WAIT_FOREVER, stack3, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task3, "task3", sem_test_3_task3_handler, NULL,
+ TASK3_PRIO, OS_WAIT_FOREVER, stack3,
+ sizeof(stack3));
- os_task_init(&task4, "task4", sem_test_3_task4_handler, NULL, TASK4_PRIO,
- OS_WAIT_FOREVER, stack4, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task4, "task4", sem_test_3_task4_handler, NULL,
+ TASK4_PRIO, OS_WAIT_FOREVER, stack4,
+ sizeof(stack4));
+#if MYNEWT_VAL(SELFTEST)
os_start();
+#endif
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bd6933cd/kernel/os/test/src/testcases/os_sem_test_case_4.c
----------------------------------------------------------------------
diff --git a/kernel/os/test/src/testcases/os_sem_test_case_4.c b/kernel/os/test/src/testcases/os_sem_test_case_4.c
index e0827e2..a9f32de 100644
--- a/kernel/os/test/src/testcases/os_sem_test_case_4.c
+++ b/kernel/os/test/src/testcases/os_sem_test_case_4.c
@@ -22,24 +22,26 @@ TEST_CASE(os_sem_test_case_4)
{
os_error_t err;
- sysinit();
-
err = os_sem_init(&g_sem1, 1);
TEST_ASSERT(err == OS_OK);
os_task_init(&task1, "task1", sem_test_sleep_task_handler, NULL,
TASK1_PRIO, OS_WAIT_FOREVER, stack1,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack1));
os_task_init(&task2, "task2", sem_test_4_task2_handler, NULL,
TASK2_PRIO, OS_WAIT_FOREVER, stack2,
- OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ sizeof(stack2));
- os_task_init(&task3, "task3", sem_test_4_task3_handler, NULL, TASK3_PRIO,
- OS_WAIT_FOREVER, stack3, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task3, "task3", sem_test_4_task3_handler, NULL,
+ TASK3_PRIO, OS_WAIT_FOREVER, stack3,
+ sizeof(stack3));
- os_task_init(&task4, "task4", sem_test_4_task4_handler, NULL, TASK4_PRIO,
- OS_WAIT_FOREVER, stack4, OS_STACK_ALIGN(SEM_TEST_STACK_SIZE));
+ os_task_init(&task4, "task4", sem_test_4_task4_handler, NULL,
+ TASK4_PRIO, OS_WAIT_FOREVER, stack4,
+ sizeof(stack4));
+#if MYNEWT_VAL(SELFTEST)
os_start();
+#endif
}
[33/50] [abbrv] incubator-mynewt-core git commit: Modify comments for
hal_i2c.h to match current API.
Posted by cc...@apache.org.
Modify comments for hal_i2c.h to match current API.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/83129d43
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/83129d43
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/83129d43
Branch: refs/heads/master
Commit: 83129d438fb4c5419db150b8eb690d5659e4cf6f
Parents: c61985b
Author: William San Filippo <wi...@runtime.io>
Authored: Wed Nov 9 10:51:04 2016 -0800
Committer: William San Filippo <wi...@runtime.io>
Committed: Wed Nov 9 10:51:04 2016 -0800
----------------------------------------------------------------------
hw/hal/include/hal/hal_i2c.h | 41 ++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/83129d43/hw/hal/include/hal/hal_i2c.h
----------------------------------------------------------------------
diff --git a/hw/hal/include/hal/hal_i2c.h b/hw/hal/include/hal/hal_i2c.h
index b244c01..9e8d8d9 100644
--- a/hw/hal/include/hal/hal_i2c.h
+++ b/hw/hal/include/hal/hal_i2c.h
@@ -34,17 +34,24 @@ extern "C" {
*
* Typical usage of this API is as follows:
*
- * Initialize an i2c device with
+ * Initialize an i2c device with:
* hal_i2c_init()
*
- * When you with to perform an i2c transaction, issue
- * hal_i2c_master_begin()l
- * followed by the transaction. For example, in an I2C memory access access
- * you might write and address and then read back data
- * hal_i2c_write(); -- write amemory ddress to device
- * hal_i2c_read(); --- read back data
- * then end the transaction
- * hal_i2c_end();
+ * When you wish to perform an i2c transaction, you call one or both of:
+ * hal_i2c_master_write();
+ * hal_i2c_master_read();
+ *
+ * These functions will issue a START condition, followed by the device's
+ * 7-bit I2C address, and then send or receive the payload based on the data
+ * provided. This will cause a repeated start on the bus, which is valid in
+ * I2C specification, and the decision to use repeated starts was made to
+ * simplify the I2C HAL. To set the STOP condition at an appropriate moment,
+ * you set the `last_op` field to a `1` in either function.
+ *
+ * For example, in an I2C memory access you might write a register address and
+ * then read data back via:
+ * hal_i2c_write(); -- write to a specific register on the device
+ * hal_i2c_read(); --- read back data, setting 'last_op' to '1'
*/
/**
@@ -52,10 +59,10 @@ extern "C" {
*/
struct hal_i2c_master_data {
uint8_t address; /* destination address */
- /* a I2C address has 7 bits. In the protocol these
+ /* An I2C address has 7 bits. In the protocol these
* 7 bits are combined with a 1 bit R/W bit to specify read
* or write operation in an 8-bit address field sent to
- * the remote device . This API accepts the 7-bit
+ * the remote device. This API accepts the 7-bit
* address as its argument in the 7 LSBs of the
* address field above. For example if I2C was
* writing a 0x81 in its protocol, you would pass
@@ -76,9 +83,8 @@ struct hal_i2c_master_data {
int hal_i2c_init(uint8_t i2c_num, void *cfg);
/**
- * Sends a start condition and writes <len> bytes of data on the i2c.
- * This API assumes that you have already called hal_i2c_master_begin
- * It will fail if you have not. This API does NOT issue a stop condition.
+ * Sends a start condition and writes <len> bytes of data on the i2c bus.
+ * This API does NOT issue a stop condition unless `last_op` is set to `1`.
* You must stop the bus after successful or unsuccessful write attempts.
* This API is blocking until an error or NaK occurs. Timeout is platform
* dependent.
@@ -95,9 +101,8 @@ int hal_i2c_master_write(uint8_t i2c_num, struct hal_i2c_master_data *pdata,
uint32_t timeout, uint8_t last_op);
/**
- * Sends a start condition and reads <len> bytes of data on the i2c.
- * This API assumes that you have already called hal_i2c_master_begin
- * It will fail if you have not. This API does NOT issue a stop condition.
+ * Sends a start condition and reads <len> bytes of data on the i2c bus.
+ * This API does NOT issue a stop condition unless `last_op` is set to `1`.
* You must stop the bus after successful or unsuccessful write attempts.
* This API is blocking until an error or NaK occurs. Timeout is platform
* dependent.
@@ -116,7 +121,7 @@ int hal_i2c_master_read(uint8_t i2c_num, struct hal_i2c_master_data *pdata,
/**
* Probes the i2c bus for a device with this address. THIS API
* issues a start condition, probes the address using a read
- * command and issues a stop condition. There is no need to call
+ * command and issues a stop condition.
* hal_i2c_master_begin/end with this method.
*
* @param i2c_num The number of the I2C to probe
[50/50] [abbrv] incubator-mynewt-core git commit: sysinit - Fix
custom panic function.
Posted by cc...@apache.org.
sysinit - Fix custom panic function.
There were two issues associated with specifying a custom panic function
in sysinit's syscfg:
1. The custom function never got used; the macro check to determine if a
custom function has been specified was wrong.
2. It was tedious to ensure a prototype for the custom panic function
had been declared wherever SYSINIT_PANIC() gets called. Now, a
prototype is automatically declared by SYSINIT_PANIC().
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8694d49e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8694d49e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8694d49e
Branch: refs/heads/master
Commit: 8694d49e83a63c5daf400bc9411dd020012c61a2
Parents: c28fbdd
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Nov 10 14:21:03 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Nov 10 14:21:03 2016 -0800
----------------------------------------------------------------------
sys/sysinit/include/sysinit/sysinit.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8694d49e/sys/sysinit/include/sysinit/sysinit.h
----------------------------------------------------------------------
diff --git a/sys/sysinit/include/sysinit/sysinit.h b/sys/sysinit/include/sysinit/sysinit.h
index f28a259..e7a5d11 100644
--- a/sys/sysinit/include/sysinit/sysinit.h
+++ b/sys/sysinit/include/sysinit/sysinit.h
@@ -33,10 +33,11 @@ extern "C" {
typedef void sysinit_panic_fn(const char *file, int line);
-#if !MYNEWT_VAL(SYSINIT_PANIC_FN)
+#ifndef MYNEWT_VAL_SYSINIT_PANIC_FN
#include <assert.h>
#define SYSINIT_PANIC() assert(0)
#else
+void MYNEWT_VAL(SYSINIT_PANIC_FN)(const char *file, int line);
#define SYSINIT_PANIC() MYNEWT_VAL(SYSINIT_PANIC_FN)(__FILE__, __LINE__)
#endif
[26/50] [abbrv] incubator-mynewt-core git commit: BLE TPS service -
use sysinit.
Posted by cc...@apache.org.
BLE TPS service - use sysinit.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/58d6bcd1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/58d6bcd1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/58d6bcd1
Branch: refs/heads/master
Commit: 58d6bcd13c5e57741be1db292de012b5c92daa7a
Parents: 5663384
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 8 14:46:40 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 14:46:40 2016 -0800
----------------------------------------------------------------------
.../services/tps/include/services/tps/ble_svc_tps.h | 2 +-
net/nimble/host/services/tps/pkg.yml | 2 ++
net/nimble/host/services/tps/src/ble_svc_tps.c | 16 +++++-----------
3 files changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/58d6bcd1/net/nimble/host/services/tps/include/services/tps/ble_svc_tps.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/tps/include/services/tps/ble_svc_tps.h b/net/nimble/host/services/tps/include/services/tps/ble_svc_tps.h
index c1797ae..ec4cd79 100644
--- a/net/nimble/host/services/tps/include/services/tps/ble_svc_tps.h
+++ b/net/nimble/host/services/tps/include/services/tps/ble_svc_tps.h
@@ -25,7 +25,7 @@ struct ble_hs_cfg;
#define BLE_SVC_TPS_UUID16 0x1804
#define BLE_SVC_TPS_CHR_UUID16_TX_POWER_LEVEL 0x2a07
-int ble_svc_tps_init(struct ble_hs_cfg *cfg);
+void ble_svc_tps_init(void);
#endif
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/58d6bcd1/net/nimble/host/services/tps/pkg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/tps/pkg.yml b/net/nimble/host/services/tps/pkg.yml
index 45d85b6..17b2b87 100644
--- a/net/nimble/host/services/tps/pkg.yml
+++ b/net/nimble/host/services/tps/pkg.yml
@@ -30,3 +30,5 @@ pkg.keywords:
pkg.deps:
- net/nimble/host
+pkg.init_function: ble_svc_tps_init
+pkg.init_stage: 3
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/58d6bcd1/net/nimble/host/services/tps/src/ble_svc_tps.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/tps/src/ble_svc_tps.c b/net/nimble/host/services/tps/src/ble_svc_tps.c
index 3f241b0..2351a79 100644
--- a/net/nimble/host/services/tps/src/ble_svc_tps.c
+++ b/net/nimble/host/services/tps/src/ble_svc_tps.c
@@ -21,7 +21,6 @@
#include <string.h>
#include "host/ble_hs.h"
#include "services/tps/ble_svc_tps.h"
-#include "../../../src/ble_hci_priv.h"
int8_t ble_svc_tps_tx_power_level;
@@ -80,19 +79,14 @@ ble_svc_tps_access(uint16_t conn_handle, uint16_t attr_handle,
/**
* Initialize the TPS
*/
-int
-ble_svc_tps_init(struct ble_hs_cfg *cfg)
+void
+ble_svc_tps_init(void)
{
int rc;
+
rc = ble_gatts_count_cfg(ble_svc_tps_defs, cfg);
- if (rc != 0) {
- return rc;
- }
+ SYSINIT_PANIC_ASSERT(rc == 0);
rc = ble_gatts_add_svcs(ble_svc_tps_defs);
- if (rc != 0) {
- return rc;
- }
-
- return 0;
+ SYSINIT_PANIC_ASSERT(rc == 0);
}
[30/50] [abbrv] incubator-mynewt-core git commit: imgmgr;
fix use of incorrect cbor encoder.
Posted by cc...@apache.org.
imgmgr; fix use of incorrect cbor encoder.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/41e4670a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/41e4670a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/41e4670a
Branch: refs/heads/master
Commit: 41e4670a896ce2087e4e5ae1354dc40c74a0e4ce
Parents: 39a34a2
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 23:27:50 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 23:27:50 2016 -0800
----------------------------------------------------------------------
mgmt/imgmgr/src/imgmgr_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/41e4670a/mgmt/imgmgr/src/imgmgr_state.c
----------------------------------------------------------------------
diff --git a/mgmt/imgmgr/src/imgmgr_state.c b/mgmt/imgmgr/src/imgmgr_state.c
index d3adf39..99bcb31 100644
--- a/mgmt/imgmgr/src/imgmgr_state.c
+++ b/mgmt/imgmgr/src/imgmgr_state.c
@@ -248,7 +248,7 @@ imgmgr_state_read(struct mgmt_cbuf *cb)
g_err |= cbor_encoder_create_map(&images, &image, CborIndefiniteLength);
g_err |= cbor_encode_text_stringz(&image, "slot");
- g_err |= cbor_encode_int(&rsp, i);
+ g_err |= cbor_encode_int(&image, i);
g_err |= cbor_encode_text_stringz(&image, "version");
imgr_ver_str(&ver, vers_str);
[34/50] [abbrv] incubator-mynewt-core git commit: nrf51-blenano - Use
OpenOCD's cmsis-dap.cfg; not ours.
Posted by cc...@apache.org.
nrf51-blenano - Use OpenOCD's cmsis-dap.cfg; not ours.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/f5c99806
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/f5c99806
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/f5c99806
Branch: refs/heads/master
Commit: f5c998062f7bec8075ae06f6c94a13fd179d50e5
Parents: c63a083
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 14:08:48 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 14:45:49 2016 -0800
----------------------------------------------------------------------
hw/bsp/nrf51-blenano/cmsis-dap.cfg | 12 ------------
hw/bsp/nrf51-blenano/nrf51dk_debug.sh | 2 +-
hw/bsp/nrf51-blenano/nrf51dk_download.sh | 2 +-
3 files changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f5c99806/hw/bsp/nrf51-blenano/cmsis-dap.cfg
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/cmsis-dap.cfg b/hw/bsp/nrf51-blenano/cmsis-dap.cfg
deleted file mode 100644
index 7251280..0000000
--- a/hw/bsp/nrf51-blenano/cmsis-dap.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# ARM CMSIS-DAP compliant adapter
-#
-# http://www.keil.com/support/man/docs/dapdebug/
-#
-
-interface cmsis-dap
-
-#set WORKAREASIZE 0x2000
-
-# Optionally specify the serial number of CMSIS-DAP usb device.
-#cmsis_dap_serial 02200201E6661E601B98E3B9
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f5c99806/hw/bsp/nrf51-blenano/nrf51dk_debug.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/nrf51dk_debug.sh b/hw/bsp/nrf51-blenano/nrf51dk_debug.sh
index 4ca9760..10e8408 100755
--- a/hw/bsp/nrf51-blenano/nrf51dk_debug.sh
+++ b/hw/bsp/nrf51-blenano/nrf51dk_debug.sh
@@ -30,7 +30,7 @@
. $CORE_PATH/hw/scripts/openocd.sh
FILE_NAME=$BIN_BASENAME.elf
-CFG="-s $BSP_PATH -f cmsis-dap.cfg -f nrf51.cfg"
+CFG="-f interface/cmsis-dap.cfg -f target/nrf51.cfg"
EXTRA_JTAG_CMD="$EXTRA_JTAG_CMD; nrf51.cpu configure -event gdb-detach {resume;shutdown}"
openocd_debug
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f5c99806/hw/bsp/nrf51-blenano/nrf51dk_download.sh
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/nrf51dk_download.sh b/hw/bsp/nrf51-blenano/nrf51dk_download.sh
index af3f7bd..1f1d5de 100755
--- a/hw/bsp/nrf51-blenano/nrf51dk_download.sh
+++ b/hw/bsp/nrf51-blenano/nrf51dk_download.sh
@@ -31,7 +31,7 @@
. $CORE_PATH/hw/scripts/openocd.sh
-CFG="-s $BSP_PATH -f cmsis-dap.cfg -f nrf51.cfg"
+CFG="-f interface/cmsis-dap.cfg -f target/nrf51.cfg"
if [ "$MFG_IMAGE" ]; then
FLASH_OFFSET=0
[05/50] [abbrv] incubator-mynewt-core git commit: MYNEWT-475: BSP
Cleanup
Posted by cc...@apache.org.
MYNEWT-475: BSP Cleanup
The startup .s files need to be in an architecture specifc directory.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/acd26632
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/acd26632
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/acd26632
Branch: refs/heads/master
Commit: acd26632d21d23ccee5c85052c71bc1996eebf76
Parents: ca2dc54
Author: William San Filippo <wi...@runtime.io>
Authored: Mon Nov 7 08:31:59 2016 -0800
Committer: William San Filippo <wi...@runtime.io>
Committed: Mon Nov 7 08:32:27 2016 -0800
----------------------------------------------------------------------
.../src/arch/cortex_m0/gcc_startup_nrf51.s | 270 +++++++++++++++++++
.../arch/cortex_m0/gcc_startup_nrf51_split.s | 166 ++++++++++++
hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51.s | 270 -------------------
.../nrf51xxx/src/gcc_startup_nrf51_split.s | 166 ------------
4 files changed, 436 insertions(+), 436 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/acd26632/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s b/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s
new file mode 100755
index 0000000..fbc88bd
--- /dev/null
+++ b/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s
@@ -0,0 +1,270 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long _NMI_Handler /* NMI Handler */
+ .long _HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _PendSV_Handler /* PendSV Handler */
+ .long _SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long _POWER_CLOCK_IRQHandler
+ .long _RADIO_IRQHandler
+ .long _UART0_IRQHandler
+ .long _SPI0_TWI0_IRQHandler
+ .long _SPI1_TWI1_IRQHandler
+ .long 0 /*Reserved */
+ .long _GPIOTE_IRQHandler
+ .long ADC_IRQHandler
+ .long _TIMER0_IRQHandler
+ .long _TIMER1_IRQHandler
+ .long _TIMER2_IRQHandler
+ .long _RTC0_IRQHandler
+ .long _TEMP_IRQHandler
+ .long _RNG_IRQHandler
+ .long _ECB_IRQHandler
+ .long _CCM_AAR_IRQHandler
+ .long _WDT_IRQHandler
+ .long _RTC1_IRQHandler
+ .long _QDEC_IRQHandler
+ .long _LPCOMP_IRQHandler
+ .long _SWI0_IRQHandler
+ .long _SWI1_IRQHandler
+ .long _SWI2_IRQHandler
+ .long _SWI3_IRQHandler
+ .long _SWI4_IRQHandler
+ .long _SWI5_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+/* Default handler. This uses the vector in the relocated vector table */
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ LDR R2, =__vector_tbl_reloc__
+ MRS R0, PSR
+ MOVS R1, #0x3F
+ ANDS R0, R1
+ LSLS R0, R0, #2
+ LDR R0, [R0, R2]
+ BX R0
+ .size Default_Handler, . - Default_Handler
+
+/*
+ * All of the following IRQ Handlers will point to the default handler unless
+ * they are defined elsewhere.
+ */
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ _NMI_Handler
+ IRQ _HardFault_Handler
+ IRQ _SVC_Handler
+ IRQ _PendSV_Handler
+ IRQ _SysTick_Handler
+ IRQ _POWER_CLOCK_IRQHandler
+ IRQ _RADIO_IRQHandler
+ IRQ _UART0_IRQHandler
+ IRQ _SPI0_TWI0_IRQHandler
+ IRQ _SPI1_TWI1_IRQHandler
+ IRQ _GPIOTE_IRQHandler
+ IRQ ADC_IRQHandler
+ IRQ _TIMER0_IRQHandler
+ IRQ _TIMER1_IRQHandler
+ IRQ _TIMER2_IRQHandler
+ IRQ _RTC0_IRQHandler
+ IRQ _TEMP_IRQHandler
+ IRQ _RNG_IRQHandler
+ IRQ _ECB_IRQHandler
+ IRQ _CCM_AAR_IRQHandler
+ IRQ _WDT_IRQHandler
+ IRQ _RTC1_IRQHandler
+ IRQ _QDEC_IRQHandler
+ IRQ _LPCOMP_IRQHandler
+ IRQ _SWI0_IRQHandler
+ IRQ _SWI1_IRQHandler
+ IRQ _SWI2_IRQHandler
+ IRQ _SWI3_IRQHandler
+ IRQ _SWI4_IRQHandler
+ IRQ _SWI5_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/acd26632/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s b/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s
new file mode 100755
index 0000000..ed5f207
--- /dev/null
+++ b/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s
@@ -0,0 +1,166 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/acd26632/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51.s b/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51.s
deleted file mode 100755
index fbc88bd..0000000
--- a/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51.s
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv6-m
-
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector
- .align 2
- .globl __isr_vector
-__isr_vector:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler /* Reset Handler */
- .long _NMI_Handler /* NMI Handler */
- .long _HardFault_Handler /* Hard Fault Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long _SVC_Handler /* SVCall Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long _PendSV_Handler /* PendSV Handler */
- .long _SysTick_Handler /* SysTick Handler */
-
- /* External Interrupts */
- .long _POWER_CLOCK_IRQHandler
- .long _RADIO_IRQHandler
- .long _UART0_IRQHandler
- .long _SPI0_TWI0_IRQHandler
- .long _SPI1_TWI1_IRQHandler
- .long 0 /*Reserved */
- .long _GPIOTE_IRQHandler
- .long ADC_IRQHandler
- .long _TIMER0_IRQHandler
- .long _TIMER1_IRQHandler
- .long _TIMER2_IRQHandler
- .long _RTC0_IRQHandler
- .long _TEMP_IRQHandler
- .long _RNG_IRQHandler
- .long _ECB_IRQHandler
- .long _CCM_AAR_IRQHandler
- .long _WDT_IRQHandler
- .long _RTC1_IRQHandler
- .long _QDEC_IRQHandler
- .long _LPCOMP_IRQHandler
- .long _SWI0_IRQHandler
- .long _SWI1_IRQHandler
- .long _SWI2_IRQHandler
- .long _SWI3_IRQHandler
- .long _SWI4_IRQHandler
- .long _SWI5_IRQHandler
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
-
- .size __isr_vector, . - __isr_vector
-
-/* Reset Handler */
-
- .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
- .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
- .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler
- .type Reset_Handler, %function
-Reset_Handler:
- .fnstart
-
-/* Make sure ALL RAM banks are powered on */
- MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
-
- LDR R0, =NRF_POWER_RAMON_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
- LDR R0, =NRF_POWER_RAMONB_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-.LC0:
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler,.-Reset_Handler
-
- .section ".text"
-
-
-/* Dummy Exception Handlers (infinite loops which can be modified) */
-
- .weak NMI_Handler
- .type NMI_Handler, %function
-NMI_Handler:
- B .
- .size NMI_Handler, . - NMI_Handler
-
- .weak SVC_Handler
- .type SVC_Handler, %function
-SVC_Handler:
- B .
- .size SVC_Handler, . - SVC_Handler
-
-
- .weak PendSV_Handler
- .type PendSV_Handler, %function
-PendSV_Handler:
- B .
- .size PendSV_Handler, . - PendSV_Handler
-
-
- .weak SysTick_Handler
- .type SysTick_Handler, %function
-SysTick_Handler:
- B .
- .size SysTick_Handler, . - SysTick_Handler
-
-/* Default handler. This uses the vector in the relocated vector table */
- .globl Default_Handler
- .type Default_Handler, %function
-Default_Handler:
- LDR R2, =__vector_tbl_reloc__
- MRS R0, PSR
- MOVS R1, #0x3F
- ANDS R0, R1
- LSLS R0, R0, #2
- LDR R0, [R0, R2]
- BX R0
- .size Default_Handler, . - Default_Handler
-
-/*
- * All of the following IRQ Handlers will point to the default handler unless
- * they are defined elsewhere.
- */
- .macro IRQ handler
- .weak \handler
- .set \handler, Default_Handler
- .endm
-
- IRQ _NMI_Handler
- IRQ _HardFault_Handler
- IRQ _SVC_Handler
- IRQ _PendSV_Handler
- IRQ _SysTick_Handler
- IRQ _POWER_CLOCK_IRQHandler
- IRQ _RADIO_IRQHandler
- IRQ _UART0_IRQHandler
- IRQ _SPI0_TWI0_IRQHandler
- IRQ _SPI1_TWI1_IRQHandler
- IRQ _GPIOTE_IRQHandler
- IRQ ADC_IRQHandler
- IRQ _TIMER0_IRQHandler
- IRQ _TIMER1_IRQHandler
- IRQ _TIMER2_IRQHandler
- IRQ _RTC0_IRQHandler
- IRQ _TEMP_IRQHandler
- IRQ _RNG_IRQHandler
- IRQ _ECB_IRQHandler
- IRQ _CCM_AAR_IRQHandler
- IRQ _WDT_IRQHandler
- IRQ _RTC1_IRQHandler
- IRQ _QDEC_IRQHandler
- IRQ _LPCOMP_IRQHandler
- IRQ _SWI0_IRQHandler
- IRQ _SWI1_IRQHandler
- IRQ _SWI2_IRQHandler
- IRQ _SWI3_IRQHandler
- IRQ _SWI4_IRQHandler
- IRQ _SWI5_IRQHandler
-
- .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/acd26632/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51_split.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51_split.s b/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51_split.s
deleted file mode 100755
index ed5f207..0000000
--- a/hw/mcu/nordic/nrf51xxx/src/gcc_startup_nrf51_split.s
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv6-m
-
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector_split
- .align 2
- .globl __isr_vector_split
-__isr_vector_split:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler_split /* Reset Handler */
-
- .size __isr_vector_split, . - __isr_vector_split
-
-/* Reset Handler */
-
- .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
- .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
- .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler_split
- .type Reset_Handler_split, %function
-Reset_Handler_split:
- .fnstart
-
-/* Make sure ALL RAM banks are powered on */
- MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
-
- LDR R0, =NRF_POWER_RAMON_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
- LDR R0, =NRF_POWER_RAMONB_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-.LC0:
- ldr r1, =__etext_loader
- ldr r2, =__data_start___loader
- ldr r3, =__data_end___loader
-
- subs r3, r2
- ble .LC2
-
-.LC3:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC3
-.LC2:
-
- subs r0, r0
- ldr r2, =__bss_start___loader
- ldr r3, =__bss_end___loader
-
- subs r3, r2
- ble .LC4
-
-.LC5:
- subs r3, 4
- str r0, [r2,r3]
- bgt .LC5
-.LC4:
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler_split,.-Reset_Handler_split
-
- .section ".text"
-
- .end
[08/50] [abbrv] incubator-mynewt-core git commit: oicmgr;
update to use the new os_eventq() stuff
Posted by cc...@apache.org.
oicmgr; update to use the new os_eventq() stuff
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/1b1a1e75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/1b1a1e75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/1b1a1e75
Branch: refs/heads/master
Commit: 1b1a1e7598e475d17564bd1444dd4e6a8ed68ed4
Parents: da398bd
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 7 14:21:38 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 7 14:21:38 2016 -0800
----------------------------------------------------------------------
mgmt/oicmgr/src/oicmgr.c | 62 ++++++++++++++-----------------------------
1 file changed, 20 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/1b1a1e75/mgmt/oicmgr/src/oicmgr.c
----------------------------------------------------------------------
diff --git a/mgmt/oicmgr/src/oicmgr.c b/mgmt/oicmgr/src/oicmgr.c
index eccec6b..32562d9 100644
--- a/mgmt/oicmgr/src/oicmgr.c
+++ b/mgmt/oicmgr/src/oicmgr.c
@@ -29,10 +29,6 @@
#include <mgmt/mgmt.h>
#include <nmgr_os/nmgr_os.h>
-#if (MYNEWT_VAL(OC_TRANSPORT_GATT) == 1)
-#include "host/ble_hs.h"
-#endif
-
#include <cborattr/cborattr.h>
#include <tinycbor/cbor.h>
#include <tinycbor/cbor_buf_writer.h>
@@ -45,22 +41,18 @@ struct omgr_cbuf {
};
struct omgr_state {
- struct os_eventq os_evq;
- struct os_event os_oc_event;
+ struct os_eventq *os_evq;
+ struct os_event os_event;
struct os_callout os_oc_timer;
struct os_task os_task;
struct omgr_cbuf os_cbuf; /* CBOR buffer for NMGR task */
};
static void omgr_event_start(struct os_event *ev);
-static void omgr_event_oc_ev(struct os_event *ev);
+static void omgr_process_oc_event(struct os_event *ev);
static struct omgr_state omgr_state = {
- .os_oc_event.ev_cb = omgr_event_oc_ev,
-};
-
-static struct os_event omgr_ev_start = {
- .ev_cb = omgr_event_start,
+ .os_event.ev_cb = omgr_event_start,
};
static void omgr_oic_get(oc_request_t *request, oc_interface_mask_t interface);
@@ -69,18 +61,17 @@ static void omgr_oic_put(oc_request_t *request, oc_interface_mask_t interface);
struct os_eventq *
mgmt_evq_get(void)
{
- os_eventq_ensure(&omgr_state.os_evq;, NULL);
- return &omgr_state.os_evq;
+ return omgr_state.os_evq;
}
void
-omgr_evq_set(struct os_eventq *evq)
+mgmt_evq_set(struct os_eventq *evq)
{
- os_eventq_designate(&omgr_state.os_evq, evq, NULL);
+ os_eventq_designate(&omgr_state.os_evq, evq, &omgr_state.os_event);
}
static const struct mgmt_handler *
-omgr_oic_find_handler(const char *q, int qlen)
+omgr_find_handler(const char *q, int qlen)
{
char id_str[8];
int grp = -1;
@@ -123,7 +114,7 @@ omgr_oic_op(oc_request_t *req, oc_interface_mask_t mask, int isset)
goto bad_req;
}
- handler = omgr_oic_find_handler(req->query, req->query_len);
+ handler = omgr_find_handler(req->query, req->query_len);
if (!handler) {
goto bad_req;
}
@@ -234,52 +225,39 @@ oc_signal_main_loop(void)
{
struct omgr_state *o = &omgr_state;
- os_childq_put(&o->os_cq, &o->os_oc_event);
+ assert(o->os_evq); /* Must call mgmt_evq_set() first. */
+ os_eventq_put(o->os_evq, &o->os_event);
}
static void
-omgr_oic_process_oc_event(struct os_event *ev)
+omgr_process_oc_event(struct os_event *ev)
{
struct omgr_state *o = &omgr_state;
os_time_t next_event;
-#if MYNEWT_VAL(OC_TRANSPORT_GATT)
- int rc;
-
- rc = ble_hs_start();
- assert(rc == 0);
-#endif
next_event = oc_main_poll();
if (next_event) {
- os_callout_reset(&o->os_oc_timer.cf_c, next_event - os_time_get());
+ os_callout_reset(&o->os_oc_timer, next_event - os_time_get());
} else {
- os_callout_stop(&o->os_oc_timer.cf_c);
+ os_callout_stop(&o->os_oc_timer);
}
}
static void
-omgr_oic_event_start(struct os_event *ev)
-{
- oc_main_init((oc_handler_t *)&omgr_oc_handler);
- os_callout_init(&omgr_state.os_oc_timer, mgmt_evq_get(),
- omgr_oic_process_oc_event, NULL);
-}
-
-static void
-omgr_oic_event_oc_ev(struct os_event *ev)
+omgr_event_start(struct os_event *ev)
{
- omgr_oic_process_oc_event(NULL);
+ struct omgr_state *o = &omgr_state;
+ os_eventq_ensure(&o->os_evq, NULL);
+ o->os_event.ev_cb = omgr_process_oc_event;
+ os_callout_init(&o->os_oc_timer, mgmt_evq_get(), omgr_process_oc_event,
+ NULL);
}
int
oicmgr_init(void)
{
- struct omgr_state *o = &omgr_state;
int rc;
- os_childq_init(&o->os_cq);
- o->os_cq.cq_ev_cb = omgr_oic_handle_event;
-
rc = nmgr_os_groups_register();
if (rc != 0) {
goto err;
[11/50] [abbrv] incubator-mynewt-core git commit: inet_def_service;
fix build
Posted by cc...@apache.org.
inet_def_service; fix build
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/06c02a55
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/06c02a55
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/06c02a55
Branch: refs/heads/master
Commit: 06c02a55d1771da3e193e18de503a9f831c5c2d0
Parents: b982aad
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 7 16:12:50 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 7 16:12:50 2016 -0800
----------------------------------------------------------------------
.../include/inet_def_service/inet_def_service.h | 3 +--
net/ip/inet_def_service/src/inet_def_service.c | 13 ++++---------
2 files changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/06c02a55/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
----------------------------------------------------------------------
diff --git a/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h b/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
index eae144c..b78547a 100644
--- a/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
+++ b/net/ip/inet_def_service/include/inet_def_service/inet_def_service.h
@@ -26,8 +26,7 @@ extern "C" {
struct os_eventq;
-void inet_def_evq_set(struct os_eventq *evq);
-void inet_def_service_init(void);
+void inet_def_service_init(struct os_eventq *evq);
#ifdef __cplusplus
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/06c02a55/net/ip/inet_def_service/src/inet_def_service.c
----------------------------------------------------------------------
diff --git a/net/ip/inet_def_service/src/inet_def_service.c b/net/ip/inet_def_service/src/inet_def_service.c
index 5e082e5..f5fc037 100644
--- a/net/ip/inet_def_service/src/inet_def_service.c
+++ b/net/ip/inet_def_service/src/inet_def_service.c
@@ -102,16 +102,9 @@ static struct inet_def {
static struct os_eventq *
inet_def_evq_get(void)
{
- os_eventq_ensure(&inet_def_evq, inet_def_event_start);
return inet_def_evq;
}
-void
-inet_def_evq_set(struct os_eventq *evq)
-{
- os_eventq_designate(&inet_def_evq, evq, inet_def_event_start);
-}
-
/*
* UDP socket callbacks. Called in context of IP stack task.
*/
@@ -375,7 +368,7 @@ inet_def_event_chargen(struct os_event *ev)
}
static void
-inet_def_event_start(struct os_event *ev)
+inet_def_event_start(void)
{
inet_def_create_srv(INET_DEF_ECHO, ECHO_PORT);
inet_def_create_srv(INET_DEF_DISCARD, DISCARD_PORT);
@@ -383,8 +376,10 @@ inet_def_event_start(struct os_event *ev)
}
void
-inet_def_service_init(void)
+inet_def_service_init(struct os_eventq *evq)
{
+ inet_def_evq = evq;
+ os_eventq_ensure(&inet_def_evq, NULL);
SLIST_INIT(&inet_def.tcp_conns);
}
[37/50] [abbrv] incubator-mynewt-core git commit: BSPs - Change rel.
paths to be rooted at repo dir.
Posted by cc...@apache.org.
BSPs - Change rel. paths to be rooted at repo dir.
This commit accounts for the behavior change introduced in
dd34193d3c31c5d87161343f160981fb8833c23f in the newt repo.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/a982ff62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/a982ff62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/a982ff62
Branch: refs/heads/master
Commit: a982ff62a62952d66bc255a2317e31afb5de7076
Parents: f5c9980
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 14:44:41 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 14:45:49 2016 -0800
----------------------------------------------------------------------
hw/bsp/arduino_primo_nrf52/bsp.yml | 14 +++++++-------
hw/bsp/bmd300eval/bsp.yml | 12 ++++++------
hw/bsp/frdm-k64f/bsp.yml | 8 ++++----
hw/bsp/native/bsp.yml | 2 +-
hw/bsp/nrf51-arduino_101/bsp.yml | 12 ++++++------
hw/bsp/nrf51-blenano/bsp.yml | 12 ++++++------
hw/bsp/nrf51dk-16kbram/bsp.yml | 12 ++++++------
hw/bsp/nrf51dk/bsp.yml | 12 ++++++------
hw/bsp/nrf52dk/bsp.yml | 12 ++++++------
hw/bsp/nucleo-f401re/bsp.yml | 12 ++++++------
hw/bsp/olimex_stm32-e407_devboard/bsp.yml | 12 ++++++------
hw/bsp/rb-nano2/bsp.yml | 12 ++++++------
hw/bsp/stm32f4discovery/bsp.yml | 12 ++++++------
13 files changed, 72 insertions(+), 72 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/arduino_primo_nrf52/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/bsp.yml b/hw/bsp/arduino_primo_nrf52/bsp.yml
index e5d2f2a..a24479b 100644
--- a/hw/bsp/arduino_primo_nrf52/bsp.yml
+++ b/hw/bsp/arduino_primo_nrf52/bsp.yml
@@ -20,14 +20,14 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- - "nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+ - "hw/bsp/arduino_primo_nrf52/nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
-bsp.part2linkerscript: "split-primo.ld"
-bsp.downloadscript: primo_download.sh
-bsp.debugscript: primo_debug.sh
+ - "hw/bsp/arduino_primo_nrf52/boot-nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
+bsp.part2linkerscript: "hw/bsp/arduino_primo_nrf52/split-primo.ld"
+bsp.downloadscript: "hw/bsp/arduino_primo_nrf52/primo_download.sh"
+bsp.debugscript: "hw/bsp/arduino_primo_nrf52/primo_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/bmd300eval/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/bsp.yml b/hw/bsp/bmd300eval/bsp.yml
index 8a39786..98b1927 100644
--- a/hw/bsp/bmd300eval/bsp.yml
+++ b/hw/bsp/bmd300eval/bsp.yml
@@ -20,14 +20,14 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- - "nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+ - "hw/bsp/bmd300eval/nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+ - "hw/bsp/bmd300eval/boot-nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.part2linkerscript: "split-bmd300eval.ld"
-bsp.downloadscript: bmd300eval_download.sh
-bsp.debugscript: bmd300eval_debug.sh
+bsp.downloadscript: "hw/bsp/bmd300eval/bmd300eval_download.sh"
+bsp.debugscript: "hw/bsp/bmd300eval/bmd300eval_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/frdm-k64f/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/frdm-k64f/bsp.yml b/hw/bsp/frdm-k64f/bsp.yml
index 10ed8e7..e1ef7d6 100644
--- a/hw/bsp/frdm-k64f/bsp.yml
+++ b/hw/bsp/frdm-k64f/bsp.yml
@@ -19,10 +19,10 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "MK64FN1M0xxx12_flash.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-MK64FN1M0xxx12_flash.ld"
-bsp.downloadscript: frdm-k64_download.sh
-bsp.debugscript: frdm-k64_debug.sh
+bsp.linkerscript: "hw/bsp/frdm-k64f/MK64FN1M0xxx12_flash.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE: "hw/bsp/frdm-k64f/boot-MK64FN1M0xxx12_flash.ld"
+bsp.downloadscript: "hw/bsp/frdm-k64f/frdm-k64_download.sh"
+bsp.debugscript: "hw/bsp/frdm-k64f/frdm-k64_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/native/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/native/bsp.yml b/hw/bsp/native/bsp.yml
index 30ca687..4311cf7 100644
--- a/hw/bsp/native/bsp.yml
+++ b/hw/bsp/native/bsp.yml
@@ -19,7 +19,7 @@
bsp.arch: sim
bsp.compiler: compiler/sim
-bsp.debugscript: "native_debug.sh"
+bsp.debugscript: "hw/bsp/native/native_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/nrf51-arduino_101/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/bsp.yml b/hw/bsp/nrf51-arduino_101/bsp.yml
index 73c23bb..00ecf5c 100644
--- a/hw/bsp/nrf51-arduino_101/bsp.yml
+++ b/hw/bsp/nrf51-arduino_101/bsp.yml
@@ -20,13 +20,13 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
bsp.linkerscript:
- - "nrf51xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+ - "hw/bsp/nrf51-arduino_101/nrf51xxaa.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf51xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
-bsp.downloadscript: nrf51dk-16kbram_download.sh
-bsp.debugscript: nrf51dk-16kbram_debug.sh
+ - "hw/bsp/nrf51-arduino_101/boot-nrf51xxaa.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
+bsp.downloadscript: "hw/bsp/nrf51-arduino_101/nrf51dk-16kbram_download.sh"
+bsp.debugscript: "hw/bsp/nrf51-arduino_101/nrf51dk-16kbram_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/nrf51-blenano/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/bsp.yml b/hw/bsp/nrf51-blenano/bsp.yml
index c1bb248..f706c3c 100644
--- a/hw/bsp/nrf51-blenano/bsp.yml
+++ b/hw/bsp/nrf51-blenano/bsp.yml
@@ -20,14 +20,14 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
bsp.linkerscript:
- - "nrf51xxac.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+ - "hw/bsp/nrf51-blenano/nrf51xxac.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf51xxac.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+ - "hw/bsp/nrf51-blenano/boot-nrf51xxac.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.part2linkerscript: "split-nrf51dk.ld"
-bsp.downloadscript: nrf51dk_download.sh
-bsp.debugscript: nrf51dk_debug.sh
+bsp.downloadscript: "hw/bsp/nrf51-blenano/nrf51dk_download.sh"
+bsp.debugscript: "hw/bsp/nrf51-blenano/nrf51dk_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/nrf51dk-16kbram/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/bsp.yml b/hw/bsp/nrf51dk-16kbram/bsp.yml
index 03b17bc..dd2abf3 100644
--- a/hw/bsp/nrf51dk-16kbram/bsp.yml
+++ b/hw/bsp/nrf51dk-16kbram/bsp.yml
@@ -20,14 +20,14 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
bsp.linkerscript:
- - "nrf51xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+ - "hw/bsp/nrf51dk-16kbram/nrf51xxaa.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf51xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+ - "hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.part2linkerscript: "split-nrf51dk-16kbram.ld"
-bsp.downloadscript: nrf51dk-16kbram_download.sh
-bsp.debugscript: nrf51dk-16kbram_debug.sh
+bsp.downloadscript: "hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh"
+bsp.debugscript: "hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/nrf51dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/bsp.yml b/hw/bsp/nrf51dk/bsp.yml
index c1bb248..48d6792 100644
--- a/hw/bsp/nrf51dk/bsp.yml
+++ b/hw/bsp/nrf51dk/bsp.yml
@@ -20,14 +20,14 @@
bsp.arch: cortex_m0
bsp.compiler: compiler/arm-none-eabi-m0
bsp.linkerscript:
- - "nrf51xxac.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+ - "hw/bsp/nrf51dk/nrf51xxac.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf51xxac.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf51xxx/nrf51.ld"
+ - "hw/bsp/nrf51dk/boot-nrf51xxac.ld"
+ - "hw/mcu/nordic/nrf51xxx/nrf51.ld"
bsp.part2linkerscript: "split-nrf51dk.ld"
-bsp.downloadscript: nrf51dk_download.sh
-bsp.debugscript: nrf51dk_debug.sh
+bsp.downloadscript: "hw/bsp/nrf51dk/nrf51dk_download.sh"
+bsp.debugscript: "hw/bsp/nrf51dk/nrf51dk_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/nrf52dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/bsp.yml b/hw/bsp/nrf52dk/bsp.yml
index 312e102..83613fe 100644
--- a/hw/bsp/nrf52dk/bsp.yml
+++ b/hw/bsp/nrf52dk/bsp.yml
@@ -20,14 +20,14 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- - "nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+ - "hw/bsp/nrf52dk/nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+ - "hw/bsp/nrf52dk/boot-nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.part2linkerscript: "split-nrf52dk.ld"
-bsp.downloadscript: nrf52dk_download.sh
-bsp.debugscript: nrf52dk_debug.sh
+bsp.downloadscript: "hw/bsp/nrf52dk/nrf52dk_download.sh"
+bsp.debugscript: "hw/bsp/nrf52dk/nrf52dk_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/nucleo-f401re/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nucleo-f401re/bsp.yml b/hw/bsp/nucleo-f401re/bsp.yml
index cd4a8c6..73313b8 100644
--- a/hw/bsp/nucleo-f401re/bsp.yml
+++ b/hw/bsp/nucleo-f401re/bsp.yml
@@ -20,13 +20,13 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- - "nucleo-f401re.ld"
- - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f401.ld"
+ - "hw/bsp/nucleo-f401re/nucleo-f401re.ld"
+ - "hw/mcu/stm/stm32f4xx/stm32f401.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nucleo-f401re.ld"
- - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f401.ld"
-bsp.downloadscript: "nucleo-f401re_download.sh"
-bsp.debugscript: "nucleo-f401re_debug.sh"
+ - "hw/bsp/nucleo-f401re/boot-nucleo-f401re.ld"
+ - "hw/mcu/stm/stm32f4xx/stm32f401.ld"
+bsp.downloadscript: "hw/bsp/nucleo-f401re/nucleo-f401re_download.sh"
+bsp.debugscript: "hw/bsp/nucleo-f401re/nucleo-f401re_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/bsp.yml b/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
index c623c75..62a7899 100644
--- a/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
+++ b/hw/bsp/olimex_stm32-e407_devboard/bsp.yml
@@ -20,13 +20,13 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- - "olimex_stm32-e407_devboard.ld"
- - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
+ - "hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard.ld"
+ - "hw/mcu/stm/stm32f4xx/stm32f407.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-olimex_stm32-e407_devboard.ld"
- - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
-bsp.downloadscript: "olimex_stm32-e407_devboard_download.sh"
-bsp.debugscript: "olimex_stm32-e407_devboard_debug.sh"
+ - "hw/bsp/olimex_stm32-e407_devboard/boot-olimex_stm32-e407_devboard.ld"
+ - "hw/mcu/stm/stm32f4xx/stm32f407.ld"
+bsp.downloadscript: "hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_download.sh"
+bsp.debugscript: "hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/rb-nano2/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/bsp.yml b/hw/bsp/rb-nano2/bsp.yml
index 4b4f6fe..d461cb4 100644
--- a/hw/bsp/rb-nano2/bsp.yml
+++ b/hw/bsp/rb-nano2/bsp.yml
@@ -20,14 +20,14 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- - "nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+ - "hw/bsp/rb-nano2/nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-nrf52xxaa.ld"
- - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+ - "hw/bsp/rb-nano2/boot-nrf52xxaa.ld"
+ - "hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.part2linkerscript: "split-rb-nano2.ld"
-bsp.downloadscript: rb-nano2_download.sh
-bsp.debugscript: rb-nano2_debug.sh
+bsp.downloadscript: "hw/bsp/rb-nano2/rb-nano2_download.sh"
+bsp.debugscript: "hw/bsp/rb-nano2/rb-nano2_debug.sh"
bsp.flash_map:
areas:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a982ff62/hw/bsp/stm32f4discovery/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f4discovery/bsp.yml b/hw/bsp/stm32f4discovery/bsp.yml
index cbfc1d4..2e50d60 100644
--- a/hw/bsp/stm32f4discovery/bsp.yml
+++ b/hw/bsp/stm32f4discovery/bsp.yml
@@ -20,13 +20,13 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
bsp.linkerscript:
- - "stm32f4discovery.ld"
- - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
+ - "hw/bsp/stm32f4discovery/stm32f4discovery.ld"
+ - "hw/mcu/stm/stm32f4xx/stm32f407.ld"
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- - "boot-stm32f4discovery.ld"
- - "@apache-mynewt-core/hw/mcu/stm/stm32f4xx/stm32f407.ld"
-bsp.downloadscript: "stm32f4discovery_download.sh"
-bsp.debugscript: "stm32f4discovery_debug.sh"
+ - "hw/bsp/stm32f4discovery/boot-stm32f4discovery.ld"
+ - "hw/mcu/stm/stm32f4xx/stm32f407.ld"
+bsp.downloadscript: "hw/bsp/stm32f4discovery/stm32f4discovery_download.sh"
+bsp.debugscript: "hw/bsp/stm32f4discovery/stm32f4discovery_debug.sh"
bsp.flash_map:
areas:
[10/50] [abbrv] incubator-mynewt-core git commit: kernel/os;
remove obsolete macro from os_callout.h
Posted by cc...@apache.org.
kernel/os; remove obsolete macro from os_callout.h
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/b982aadc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b982aadc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b982aadc
Branch: refs/heads/master
Commit: b982aadca1d67ead266e8ade39a577ded0a6f5cd
Parents: fcc53ee
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 7 16:11:54 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 7 16:11:54 2016 -0800
----------------------------------------------------------------------
kernel/os/include/os/os_callout.h | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b982aadc/kernel/os/include/os/os_callout.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_callout.h b/kernel/os/include/os/os_callout.h
index a56654f..3d4e162 100644
--- a/kernel/os/include/os/os_callout.h
+++ b/kernel/os/include/os/os_callout.h
@@ -36,8 +36,6 @@ struct os_callout {
TAILQ_ENTRY(os_callout) c_next;
};
-#define CF_ARG(__cf) ((__cf)->cf_c.c_ev.ev_arg)
-
void os_callout_init(struct os_callout *cf, struct os_eventq *evq,
os_event_fn *ev_cb, void *ev_arg);
void os_callout_stop(struct os_callout *);
[44/50] [abbrv] incubator-mynewt-core git commit: Change newtmgr log
response length to 400
Posted by cc...@apache.org.
Change newtmgr log response length to 400
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/e2b60019
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e2b60019
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e2b60019
Branch: refs/heads/master
Commit: e2b60019b4b8a101cf62bd4b44a279d9da83c2e4
Parents: 60598d0
Author: Vipul Rahane <vi...@apache.org>
Authored: Wed Nov 9 18:10:22 2016 -0800
Committer: Vipul Rahane <vi...@apache.org>
Committed: Wed Nov 9 18:12:14 2016 -0800
----------------------------------------------------------------------
sys/log/src/log_nmgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e2b60019/sys/log/src/log_nmgr.c
----------------------------------------------------------------------
diff --git a/sys/log/src/log_nmgr.c b/sys/log/src/log_nmgr.c
index 63f5af6..ee77f91 100644
--- a/sys/log/src/log_nmgr.c
+++ b/sys/log/src/log_nmgr.c
@@ -124,7 +124,7 @@ log_nmgr_encode_entry(struct log *log, void *arg, void *dptr, uint16_t len)
g_err |= cbor_encoder_close_container(&cnt_encoder, &rsp);
rsp_len = encode_off->rsp_len;
rsp_len += cbor_encode_bytes_written(&cnt_encoder);
- if (rsp_len > MGMT_MAX_MTU) {
+ if (rsp_len > 400) {
rc = OS_ENOMEM;
goto err;
}
@@ -180,7 +180,7 @@ log_encode_entries(struct log *log, CborEncoder *cb,
g_err |= cbor_encoder_close_container(&cnt_encoder, &entries);
rsp_len = cbor_encode_bytes_written(cb) +
cbor_encode_bytes_written(&cnt_encoder);
- if (rsp_len > MGMT_MAX_MTU) {
+ if (rsp_len > 400) {
rc = OS_ENOMEM;
goto err;
}
[22/50] [abbrv] incubator-mynewt-core git commit: BLE IAS svc -
Update to use sysinit.
Posted by cc...@apache.org.
BLE IAS svc - Update to use sysinit.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/bbe1c78a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/bbe1c78a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/bbe1c78a
Branch: refs/heads/master
Commit: bbe1c78a1896c1a5f12839514aecba0add6610f4
Parents: 44fffd4
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 8 14:15:09 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 14:15:09 2016 -0800
----------------------------------------------------------------------
.../ias/include/services/ias/ble_svc_ias.h | 6 ++--
net/nimble/host/services/ias/pkg.yml | 2 ++
net/nimble/host/services/ias/src/ble_svc_ias.c | 38 ++++++++++----------
3 files changed, 22 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bbe1c78a/net/nimble/host/services/ias/include/services/ias/ble_svc_ias.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/ias/include/services/ias/ble_svc_ias.h b/net/nimble/host/services/ias/include/services/ias/ble_svc_ias.h
index da173cf..b63b458 100644
--- a/net/nimble/host/services/ias/include/services/ias/ble_svc_ias.h
+++ b/net/nimble/host/services/ias/include/services/ias/ble_svc_ias.h
@@ -20,8 +20,6 @@
#ifndef H_BLE_IAS_TPS_
#define H_BLE_IAS_TPS_
-struct ble_hs_cfg;
-
#define BLE_SVC_IAS_UUID16 0x1802
#define BLE_SVC_IAS_CHR_UUID16_ALERT_LEVEL 0x2a06
@@ -32,8 +30,8 @@ struct ble_hs_cfg;
typedef int ble_svc_ias_event_fn(uint8_t alert_level);
-int ble_svc_ias_init(struct ble_hs_cfg *cfg,
- ble_svc_ias_event_fn *cb);
+void ble_svc_ias_set_cb(ble_svc_ias_event_fn *cb);
+void ble_svc_ias_init(void);
#endif
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bbe1c78a/net/nimble/host/services/ias/pkg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/ias/pkg.yml b/net/nimble/host/services/ias/pkg.yml
index 39242f4..3879906 100644
--- a/net/nimble/host/services/ias/pkg.yml
+++ b/net/nimble/host/services/ias/pkg.yml
@@ -30,3 +30,5 @@ pkg.keywords:
pkg.deps:
- net/nimble/host
+pkg.init_function: ble_svc_ias_init
+pkg.init_stage: 3
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bbe1c78a/net/nimble/host/services/ias/src/ble_svc_ias.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/ias/src/ble_svc_ias.c b/net/nimble/host/services/ias/src/ble_svc_ias.c
index 07b98f1..4af6936 100644
--- a/net/nimble/host/services/ias/src/ble_svc_ias.c
+++ b/net/nimble/host/services/ias/src/ble_svc_ias.c
@@ -19,11 +19,13 @@
#include <assert.h>
#include <string.h>
+#include "sysinit/sysinit.h"
#include "host/ble_hs.h"
#include "services/ias/ble_svc_ias.h"
/* Callback function */
static ble_svc_ias_event_fn *ble_svc_ias_cb_fn;
+
/* Alert level */
static uint8_t ble_svc_ias_alert_level;
@@ -114,33 +116,29 @@ ble_svc_ias_access(uint16_t conn_handle, uint16_t attr_handle,
}
/**
- * Initialize the IAS. The developer must specify the event function
- * callback for the IAS to function properly.
+ * Designates the specified function as the IAS callback. This callback is
+ * necessary for this service to function properly.
*
* @param cb The callback function to call when
* the client signals an alert.
*/
-int
-ble_svc_ias_init(struct ble_hs_cfg *cfg, ble_svc_ias_event_fn *cb)
+void
+ble_svc_ias_set_cb(ble_svc_ias_event_fn *cb)
{
- int rc;
-
- if (!cb) {
- return BLE_HS_EINVAL;
- }
-
ble_svc_ias_cb_fn = cb;
+}
- rc = ble_gatts_count_cfg(ble_svc_ias_defs, cfg);
- if (rc != 0) {
- return rc;
- }
+/**
+ * Initialize the IAS package.
+ */
+void
+ble_svc_ias_init(void)
+{
+ int rc;
+
+ rc = ble_gatts_count_cfg(ble_svc_ias_defs);
+ SYSINIT_PANIC_ASSERT(rc == 0);
rc = ble_gatts_add_svcs(ble_svc_ias_defs);
- if (rc != 0) {
- return rc;
- }
-
- return 0;
+ SYSINIT_PANIC_ASSERT(rc == 0);
}
-
[09/50] [abbrv] incubator-mynewt-core git commit: slinky_oic;
queue the start event for oicmgr.
Posted by cc...@apache.org.
slinky_oic; queue the start event for oicmgr.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/fcc53ee4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/fcc53ee4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/fcc53ee4
Branch: refs/heads/master
Commit: fcc53ee4476c0c854281a0207e1136bb77c562be
Parents: 1b1a1e7
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Nov 7 14:22:18 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Nov 7 14:22:18 2016 -0800
----------------------------------------------------------------------
apps/slinky_oic/src/main.c | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/fcc53ee4/apps/slinky_oic/src/main.c
----------------------------------------------------------------------
diff --git a/apps/slinky_oic/src/main.c b/apps/slinky_oic/src/main.c
index 3f31f04..afadd33 100755
--- a/apps/slinky_oic/src/main.c
+++ b/apps/slinky_oic/src/main.c
@@ -33,6 +33,7 @@
#endif
#include <bootutil/image.h>
#include <imgmgr/imgmgr.h>
+#include <mgmt/mgmt.h>
#include <assert.h>
#include <string.h>
#include <json/json.h>
@@ -256,6 +257,7 @@ init_tasks(void)
*/
os_eventq_init(&slinky_oic_evq);
os_eventq_dflt_set(&slinky_oic_evq);
+ mgmt_evq_set(&slinky_oic_evq);
}
/**
[14/50] [abbrv] incubator-mynewt-core git commit: Move startup code
back into BSP pgks (from MCU).
Posted by cc...@apache.org.
Move startup code back into BSP pgks (from MCU).
The MCU packages are probably the correct place for these files, but
newt has issues building split images with them there. In particular,
newt doesn't recognize that the app (second slot) uses
Reset_Handler_split, so the resulting image is empty. This is a
temporary fix to keep split images working.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/90067c9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/90067c9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/90067c9a
Branch: refs/heads/master
Commit: 90067c9acaf5466df9432a53c47a8c36b4317fb1
Parents: 06c02a5
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Nov 7 20:47:43 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Nov 7 20:51:36 2016 -0800
----------------------------------------------------------------------
.../src/arch/cortex_m4/gcc_startup_nrf52.s | 289 ++++++++++++++++
.../arch/cortex_m4/gcc_startup_nrf52_split.s | 150 ++++++++
.../src/arch/cortex_m4/gcc_startup_nrf52.s | 289 ++++++++++++++++
.../arch/cortex_m4/gcc_startup_nrf52_split.s | 150 ++++++++
.../src/arch/cortex_m0/gcc_startup_nrf51.s | 267 +++++++++++++++
hw/bsp/nrf51-arduino_101/src/sbrk.c | 20 +-
.../src/arch/cortex_m0/gcc_startup_nrf51.s | 270 +++++++++++++++
.../arch/cortex_m0/gcc_startup_nrf51_split.s | 166 +++++++++
.../src/arch/cortex_m0/gcc_startup_nrf51.s | 270 +++++++++++++++
.../arch/cortex_m0/gcc_startup_nrf51_split.s | 166 +++++++++
.../src/arch/cortex_m0/gcc_startup_nrf51.s | 270 +++++++++++++++
.../arch/cortex_m0/gcc_startup_nrf51_split.s | 166 +++++++++
.../src/arch/cortex_m4/gcc_startup_nrf52.s | 289 ++++++++++++++++
.../arch/cortex_m4/gcc_startup_nrf52_split.s | 150 ++++++++
.../src/arch/cortex_m4/startup_STM32F40x.s | 343 +++++++++++++++++++
.../src/arch/cortex_m4/startup_STM32F40x.s | 343 +++++++++++++++++++
.../src/arch/cortex_m4/gcc_startup_nrf52.s | 289 ++++++++++++++++
.../arch/cortex_m4/gcc_startup_nrf52_split.s | 150 ++++++++
.../src/arch/cortex_m4/startup_STM32F40x.s | 343 +++++++++++++++++++
.../src/arch/cortex_m0/gcc_startup_nrf51.s | 270 ---------------
.../arch/cortex_m0/gcc_startup_nrf51_split.s | 166 ---------
.../src/arch/cortex_m4/gcc_startup_nrf52.s | 289 ----------------
.../arch/cortex_m4/gcc_startup_nrf52_split.s | 150 --------
hw/mcu/stm/stm32f4xx/src/startup_STM32F40x.s | 343 -------------------
24 files changed, 4365 insertions(+), 1233 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52.s
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52.s b/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52.s
new file mode 100755
index 0000000..fb804fd
--- /dev/null
+++ b/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52.s
@@ -0,0 +1,289 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long POWER_CLOCK_IRQHandler
+ .long RADIO_IRQHandler
+ .long UARTE0_UART0_IRQHandler
+ .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ .long NFCT_IRQHandler
+ .long GPIOTE_IRQHandler
+ .long SAADC_IRQHandler
+ .long TIMER0_IRQHandler
+ .long TIMER1_IRQHandler
+ .long TIMER2_IRQHandler
+ .long RTC0_IRQHandler
+ .long TEMP_IRQHandler
+ .long RNG_IRQHandler
+ .long ECB_IRQHandler
+ .long CCM_AAR_IRQHandler
+ .long WDT_IRQHandler
+ .long RTC1_IRQHandler
+ .long QDEC_IRQHandler
+ .long COMP_LPCOMP_IRQHandler
+ .long SWI0_EGU0_IRQHandler
+ .long SWI1_EGU1_IRQHandler
+ .long SWI2_EGU2_IRQHandler
+ .long SWI3_EGU3_IRQHandler
+ .long SWI4_EGU4_IRQHandler
+ .long SWI5_EGU5_IRQHandler
+ .long TIMER3_IRQHandler
+ .long TIMER4_IRQHandler
+ .long PWM0_IRQHandler
+ .long PDM_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long MWU_IRQHandler
+ .long PWM1_IRQHandler
+ .long PWM2_IRQHandler
+ .long SPIM2_SPIS2_SPI2_IRQHandler
+ .long RTC2_IRQHandler
+ .long I2S_IRQHandler
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+
+ .weak HardFault_Handler
+ .type HardFault_Handler, %function
+HardFault_Handler:
+ B .
+ .size HardFault_Handler, . - HardFault_Handler
+
+
+ .weak MemoryManagement_Handler
+ .type MemoryManagement_Handler, %function
+MemoryManagement_Handler:
+ B .
+ .size MemoryManagement_Handler, . - MemoryManagement_Handler
+
+
+ .weak BusFault_Handler
+ .type BusFault_Handler, %function
+BusFault_Handler:
+ B .
+ .size BusFault_Handler, . - BusFault_Handler
+
+
+ .weak UsageFault_Handler
+ .type UsageFault_Handler, %function
+UsageFault_Handler:
+ B .
+ .size UsageFault_Handler, . - UsageFault_Handler
+
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+
+/* IRQ Handlers */
+
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ B .
+ .size Default_Handler, . - Default_Handler
+
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ POWER_CLOCK_IRQHandler
+ IRQ RADIO_IRQHandler
+ IRQ UARTE0_UART0_IRQHandler
+ IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ IRQ NFCT_IRQHandler
+ IRQ GPIOTE_IRQHandler
+ IRQ SAADC_IRQHandler
+ IRQ TIMER0_IRQHandler
+ IRQ TIMER1_IRQHandler
+ IRQ TIMER2_IRQHandler
+ IRQ RTC0_IRQHandler
+ IRQ TEMP_IRQHandler
+ IRQ RNG_IRQHandler
+ IRQ ECB_IRQHandler
+ IRQ CCM_AAR_IRQHandler
+ IRQ WDT_IRQHandler
+ IRQ RTC1_IRQHandler
+ IRQ QDEC_IRQHandler
+ IRQ COMP_LPCOMP_IRQHandler
+ IRQ SWI0_EGU0_IRQHandler
+ IRQ SWI1_EGU1_IRQHandler
+ IRQ SWI2_EGU2_IRQHandler
+ IRQ SWI3_EGU3_IRQHandler
+ IRQ SWI4_EGU4_IRQHandler
+ IRQ SWI5_EGU5_IRQHandler
+ IRQ TIMER3_IRQHandler
+ IRQ TIMER4_IRQHandler
+ IRQ PWM0_IRQHandler
+ IRQ PDM_IRQHandler
+ IRQ MWU_IRQHandler
+ IRQ PWM1_IRQHandler
+ IRQ PWM2_IRQHandler
+ IRQ SPIM2_SPIS2_SPI2_IRQHandler
+ IRQ RTC2_IRQHandler
+ IRQ I2S_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52_split.s
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52_split.s b/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52_split.s
new file mode 100755
index 0000000..7426848
--- /dev/null
+++ b/hw/bsp/arduino_primo_nrf52/src/arch/cortex_m4/gcc_startup_nrf52_split.s
@@ -0,0 +1,150 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52.s
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52.s b/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52.s
new file mode 100755
index 0000000..fb804fd
--- /dev/null
+++ b/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52.s
@@ -0,0 +1,289 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long POWER_CLOCK_IRQHandler
+ .long RADIO_IRQHandler
+ .long UARTE0_UART0_IRQHandler
+ .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ .long NFCT_IRQHandler
+ .long GPIOTE_IRQHandler
+ .long SAADC_IRQHandler
+ .long TIMER0_IRQHandler
+ .long TIMER1_IRQHandler
+ .long TIMER2_IRQHandler
+ .long RTC0_IRQHandler
+ .long TEMP_IRQHandler
+ .long RNG_IRQHandler
+ .long ECB_IRQHandler
+ .long CCM_AAR_IRQHandler
+ .long WDT_IRQHandler
+ .long RTC1_IRQHandler
+ .long QDEC_IRQHandler
+ .long COMP_LPCOMP_IRQHandler
+ .long SWI0_EGU0_IRQHandler
+ .long SWI1_EGU1_IRQHandler
+ .long SWI2_EGU2_IRQHandler
+ .long SWI3_EGU3_IRQHandler
+ .long SWI4_EGU4_IRQHandler
+ .long SWI5_EGU5_IRQHandler
+ .long TIMER3_IRQHandler
+ .long TIMER4_IRQHandler
+ .long PWM0_IRQHandler
+ .long PDM_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long MWU_IRQHandler
+ .long PWM1_IRQHandler
+ .long PWM2_IRQHandler
+ .long SPIM2_SPIS2_SPI2_IRQHandler
+ .long RTC2_IRQHandler
+ .long I2S_IRQHandler
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+
+ .weak HardFault_Handler
+ .type HardFault_Handler, %function
+HardFault_Handler:
+ B .
+ .size HardFault_Handler, . - HardFault_Handler
+
+
+ .weak MemoryManagement_Handler
+ .type MemoryManagement_Handler, %function
+MemoryManagement_Handler:
+ B .
+ .size MemoryManagement_Handler, . - MemoryManagement_Handler
+
+
+ .weak BusFault_Handler
+ .type BusFault_Handler, %function
+BusFault_Handler:
+ B .
+ .size BusFault_Handler, . - BusFault_Handler
+
+
+ .weak UsageFault_Handler
+ .type UsageFault_Handler, %function
+UsageFault_Handler:
+ B .
+ .size UsageFault_Handler, . - UsageFault_Handler
+
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+
+/* IRQ Handlers */
+
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ B .
+ .size Default_Handler, . - Default_Handler
+
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ POWER_CLOCK_IRQHandler
+ IRQ RADIO_IRQHandler
+ IRQ UARTE0_UART0_IRQHandler
+ IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ IRQ NFCT_IRQHandler
+ IRQ GPIOTE_IRQHandler
+ IRQ SAADC_IRQHandler
+ IRQ TIMER0_IRQHandler
+ IRQ TIMER1_IRQHandler
+ IRQ TIMER2_IRQHandler
+ IRQ RTC0_IRQHandler
+ IRQ TEMP_IRQHandler
+ IRQ RNG_IRQHandler
+ IRQ ECB_IRQHandler
+ IRQ CCM_AAR_IRQHandler
+ IRQ WDT_IRQHandler
+ IRQ RTC1_IRQHandler
+ IRQ QDEC_IRQHandler
+ IRQ COMP_LPCOMP_IRQHandler
+ IRQ SWI0_EGU0_IRQHandler
+ IRQ SWI1_EGU1_IRQHandler
+ IRQ SWI2_EGU2_IRQHandler
+ IRQ SWI3_EGU3_IRQHandler
+ IRQ SWI4_EGU4_IRQHandler
+ IRQ SWI5_EGU5_IRQHandler
+ IRQ TIMER3_IRQHandler
+ IRQ TIMER4_IRQHandler
+ IRQ PWM0_IRQHandler
+ IRQ PDM_IRQHandler
+ IRQ MWU_IRQHandler
+ IRQ PWM1_IRQHandler
+ IRQ PWM2_IRQHandler
+ IRQ SPIM2_SPIS2_SPI2_IRQHandler
+ IRQ RTC2_IRQHandler
+ IRQ I2S_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52_split.s
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52_split.s b/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52_split.s
new file mode 100755
index 0000000..7426848
--- /dev/null
+++ b/hw/bsp/bmd300eval/src/arch/cortex_m4/gcc_startup_nrf52_split.s
@@ -0,0 +1,150 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51-arduino_101/src/arch/cortex_m0/gcc_startup_nrf51.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/src/arch/cortex_m0/gcc_startup_nrf51.s b/hw/bsp/nrf51-arduino_101/src/arch/cortex_m0/gcc_startup_nrf51.s
new file mode 100755
index 0000000..89fcf6d
--- /dev/null
+++ b/hw/bsp/nrf51-arduino_101/src/arch/cortex_m0/gcc_startup_nrf51.s
@@ -0,0 +1,267 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 384
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long _NMI_Handler /* NMI Handler */
+ .long _HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _PendSV_Handler /* PendSV Handler */
+ .long _SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long _POWER_CLOCK_IRQHandler
+ .long _RADIO_IRQHandler
+ .long _UART0_IRQHandler
+ .long _SPI0_TWI0_IRQHandler
+ .long _SPI1_TWI1_IRQHandler
+ .long 0 /*Reserved */
+ .long _GPIOTE_IRQHandler
+ .long _ADC_IRQHandler
+ .long _TIMER0_IRQHandler
+ .long _TIMER1_IRQHandler
+ .long _TIMER2_IRQHandler
+ .long _RTC0_IRQHandler
+ .long _TEMP_IRQHandler
+ .long _RNG_IRQHandler
+ .long _ECB_IRQHandler
+ .long _CCM_AAR_IRQHandler
+ .long _WDT_IRQHandler
+ .long _RTC1_IRQHandler
+ .long _QDEC_IRQHandler
+ .long _LPCOMP_IRQHandler
+ .long _SWI0_IRQHandler
+ .long _SWI1_IRQHandler
+ .long _SWI2_IRQHandler
+ .long _SWI3_IRQHandler
+ .long _SWI4_IRQHandler
+ .long _SWI5_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+/* Default handler. This uses the vector in the relocated vector table */
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ LDR R2, =__vector_tbl_reloc__
+ MRS R0, PSR
+ MOVS R1, #0x3F
+ ANDS R0, R1
+ LSLS R0, R0, #2
+ LDR R0, [R0, R2]
+ BX R0
+ .size Default_Handler, . - Default_Handler
+
+/*
+ * All of the following IRQ Handlers will point to the default handler unless
+ * they are defined elsewhere.
+ */
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ _NMI_Handler
+ IRQ _HardFault_Handler
+ IRQ _SVC_Handler
+ IRQ _PendSV_Handler
+ IRQ _SysTick_Handler
+ IRQ _POWER_CLOCK_IRQHandler
+ IRQ _RADIO_IRQHandler
+ IRQ _UART0_IRQHandler
+ IRQ _SPI0_TWI0_IRQHandler
+ IRQ _SPI1_TWI1_IRQHandler
+ IRQ _GPIOTE_IRQHandler
+ IRQ _ADC_IRQHandler
+ IRQ _TIMER0_IRQHandler
+ IRQ _TIMER1_IRQHandler
+ IRQ _TIMER2_IRQHandler
+ IRQ _RTC0_IRQHandler
+ IRQ _TEMP_IRQHandler
+ IRQ _RNG_IRQHandler
+ IRQ _ECB_IRQHandler
+ IRQ _CCM_AAR_IRQHandler
+ IRQ _WDT_IRQHandler
+ IRQ _RTC1_IRQHandler
+ IRQ _QDEC_IRQHandler
+ IRQ _LPCOMP_IRQHandler
+ IRQ _SWI0_IRQHandler
+ IRQ _SWI1_IRQHandler
+ IRQ _SWI2_IRQHandler
+ IRQ _SWI3_IRQHandler
+ IRQ _SWI4_IRQHandler
+ IRQ _SWI5_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51-arduino_101/src/sbrk.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-arduino_101/src/sbrk.c b/hw/bsp/nrf51-arduino_101/src/sbrk.c
index 5df43c9..cee2590 100644
--- a/hw/bsp/nrf51-arduino_101/src/sbrk.c
+++ b/hw/bsp/nrf51-arduino_101/src/sbrk.c
@@ -17,20 +17,10 @@
* under the License.
*/
-#include <hal/hal_bsp.h>
-
-/* put these in the data section so they are not cleared by _start */
-static char *sbrkBase __attribute__ ((section (".data")));
-static char *sbrkLimit __attribute__ ((section (".data")));
-static char *brk __attribute__ ((section (".data")));
-
-void
-_sbrkInit(char *base, char *limit) {
- sbrkBase = base;
- sbrkLimit = limit;
- brk = base;
-}
+extern char __HeapBase;
+extern char __HeapLimit;
+static char *brk = &__HeapBase;
void *
_sbrk(int incr)
{
@@ -39,7 +29,7 @@ _sbrk(int incr)
if (incr < 0) {
/* Returning memory to the heap. */
incr = -incr;
- if (brk - incr < sbrkBase) {
+ if (brk - incr < &__HeapBase) {
prev_brk = (void *)-1;
} else {
prev_brk = brk;
@@ -47,7 +37,7 @@ _sbrk(int incr)
}
} else {
/* Allocating memory from the heap. */
- if (sbrkLimit - brk >= incr) {
+ if (&__HeapLimit - brk >= incr) {
prev_brk = brk;
brk += incr;
} else {
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51.s b/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51.s
new file mode 100755
index 0000000..e4a887b
--- /dev/null
+++ b/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51.s
@@ -0,0 +1,270 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long _NMI_Handler /* NMI Handler */
+ .long _HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _PendSV_Handler /* PendSV Handler */
+ .long _SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long _POWER_CLOCK_IRQHandler
+ .long _RADIO_IRQHandler
+ .long _UART0_IRQHandler
+ .long _SPI0_TWI0_IRQHandler
+ .long _SPI1_TWI1_IRQHandler
+ .long 0 /*Reserved */
+ .long _GPIOTE_IRQHandler
+ .long _ADC_IRQHandler
+ .long _TIMER0_IRQHandler
+ .long _TIMER1_IRQHandler
+ .long _TIMER2_IRQHandler
+ .long _RTC0_IRQHandler
+ .long _TEMP_IRQHandler
+ .long _RNG_IRQHandler
+ .long _ECB_IRQHandler
+ .long _CCM_AAR_IRQHandler
+ .long _WDT_IRQHandler
+ .long _RTC1_IRQHandler
+ .long _QDEC_IRQHandler
+ .long _LPCOMP_IRQHandler
+ .long _SWI0_IRQHandler
+ .long _SWI1_IRQHandler
+ .long _SWI2_IRQHandler
+ .long _SWI3_IRQHandler
+ .long _SWI4_IRQHandler
+ .long _SWI5_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+/* Default handler. This uses the vector in the relocated vector table */
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ LDR R2, =__vector_tbl_reloc__
+ MRS R0, PSR
+ MOVS R1, #0x3F
+ ANDS R0, R1
+ LSLS R0, R0, #2
+ LDR R0, [R0, R2]
+ BX R0
+ .size Default_Handler, . - Default_Handler
+
+/*
+ * All of the following IRQ Handlers will point to the default handler unless
+ * they are defined elsewhere.
+ */
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ _NMI_Handler
+ IRQ _HardFault_Handler
+ IRQ _SVC_Handler
+ IRQ _PendSV_Handler
+ IRQ _SysTick_Handler
+ IRQ _POWER_CLOCK_IRQHandler
+ IRQ _RADIO_IRQHandler
+ IRQ _UART0_IRQHandler
+ IRQ _SPI0_TWI0_IRQHandler
+ IRQ _SPI1_TWI1_IRQHandler
+ IRQ _GPIOTE_IRQHandler
+ IRQ _ADC_IRQHandler
+ IRQ _TIMER0_IRQHandler
+ IRQ _TIMER1_IRQHandler
+ IRQ _TIMER2_IRQHandler
+ IRQ _RTC0_IRQHandler
+ IRQ _TEMP_IRQHandler
+ IRQ _RNG_IRQHandler
+ IRQ _ECB_IRQHandler
+ IRQ _CCM_AAR_IRQHandler
+ IRQ _WDT_IRQHandler
+ IRQ _RTC1_IRQHandler
+ IRQ _QDEC_IRQHandler
+ IRQ _LPCOMP_IRQHandler
+ IRQ _SWI0_IRQHandler
+ IRQ _SWI1_IRQHandler
+ IRQ _SWI2_IRQHandler
+ IRQ _SWI3_IRQHandler
+ IRQ _SWI4_IRQHandler
+ IRQ _SWI5_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51_split.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51_split.s b/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51_split.s
new file mode 100755
index 0000000..ed5f207
--- /dev/null
+++ b/hw/bsp/nrf51-blenano/src/arch/cortex_m0/gcc_startup_nrf51_split.s
@@ -0,0 +1,166 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51.s b/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51.s
new file mode 100755
index 0000000..73c6265
--- /dev/null
+++ b/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51.s
@@ -0,0 +1,270 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 384
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long _NMI_Handler /* NMI Handler */
+ .long _HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _PendSV_Handler /* PendSV Handler */
+ .long _SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long _POWER_CLOCK_IRQHandler
+ .long _RADIO_IRQHandler
+ .long _UART0_IRQHandler
+ .long _SPI0_TWI0_IRQHandler
+ .long _SPI1_TWI1_IRQHandler
+ .long 0 /*Reserved */
+ .long _GPIOTE_IRQHandler
+ .long _ADC_IRQHandler
+ .long _TIMER0_IRQHandler
+ .long _TIMER1_IRQHandler
+ .long _TIMER2_IRQHandler
+ .long _RTC0_IRQHandler
+ .long _TEMP_IRQHandler
+ .long _RNG_IRQHandler
+ .long _ECB_IRQHandler
+ .long _CCM_AAR_IRQHandler
+ .long _WDT_IRQHandler
+ .long _RTC1_IRQHandler
+ .long _QDEC_IRQHandler
+ .long _LPCOMP_IRQHandler
+ .long _SWI0_IRQHandler
+ .long _SWI1_IRQHandler
+ .long _SWI2_IRQHandler
+ .long _SWI3_IRQHandler
+ .long _SWI4_IRQHandler
+ .long _SWI5_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+/* Default handler. This uses the vector in the relocated vector table */
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ LDR R2, =__vector_tbl_reloc__
+ MRS R0, PSR
+ MOVS R1, #0x3F
+ ANDS R0, R1
+ LSLS R0, R0, #2
+ LDR R0, [R0, R2]
+ BX R0
+ .size Default_Handler, . - Default_Handler
+
+/*
+ * All of the following IRQ Handlers will point to the default handler unless
+ * they are defined elsewhere.
+ */
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ _NMI_Handler
+ IRQ _HardFault_Handler
+ IRQ _SVC_Handler
+ IRQ _PendSV_Handler
+ IRQ _SysTick_Handler
+ IRQ _POWER_CLOCK_IRQHandler
+ IRQ _RADIO_IRQHandler
+ IRQ _UART0_IRQHandler
+ IRQ _SPI0_TWI0_IRQHandler
+ IRQ _SPI1_TWI1_IRQHandler
+ IRQ _GPIOTE_IRQHandler
+ IRQ _ADC_IRQHandler
+ IRQ _TIMER0_IRQHandler
+ IRQ _TIMER1_IRQHandler
+ IRQ _TIMER2_IRQHandler
+ IRQ _RTC0_IRQHandler
+ IRQ _TEMP_IRQHandler
+ IRQ _RNG_IRQHandler
+ IRQ _ECB_IRQHandler
+ IRQ _CCM_AAR_IRQHandler
+ IRQ _WDT_IRQHandler
+ IRQ _RTC1_IRQHandler
+ IRQ _QDEC_IRQHandler
+ IRQ _LPCOMP_IRQHandler
+ IRQ _SWI0_IRQHandler
+ IRQ _SWI1_IRQHandler
+ IRQ _SWI2_IRQHandler
+ IRQ _SWI3_IRQHandler
+ IRQ _SWI4_IRQHandler
+ IRQ _SWI5_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51_split.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51_split.s b/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51_split.s
new file mode 100755
index 0000000..e44c725
--- /dev/null
+++ b/hw/bsp/nrf51dk-16kbram/src/arch/cortex_m0/gcc_startup_nrf51_split.s
@@ -0,0 +1,166 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 384
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51.s b/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51.s
new file mode 100755
index 0000000..fbc88bd
--- /dev/null
+++ b/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51.s
@@ -0,0 +1,270 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long _NMI_Handler /* NMI Handler */
+ .long _HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long _PendSV_Handler /* PendSV Handler */
+ .long _SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long _POWER_CLOCK_IRQHandler
+ .long _RADIO_IRQHandler
+ .long _UART0_IRQHandler
+ .long _SPI0_TWI0_IRQHandler
+ .long _SPI1_TWI1_IRQHandler
+ .long 0 /*Reserved */
+ .long _GPIOTE_IRQHandler
+ .long ADC_IRQHandler
+ .long _TIMER0_IRQHandler
+ .long _TIMER1_IRQHandler
+ .long _TIMER2_IRQHandler
+ .long _RTC0_IRQHandler
+ .long _TEMP_IRQHandler
+ .long _RNG_IRQHandler
+ .long _ECB_IRQHandler
+ .long _CCM_AAR_IRQHandler
+ .long _WDT_IRQHandler
+ .long _RTC1_IRQHandler
+ .long _QDEC_IRQHandler
+ .long _LPCOMP_IRQHandler
+ .long _SWI0_IRQHandler
+ .long _SWI1_IRQHandler
+ .long _SWI2_IRQHandler
+ .long _SWI3_IRQHandler
+ .long _SWI4_IRQHandler
+ .long _SWI5_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+/* Default handler. This uses the vector in the relocated vector table */
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ LDR R2, =__vector_tbl_reloc__
+ MRS R0, PSR
+ MOVS R1, #0x3F
+ ANDS R0, R1
+ LSLS R0, R0, #2
+ LDR R0, [R0, R2]
+ BX R0
+ .size Default_Handler, . - Default_Handler
+
+/*
+ * All of the following IRQ Handlers will point to the default handler unless
+ * they are defined elsewhere.
+ */
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ _NMI_Handler
+ IRQ _HardFault_Handler
+ IRQ _SVC_Handler
+ IRQ _PendSV_Handler
+ IRQ _SysTick_Handler
+ IRQ _POWER_CLOCK_IRQHandler
+ IRQ _RADIO_IRQHandler
+ IRQ _UART0_IRQHandler
+ IRQ _SPI0_TWI0_IRQHandler
+ IRQ _SPI1_TWI1_IRQHandler
+ IRQ _GPIOTE_IRQHandler
+ IRQ ADC_IRQHandler
+ IRQ _TIMER0_IRQHandler
+ IRQ _TIMER1_IRQHandler
+ IRQ _TIMER2_IRQHandler
+ IRQ _RTC0_IRQHandler
+ IRQ _TEMP_IRQHandler
+ IRQ _RNG_IRQHandler
+ IRQ _ECB_IRQHandler
+ IRQ _CCM_AAR_IRQHandler
+ IRQ _WDT_IRQHandler
+ IRQ _RTC1_IRQHandler
+ IRQ _QDEC_IRQHandler
+ IRQ _LPCOMP_IRQHandler
+ IRQ _SWI0_IRQHandler
+ IRQ _SWI1_IRQHandler
+ IRQ _SWI2_IRQHandler
+ IRQ _SWI3_IRQHandler
+ IRQ _SWI4_IRQHandler
+ IRQ _SWI5_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51_split.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51_split.s b/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51_split.s
new file mode 100755
index 0000000..ed5f207
--- /dev/null
+++ b/hw/bsp/nrf51dk/src/arch/cortex_m0/gcc_startup_nrf51_split.s
@@ -0,0 +1,166 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv6-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
+ .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
+ .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+/* Make sure ALL RAM banks are powered on */
+ MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
+
+ LDR R0, =NRF_POWER_RAMON_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+ LDR R0, =NRF_POWER_RAMONB_ADDRESS
+ LDR R2, [R0]
+ ORRS R2, R1
+ STR R2, [R0]
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+
+ .end
[42/50] [abbrv] incubator-mynewt-core git commit: nrf52 bsps;
remove nrf52.cfg, use standard openocd target.
Posted by cc...@apache.org.
nrf52 bsps; remove nrf52.cfg, use standard openocd target.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/60598d08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/60598d08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/60598d08
Branch: refs/heads/master
Commit: 60598d087d7c960856856bc9152c737f513e1077
Parents: d476d02
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed Nov 9 17:39:04 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Nov 9 17:39:04 2016 -0800
----------------------------------------------------------------------
hw/bsp/arduino_primo_nrf52/arduino_primo.cfg | 24 +++++++--
hw/bsp/arduino_primo_nrf52/nrf52.cfg | 43 ----------------
hw/bsp/nrf51-blenano/nrf51.cfg | 60 -----------------------
hw/bsp/rb-nano2/nrf52.cfg | 41 ----------------
4 files changed, 19 insertions(+), 149 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/60598d08/hw/bsp/arduino_primo_nrf52/arduino_primo.cfg
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/arduino_primo.cfg b/hw/bsp/arduino_primo_nrf52/arduino_primo.cfg
index b3ba906..d0efb1d 100644
--- a/hw/bsp/arduino_primo_nrf52/arduino_primo.cfg
+++ b/hw/bsp/arduino_primo_nrf52/arduino_primo.cfg
@@ -1,6 +1,20 @@
-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
source [find interface/cmsis-dap.cfg]
-source [find ./nrf52.cfg]
-
-
-
+source [find target/nrf52.cfg]
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/60598d08/hw/bsp/arduino_primo_nrf52/nrf52.cfg
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/nrf52.cfg b/hw/bsp/arduino_primo_nrf52/nrf52.cfg
deleted file mode 100644
index 99dba23..0000000
--- a/hw/bsp/arduino_primo_nrf52/nrf52.cfg
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Nordic nRF52 series: ARM Cortex-M4 @ 64 MHz
-#
-
-source [find target/swj-dp.tcl]
-
-if { [info exists CHIPNAME] } {
- set _CHIPNAME $CHIPNAME
-} else {
- set _CHIPNAME nrf52
-}
-
-if { [info exists CPUTAPID] } {
- set _CPUTAPID $CPUTAPID
-} else {
- set _CPUTAPID 0x2ba01477
-}
-
-# Work-area is a space in RAM used for flash programming
-# By default use 16kB
-if { [info exists WORKAREASIZE] } {
- set _WORKAREASIZE $WORKAREASIZE
-} else {
- set _WORKAREASIZE 0x4000
-}
-
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
-
-set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
-
-$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
-
-flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME
-flash bank $_CHIPNAME.uicr nrf52 0x10001000 0 1 1 $_TARGETNAME
-
-adapter_khz 10000
-
-if { ![using_hla] } {
- cortex_m reset_config sysresetreq
-}
-
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/60598d08/hw/bsp/nrf51-blenano/nrf51.cfg
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/nrf51.cfg b/hw/bsp/nrf51-blenano/nrf51.cfg
deleted file mode 100644
index 280dd4f..0000000
--- a/hw/bsp/nrf51-blenano/nrf51.cfg
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# script for Nordic nRF51 series, a Cortex-M0 chip
-#
-
-source [find target/swj-dp.tcl]
-
-if { [info exists CHIPNAME] } {
- set _CHIPNAME $CHIPNAME
-} else {
- set _CHIPNAME nrf51
-}
-
-if { [info exists ENDIAN] } {
- set _ENDIAN $ENDIAN
-} else {
- set _ENDIAN little
-}
-
-# Work-area is a space in RAM used for flash programming
-# By default use 16kB
-if { [info exists WORKAREASIZE] } {
- set _WORKAREASIZE $WORKAREASIZE
-} else {
- set _WORKAREASIZE 0x4000
-}
-
-if { [info exists CPUTAPID] } {
- set _CPUTAPID $CPUTAPID
-} else {
- set _CPUTAPID 0x0bb11477
-}
-
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
-
-set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
-
-$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
-
-if {![using_hla]} {
- # The chip supports standard ARM/Cortex-M0 SYSRESETREQ signal
- cortex_m reset_config sysresetreq
-}
-
-flash bank $_CHIPNAME.flash nrf51 0x00000000 0 1 1 $_TARGETNAME
-flash bank $_CHIPNAME.uicr nrf51 0x10001000 0 1 1 $_TARGETNAME
-
-#
-# The chip should start up from internal 16Mhz RC, so setting adapter
-# clock to 1Mhz should be OK
-#
-adapter_khz 1000
-
-proc enable_all_ram {} {
- # nRF51822 Product Anomaly Notice (PAN) #16 explains that not all RAM banks
- # are reliably enabled after reset on some revisions (contrary to spec.) So after
- # resetting we enable all banks via the RAMON register
- mww 0x40000524 0xF
-}
-$_TARGETNAME configure -event reset-end { enable_all_ram }
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/60598d08/hw/bsp/rb-nano2/nrf52.cfg
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/nrf52.cfg b/hw/bsp/rb-nano2/nrf52.cfg
deleted file mode 100644
index c4ba167..0000000
--- a/hw/bsp/rb-nano2/nrf52.cfg
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Nordic nRF52 series: ARM Cortex-M4 @ 64 MHz
-#
-
-source [find target/swj-dp.tcl]
-
-if { [info exists CHIPNAME] } {
- set _CHIPNAME $CHIPNAME
-} else {
- set _CHIPNAME nrf52
-}
-
-if { [info exists CPUTAPID] } {
- set _CPUTAPID $CPUTAPID
-} else {
- set _CPUTAPID 0x2ba01477
-}
-
-# Work-area is a space in RAM used for flash programming
-# By default use 16kB
-if { [info exists WORKAREASIZE] } {
- set _WORKAREASIZE $WORKAREASIZE
-} else {
- set _WORKAREASIZE 0x4000
-}
-
-swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
-
-set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
-
-$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
-
-flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME
-flash bank $_CHIPNAME.uicr nrf52 0x10001000 0 1 1 $_TARGETNAME
-
-adapter_khz 10000
-
-if { ![using_hla] } {
- cortex_m reset_config sysresetreq
-}
[23/50] [abbrv] incubator-mynewt-core git commit: This closes #85.
Posted by cc...@apache.org.
This closes #85.
Merge remote-tracking branch 'bgiori/feature-ans' into develop
* bgiori/feature-ans:
update include path
moved location to services from profiles
Variables declared at top of function scope
updated comments
Alert Notification Service implemented.
fixed compilation errors and runs. Untested. Unfinished.
unfinished changes
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ff4ce466
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ff4ce466
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ff4ce466
Branch: refs/heads/master
Commit: ff4ce4660d43d3e1d24e3e66f277c0939cd3ff0c
Parents: bbe1c78 1d68f68
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 8 14:29:28 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 14:29:28 2016 -0800
----------------------------------------------------------------------
.../ans/include/services/ans/ble_svc_ans.h | 87 ++++
net/nimble/host/services/ans/pkg.yml | 31 ++
net/nimble/host/services/ans/src/ble_svc_ans.c | 467 +++++++++++++++++++
3 files changed, 585 insertions(+)
----------------------------------------------------------------------
[46/50] [abbrv] incubator-mynewt-core git commit: boot_serial -
Continue conversion of tests to cbor
Posted by cc...@apache.org.
boot_serial - Continue conversion of tests to cbor
Tests used to send JSON newtmgr commands; now they use CBOR. All tests
pass, but there are still some tests which use JSON:
* boot_serial_empty_img_msg
* boot_serial_empty_msg
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/858f94e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/858f94e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/858f94e1
Branch: refs/heads/master
Commit: 858f94e103944f286d30212b42aaa6ece5d79338
Parents: 8263139
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Nov 10 09:00:01 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Nov 10 09:08:22 2016 -0800
----------------------------------------------------------------------
.../test/src/testcases/boot_serial_img_msg.c | 1 +
.../testcases/boot_serial_upload_bigger_image.c | 58 +++++++++++++++++---
2 files changed, 52 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/858f94e1/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
----------------------------------------------------------------------
diff --git a/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c b/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
index 0ecce37..c978650 100644
--- a/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
+++ b/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+
#include "boot_test.h"
TEST_CASE(boot_serial_img_msg)
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/858f94e1/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
----------------------------------------------------------------------
diff --git a/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c b/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
index 1cd8c0e..9f326b8 100644
--- a/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
+++ b/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
@@ -16,6 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+#include <tinycbor/cborconstants_p.h>
+
#include "boot_test.h"
TEST_CASE(boot_serial_upload_bigger_image)
@@ -30,14 +33,52 @@ TEST_CASE(boot_serial_upload_bigger_image)
const struct flash_area *fap;
int i;
+ const int payload_off = sizeof *hdr;
+ const int img_data_off = payload_off + 8;
+
+ /* 00000000 a3 64 64 61 74 61 58 20 |.ddataX.|
+ * 00000008 00 00 00 00 00 00 00 00 |........|
+ * 00000010 00 00 00 00 00 00 00 00 |........|
+ * 00000018 00 00 00 00 00 00 00 00 |........|
+ * 00000020 00 00 00 00 00 00 00 00 |........|
+ * 00000028 63 6c 65 6e 1a 00 01 14 |clen....|
+ * 00000030 e8 63 6f 66 66 00 |.coff.|
+ */
+ static const uint8_t payload_first[] = {
+ 0xa3, 0x64, 0x64, 0x61, 0x74, 0x61, 0x58, 0x20,
+ /* 32 bytes of image data starts here. */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x63, 0x6c, 0x65, 0x6e, 0x1a, 0x00, 0x01, 0x14,
+ 0xe8, 0x63, 0x6f, 0x66, 0x66, 0x00,
+ };
+
+ /* 00000000 a3 64 64 61 74 61 58 20 |.ddataX.|
+ * 00000008 00 00 00 00 00 00 00 00 |........|
+ * 00000010 00 00 00 00 00 00 00 00 |........|
+ * 00000018 00 00 00 00 00 00 00 00 |........|
+ * 00000020 00 00 00 00 00 00 00 00 |........|
+ * 00000028 63 6f 66 66 00 00 |coff..|
+ */
+ static const uint8_t payload_next[] = {
+ 0xa2, 0x64, 0x64, 0x61, 0x74, 0x61, 0x58, 0x20,
+ /* 32 bytes of image data starts here. */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x63, 0x6f, 0x66, 0x66,
+ /* 2 bytes of offset value starts here. */
+ 0x00, 0x00
+ };
+
for (i = 0; i < sizeof(img); i++) {
img[i] = i;
}
for (off = 0; off < sizeof(img); off += 32) {
- len = base64_encode(&img[off], 32, enc_img, 1);
- assert(len > 0);
-
hdr = (struct nmgr_hdr *)buf;
memset(hdr, 0, sizeof(*hdr));
hdr->nh_op = NMGR_OP_WRITE;
@@ -45,12 +86,15 @@ TEST_CASE(boot_serial_upload_bigger_image)
hdr->nh_id = IMGMGR_NMGR_OP_UPLOAD;
if (off) {
- len = sprintf((char *)(hdr + 1), "{\"off\":%d,\"data\":\"%s\"}",
- off, enc_img);
+ memcpy(buf + payload_off, payload_next, sizeof payload_next);
+ len = sizeof payload_next;
+ buf[payload_off + len - 2] = Value8Bit;
+ buf[payload_off + len - 1] = off;
} else {
- len = sprintf((char *)(hdr + 1), "{\"off\": 0 ,\"len\":%ld, "
- "\"data\":\"%s\"}", (long)sizeof(img), enc_img);
+ memcpy(buf + payload_off, payload_first, sizeof payload_first);
+ len = sizeof payload_first;
}
+ memcpy(buf + img_data_off, img + off, 32);
hdr->nh_len = htons(len);
len = sizeof(*hdr) + len;
[17/50] [abbrv] incubator-mynewt-core git commit: inet_def_service;
previous commit was incomplete. Now actually fix the build.
Posted by cc...@apache.org.
inet_def_service; previous commit was incomplete. Now actually fix the build.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/60310863
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/60310863
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/60310863
Branch: refs/heads/master
Commit: 603108638f80ef3484c2c4769abd98b8defce604
Parents: cd9214e
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 13:24:11 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 13:24:11 2016 -0800
----------------------------------------------------------------------
net/ip/inet_def_service/src/inet_def_service.c | 301 +++++++++++---------
1 file changed, 173 insertions(+), 128 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/60310863/net/ip/inet_def_service/src/inet_def_service.c
----------------------------------------------------------------------
diff --git a/net/ip/inet_def_service/src/inet_def_service.c b/net/ip/inet_def_service/src/inet_def_service.c
index f5fc037..3bbe59e 100644
--- a/net/ip/inet_def_service/src/inet_def_service.c
+++ b/net/ip/inet_def_service/src/inet_def_service.c
@@ -37,25 +37,22 @@ enum inet_def_type {
INET_DEF_MAXTYPE
};
-#define INET_DEF_FROM_EVENT_TYPE(a) ((a) - OS_EVENT_T_PERUSER)
-#define INET_EVENT_TYPE_FROM_DEF(a) ((a) + OS_EVENT_T_PERUSER)
-
#define CHARGEN_WRITE_SZ 512
static const char chargen_pattern[] = "1234567890";
#define CHARGEN_PATTERN_SZ (sizeof(chargen_pattern) - 1)
static struct os_eventq *inet_def_evq;
-static void inet_def_event_echo(struct os_event *ev);
-static void inet_def_event_discard(struct os_event *ev);
-static void inet_def_event_chargen(struct os_event *ev);
-static void inet_def_event_start(struct os_event *ev);
+struct inet_def_event {
+ struct os_event ide_ev;
+ enum inet_def_type ide_type;
+};
/*
* UDP service.
*/
struct inet_def_udp {
- struct os_event ev; /* Datagram RX reported via event */
+ struct inet_def_event ev; /* Datagram RX reported via event */
struct mn_socket *socket;
uint32_t pkt_cnt;
};
@@ -64,7 +61,7 @@ struct inet_def_udp {
* Connected TCP socket.
*/
struct inet_def_tcp {
- struct os_event ev; /* Data RX reported with this event */
+ struct inet_def_event ev; /* Data RX reported with this event */
SLIST_ENTRY(inet_def_tcp) list;
struct mn_socket *socket;
int closed;
@@ -82,28 +79,9 @@ static struct inet_def {
struct inet_def_listen tcp_service[INET_DEF_MAXTYPE];
struct inet_def_udp udp_service[INET_DEF_MAXTYPE];
SLIST_HEAD(, inet_def_tcp) tcp_conns; /* List of connected TCP sockets */
-} inet_def = {
- .udp_service = {
- [INET_DEF_ECHO] = {
- .ev.ev_cb = inet_def_event_echo,
- .ev.ev_arg = (void *)MN_SOCK_DGRAM,
- },
- [INET_DEF_DISCARD] = {
- .ev.ev_cb = inet_def_event_discard,
- .ev.ev_arg = (void *)MN_SOCK_DGRAM,
- },
- [INET_DEF_CHARGEN] = {
- .ev.ev_cb = inet_def_event_chargen,
- .ev.ev_arg = (void *)MN_SOCK_DGRAM,
- },
- }
-};
+} inet_def;
-static struct os_eventq *
-inet_def_evq_get(void)
-{
- return inet_def_evq;
-}
+static void inet_def_event(struct os_event *ev);
/*
* UDP socket callbacks. Called in context of IP stack task.
@@ -113,7 +91,7 @@ inet_def_udp_readable(void *arg, int err)
{
struct inet_def_udp *idu = (struct inet_def_udp *)arg;
- os_eventq_put(&inet_def_evq, &idu->ev);
+ os_eventq_put(inet_def_evq, &idu->ev.ide_ev);
}
static const union mn_socket_cb inet_udp_cbs = {
@@ -136,7 +114,7 @@ inet_def_tcp_readable(void *arg, int err)
*/
SLIST_REMOVE(&inet_def.tcp_conns, idt, inet_def_tcp, list);
}
- os_eventq_put(&inet_def_evq, &idt->ev);
+ os_eventq_put(inet_def_evq, &idt->ev.ide_ev);
}
static const union mn_socket_cb inet_tcp_cbs = {
@@ -166,8 +144,9 @@ static int inet_def_newconn(void *arg, struct mn_socket *new)
* Ev_arg says whether it's TCP or UDP.
*/
type = idl - &inet_def.tcp_service[0];
- idt->ev.ev_type = INET_EVENT_TYPE_FROM_DEF(type);
- idt->ev.ev_arg = (void *)MN_SOCK_STREAM;
+ idt->ev.ide_type = type;
+ idt->ev.ide_ev.ev_cb = inet_def_event;
+ idt->ev.ide_ev.ev_arg = (void *)MN_SOCK_STREAM;
mn_socket_set_cbs(new, idt, &inet_tcp_cbs);
SLIST_INSERT_HEAD(&inet_def.tcp_conns, idt, list);
@@ -175,7 +154,7 @@ static int inet_def_newconn(void *arg, struct mn_socket *new)
/*
* Start transmitting right away.
*/
- os_eventq_put(&inet_def_evq, &idt->ev);
+ os_eventq_put(inet_def_evq, &idt->ev.ide_ev);
}
return 0;
}
@@ -237,104 +216,54 @@ err:
return -1;
}
-static struct mn_socket *
-inet_def_socket_from_event(struct os_event *ev,
- struct inet_def_udp **out_idu,
- struct inet_def_tcp **out_idt)
+static void
+inet_def_event(struct os_event *ev)
{
+ struct inet_def_event *ide;
struct inet_def_udp *idu;
struct inet_def_tcp *idt;
struct mn_socket *sock;
+ struct mn_sockaddr_in msin;
+ struct os_mbuf *m;
+ int rc;
+ int off;
+ int loop_cnt;
+ ide = (struct inet_def_event *)ev;
+ idt = (struct inet_def_tcp *)ev;
+ idu = (struct inet_def_udp *)ev;
if ((int)ev->ev_arg == MN_SOCK_DGRAM) {
- idu = (struct inet_def_udp *)ev;
- idt = NULL;
sock = idu->socket;
} else {
- idt = (struct inet_def_tcp *)ev;
- idu = NULL;
sock = idt->socket;
}
-
- if (out_idu != NULL) {
- *out_idu = idu;
- }
- if (out_idt != NULL) {
- *out_idt = idt;
- }
-
- return sock;
-}
-
-static void
-inet_def_free_closed_tcp_sock(struct inet_def_tcp *idt)
-{
- if (idt != NULL && idt->closed) {
- /*
- * Remote end has closed the connection, as indicated in the
- * callback. Close the socket and free the memory.
- */
- mn_socket_set_cbs(idt->socket, NULL, NULL);
- os_eventq_remove(inet_def_evq_get(), &idt->ev);
- mn_close(idt->socket);
- os_free(idt);
- }
-}
-
-static void
-inet_def_event_echo(struct os_event *ev)
-{
- struct mn_sockaddr_in msin;
- struct inet_def_tcp *idt;
- struct mn_socket *sock;
- struct os_mbuf *m;
- int rc;
-
- sock = inet_def_socket_from_event(ev, NULL, &idt);
- while (mn_recvfrom(sock, &m, (struct mn_sockaddr *)&msin) == 0) {
- console_printf("echo %d bytes\n", OS_MBUF_PKTLEN(m));
- rc = mn_sendto(sock, m, (struct mn_sockaddr *)&msin);
- if (rc) {
- console_printf(" failed: %d!!!!\n", rc);
+ switch (ide->ide_type) {
+ case INET_DEF_ECHO:
+ while (mn_recvfrom(sock, &m, (struct mn_sockaddr *)&msin) == 0) {
+ console_printf("echo %d bytes\n", OS_MBUF_PKTLEN(m));
+ rc = mn_sendto(sock, m, (struct mn_sockaddr *)&msin);
+ if (rc) {
+ console_printf(" failed: %d!!!!\n", rc);
+ os_mbuf_free_chain(m);
+ }
+ }
+ break;
+ case INET_DEF_DISCARD:
+ while (mn_recvfrom(sock, &m, NULL) == 0) {
+ console_printf("discard %d bytes\n", OS_MBUF_PKTLEN(m));
os_mbuf_free_chain(m);
}
- }
-
- inet_def_free_closed_tcp_sock(idt);
-}
-
-static void
-inet_def_event_discard(struct os_event *ev)
-{
- struct inet_def_tcp *idt;
- struct mn_socket *sock;
- struct os_mbuf *m;
-
- sock = inet_def_socket_from_event(ev, NULL, NULL);
- while (mn_recvfrom(sock, &m, NULL) == 0) {
- console_printf("discard %d bytes\n", OS_MBUF_PKTLEN(m));
- os_mbuf_free_chain(m);
- }
-
- inet_def_free_closed_tcp_sock(idt);
-}
-
-static void
-inet_def_event_chargen(struct os_event *ev)
-{
- struct inet_def_tcp *idt;
- struct mn_socket *sock;
- struct os_mbuf *m;
- int loop_cnt;
-
- sock = inet_def_socket_from_event(ev, NULL, &idt);
- while (mn_recvfrom(sock, &m, NULL) == 0) {
- os_mbuf_free_chain(m);
- }
- if (idt == NULL || !idt->closed) {
- /*
- * Don't try to send tons of data to a closed socket.
- */
+ break;
+ case INET_DEF_CHARGEN:
+ while (mn_recvfrom(sock, &m, NULL) == 0) {
+ os_mbuf_free_chain(m);
+ }
+ if ((int)ev->ev_arg == MN_SOCK_STREAM && idt->closed) {
+ /*
+ * Don't try to send tons of data to a closed socket.
+ */
+ break;
+ }
loop_cnt = 0;
do {
m = os_msys_get(CHARGEN_WRITE_SZ, 0);
@@ -362,24 +291,140 @@ inet_def_event_chargen(struct os_event *ev)
}
loop_cnt++;
} while (loop_cnt < 32);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ if ((int)ev->ev_arg == MN_SOCK_STREAM && idt->closed) {
+ /*
+ * Remote end has closed the connection, as indicated in the
+ * callback. Close the socket and free the memory.
+ */
+ mn_socket_set_cbs(idt->socket, NULL, NULL);
+ os_eventq_remove(inet_def_evq, &idt->ev.ide_ev);
+ mn_close(idt->socket);
+ os_free(idt);
}
-
- inet_def_free_closed_tcp_sock(idt);
}
+#if 0
static void
-inet_def_event_start(void)
+inet_def_srv(void *arg)
{
- inet_def_create_srv(INET_DEF_ECHO, ECHO_PORT);
- inet_def_create_srv(INET_DEF_DISCARD, DISCARD_PORT);
- inet_def_create_srv(INET_DEF_CHARGEN, CHARGEN_PORT);
+ struct inet_def_udp *idu;
+ struct inet_def_tcp *idt;
+ struct mn_socket *sock;
+ struct os_event *ev;
+ struct mn_sockaddr_in msin;
+ struct os_mbuf *m;
+ enum inet_def_type type;
+ int rc;
+ int off;
+ int loop_cnt;
+
+ while (1) {
+ /*
+ * Wait here. When event comes, check what type of socket got it,
+ * and then act on it.
+ */
+ ev = os_eventq_get(inet_def_evq);
+ type = ev->ev_type;
+ idt = (struct inet_def_tcp *)ev;
+ idu = (struct inet_def_udp *)ev;
+ if ((int)ev->ev_arg == MN_SOCK_DGRAM) {
+ sock = idu->socket;
+ } else {
+ sock = idt->socket;
+ }
+ switch (type) {
+ case INET_DEF_ECHO:
+ while (mn_recvfrom(sock, &m, (struct mn_sockaddr *)&msin) == 0) {
+ console_printf("echo %d bytes\n", OS_MBUF_PKTLEN(m));
+ rc = mn_sendto(sock, m, (struct mn_sockaddr *)&msin);
+ if (rc) {
+ console_printf(" failed: %d!!!!\n", rc);
+ os_mbuf_free_chain(m);
+ }
+ }
+ break;
+ case INET_DEF_DISCARD:
+ while (mn_recvfrom(sock, &m, NULL) == 0) {
+ console_printf("discard %d bytes\n", OS_MBUF_PKTLEN(m));
+ os_mbuf_free_chain(m);
+ }
+ break;
+ case INET_DEF_CHARGEN:
+ while (mn_recvfrom(sock, &m, NULL) == 0) {
+ os_mbuf_free_chain(m);
+ }
+ if ((int)ev->ev_arg == MN_SOCK_STREAM && idt->closed) {
+ /*
+ * Don't try to send tons of data to a closed socket.
+ */
+ break;
+ }
+ loop_cnt = 0;
+ do {
+ m = os_msys_get(CHARGEN_WRITE_SZ, 0);
+ if (m) {
+ for (off = 0;
+ OS_MBUF_TRAILINGSPACE(m) >= CHARGEN_PATTERN_SZ;
+ off += CHARGEN_PATTERN_SZ) {
+ os_mbuf_copyinto(m, off, chargen_pattern,
+ CHARGEN_PATTERN_SZ);
+ }
+ console_printf("chargen %d bytes\n", m->om_len);
+ rc = mn_sendto(sock, m, NULL); /* assumes TCP for now */
+ if (rc) {
+ os_mbuf_free_chain(m);
+ if (rc != MN_ENOBUFS && rc != MN_EAGAIN) {
+ console_write(" sendto fail!!! %d\n", rc);
+ }
+ break;
+ }
+ } else {
+ /*
+ * Mbuf shortage. Wait for them to appear.
+ */
+ os_time_delay(1);
+ }
+ loop_cnt++;
+ } while (loop_cnt < 32);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ if ((int)ev->ev_arg == MN_SOCK_STREAM && idt->closed) {
+ /*
+ * Remote end has closed the connection, as indicated in the
+ * callback. Close the socket and free the memory.
+ */
+ mn_socket_set_cbs(idt->socket, NULL, NULL);
+ os_eventq_remove(&inet_def_evq, &idt->ev);
+ mn_close(idt->socket);
+ os_free(idt);
+ }
+ }
}
+#endif
void
inet_def_service_init(struct os_eventq *evq)
{
+ int i;
+
+ inet_def_create_srv(INET_DEF_ECHO, ECHO_PORT);
+ inet_def_create_srv(INET_DEF_DISCARD, DISCARD_PORT);
+ inet_def_create_srv(INET_DEF_CHARGEN, CHARGEN_PORT);
+
inet_def_evq = evq;
- os_eventq_ensure(&inet_def_evq, NULL);
SLIST_INIT(&inet_def.tcp_conns);
+ for (i = 0; i < 3; i++) {
+ inet_def.udp_service[i].ev.ide_type = i;
+ inet_def.udp_service[i].ev.ide_ev.ev_cb = inet_def_event;
+ inet_def.udp_service[i].ev.ide_ev.ev_arg = (void *)MN_SOCK_DGRAM;
+ }
}
[02/50] [abbrv] incubator-mynewt-core git commit: bootutil - Remove
obsolete prototypes.
Posted by cc...@apache.org.
bootutil - Remove obsolete prototypes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8d44098c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8d44098c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8d44098c
Branch: refs/heads/master
Commit: 8d44098c806eaf95ea44e0a7626754580344b546
Parents: c694835
Author: Christopher Collins <cc...@apache.org>
Authored: Sun Nov 6 20:27:22 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Sun Nov 6 20:27:22 2016 -0800
----------------------------------------------------------------------
boot/bootutil/include/bootutil/bootutil.h | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8d44098c/boot/bootutil/include/bootutil/bootutil.h
----------------------------------------------------------------------
diff --git a/boot/bootutil/include/bootutil/bootutil.h b/boot/bootutil/include/bootutil/bootutil.h
index 0771221..4473da9 100644
--- a/boot/bootutil/include/bootutil/bootutil.h
+++ b/boot/bootutil/include/bootutil/bootutil.h
@@ -32,8 +32,6 @@ extern "C" {
#define BOOT_SWAP_TYPE_FAIL 4
struct image_header;
-struct boot_img_trailer;
-
/**
* A response object provided by the boot loader code; indicates where to jump
* to execute the main image.
@@ -58,9 +56,6 @@ int boot_swap_type(void);
int boot_set_pending(void);
int boot_set_confirmed(void);
-int boot_read_img_trailer(int slot, struct boot_img_trailer *bit);
-int boot_read_scratch_trailer(struct boot_img_trailer *bit);
-
#define SPLIT_GO_OK (0)
#define SPLIT_GO_NON_MATCHING (-1)
#define SPLIT_GO_ERR (-2)
[35/50] [abbrv] incubator-mynewt-core git commit: eventq - Add some
comments.
Posted by cc...@apache.org.
eventq - Add some comments.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/7ad9747d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/7ad9747d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/7ad9747d
Branch: refs/heads/master
Commit: 7ad9747dacde6c8a07305edf8ea04c7db8178f92
Parents: 83129d4
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 10:22:26 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 14:45:49 2016 -0800
----------------------------------------------------------------------
kernel/os/src/os_eventq.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7ad9747d/kernel/os/src/os_eventq.c
----------------------------------------------------------------------
diff --git a/kernel/os/src/os_eventq.c b/kernel/os/src/os_eventq.c
index 3d79533..5c020c0 100644
--- a/kernel/os/src/os_eventq.c
+++ b/kernel/os/src/os_eventq.c
@@ -260,12 +260,26 @@ os_eventq_remove(struct os_eventq *evq, struct os_event *ev)
OS_EXIT_CRITICAL(sr);
}
+/**
+ * Assigns the default event queue. Packages which require an event queue, and
+ * which haven't been explicitly told which one to use, will use this one
+ * automatically.
+ *
+ * @param evq The event queue to designate as the default.
+ */
void
os_eventq_dflt_set(struct os_eventq *evq)
{
os_eventq_main = evq;
}
+/**
+ * Retrieves the default event queue, if any. The default event queue is
+ * designated via a call to os_eventq_dflt_set().
+ *
+ * @return The default event queue, no NULL if there isn't
+ * any.
+ */
struct os_eventq *
os_eventq_dflt_get(void)
{
[04/50] [abbrv] incubator-mynewt-core git commit: This closes #117.
Posted by cc...@apache.org.
This closes #117.
Merge remote-tracking branch 'michal-narajowski/fix-nrf52dk' into develop
* michal-narajowski/fix-nrf52dk:
mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ca2dc54a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ca2dc54a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ca2dc54a
Branch: refs/heads/master
Commit: ca2dc54a2d5bf9ee8a79855f94fd5c0f6f51e640
Parents: 8d44098 7c0bcce
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Nov 7 08:17:11 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Nov 7 08:17:11 2016 -0800
----------------------------------------------------------------------
.../src/arch/cortex_m4/gcc_startup_nrf52.s | 289 +++++++++++++++++++
.../arch/cortex_m4/gcc_startup_nrf52_split.s | 150 ++++++++++
hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s | 289 -------------------
.../nrf52xxx/src/gcc_startup_nrf52_split.s | 150 ----------
4 files changed, 439 insertions(+), 439 deletions(-)
----------------------------------------------------------------------
[41/50] [abbrv] incubator-mynewt-core git commit: The ACL data packet
length being reported by the LE read buffer size command included the HCI ACL
data packet header. Well,
there still needs more work to be done here to reconcile the constants being
use
Posted by cc...@apache.org.
The ACL data packet length being reported by the LE read buffer size
command included the HCI ACL data packet header. Well, there still
needs more work to be done here to reconcile the constants being
used, but the current code could have caused issues. We now
report a ACL data packet length of 256 bytes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/d476d026
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/d476d026
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/d476d026
Branch: refs/heads/master
Commit: d476d026c24c81abf0fd2336abf1e9ccbf35e394
Parents: ca0fe74
Author: William San Filippo <wi...@runtime.io>
Authored: Wed Nov 9 16:48:06 2016 -0800
Committer: William San Filippo <wi...@runtime.io>
Committed: Wed Nov 9 16:50:02 2016 -0800
----------------------------------------------------------------------
net/nimble/controller/syscfg.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/d476d026/net/nimble/controller/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/controller/syscfg.yml b/net/nimble/controller/syscfg.yml
index ff69b08..7287715 100644
--- a/net/nimble/controller/syscfg.yml
+++ b/net/nimble/controller/syscfg.yml
@@ -180,5 +180,7 @@ syscfg.defs:
description: 'TBD'
value: 12
BLE_LL_ACL_PKT_SIZE:
- description: 'TBD'
- value: 260
+ description: >
+ This is the maximum size of the data portion of HCI ACL data
+ packets. It does not include the HCI data header (of 4 bytes).
+ value: 256
[25/50] [abbrv] incubator-mynewt-core git commit: This closes #84.
Posted by cc...@apache.org.
This closes #84.
Merge remote-tracking branch 'bgiori/feature-tps' into develop
* bgiori/feature-tps:
moved tps to services dir.
variables declared at top of function scope
coding style changes
updated comments and error return value
Tx Power Service implementation
added tx power service to profiles
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/5663384b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5663384b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5663384b
Branch: refs/heads/master
Commit: 5663384b2aebdb19c1f2da2d0052f5f5be893263
Parents: 32b0d33 df94f01
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 8 14:41:39 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 14:41:39 2016 -0800
----------------------------------------------------------------------
.../tps/include/services/tps/ble_svc_tps.h | 31 +++++++
net/nimble/host/services/tps/pkg.yml | 32 +++++++
net/nimble/host/services/tps/src/ble_svc_tps.c | 98 ++++++++++++++++++++
3 files changed, 161 insertions(+)
----------------------------------------------------------------------
[13/50] [abbrv] incubator-mynewt-core git commit: Move startup code
back into BSP pgks (from MCU).
Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52.s b/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52.s
new file mode 100755
index 0000000..fb804fd
--- /dev/null
+++ b/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52.s
@@ -0,0 +1,289 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long POWER_CLOCK_IRQHandler
+ .long RADIO_IRQHandler
+ .long UARTE0_UART0_IRQHandler
+ .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ .long NFCT_IRQHandler
+ .long GPIOTE_IRQHandler
+ .long SAADC_IRQHandler
+ .long TIMER0_IRQHandler
+ .long TIMER1_IRQHandler
+ .long TIMER2_IRQHandler
+ .long RTC0_IRQHandler
+ .long TEMP_IRQHandler
+ .long RNG_IRQHandler
+ .long ECB_IRQHandler
+ .long CCM_AAR_IRQHandler
+ .long WDT_IRQHandler
+ .long RTC1_IRQHandler
+ .long QDEC_IRQHandler
+ .long COMP_LPCOMP_IRQHandler
+ .long SWI0_EGU0_IRQHandler
+ .long SWI1_EGU1_IRQHandler
+ .long SWI2_EGU2_IRQHandler
+ .long SWI3_EGU3_IRQHandler
+ .long SWI4_EGU4_IRQHandler
+ .long SWI5_EGU5_IRQHandler
+ .long TIMER3_IRQHandler
+ .long TIMER4_IRQHandler
+ .long PWM0_IRQHandler
+ .long PDM_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long MWU_IRQHandler
+ .long PWM1_IRQHandler
+ .long PWM2_IRQHandler
+ .long SPIM2_SPIS2_SPI2_IRQHandler
+ .long RTC2_IRQHandler
+ .long I2S_IRQHandler
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+
+ .weak HardFault_Handler
+ .type HardFault_Handler, %function
+HardFault_Handler:
+ B .
+ .size HardFault_Handler, . - HardFault_Handler
+
+
+ .weak MemoryManagement_Handler
+ .type MemoryManagement_Handler, %function
+MemoryManagement_Handler:
+ B .
+ .size MemoryManagement_Handler, . - MemoryManagement_Handler
+
+
+ .weak BusFault_Handler
+ .type BusFault_Handler, %function
+BusFault_Handler:
+ B .
+ .size BusFault_Handler, . - BusFault_Handler
+
+
+ .weak UsageFault_Handler
+ .type UsageFault_Handler, %function
+UsageFault_Handler:
+ B .
+ .size UsageFault_Handler, . - UsageFault_Handler
+
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+
+/* IRQ Handlers */
+
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ B .
+ .size Default_Handler, . - Default_Handler
+
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ POWER_CLOCK_IRQHandler
+ IRQ RADIO_IRQHandler
+ IRQ UARTE0_UART0_IRQHandler
+ IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ IRQ NFCT_IRQHandler
+ IRQ GPIOTE_IRQHandler
+ IRQ SAADC_IRQHandler
+ IRQ TIMER0_IRQHandler
+ IRQ TIMER1_IRQHandler
+ IRQ TIMER2_IRQHandler
+ IRQ RTC0_IRQHandler
+ IRQ TEMP_IRQHandler
+ IRQ RNG_IRQHandler
+ IRQ ECB_IRQHandler
+ IRQ CCM_AAR_IRQHandler
+ IRQ WDT_IRQHandler
+ IRQ RTC1_IRQHandler
+ IRQ QDEC_IRQHandler
+ IRQ COMP_LPCOMP_IRQHandler
+ IRQ SWI0_EGU0_IRQHandler
+ IRQ SWI1_EGU1_IRQHandler
+ IRQ SWI2_EGU2_IRQHandler
+ IRQ SWI3_EGU3_IRQHandler
+ IRQ SWI4_EGU4_IRQHandler
+ IRQ SWI5_EGU5_IRQHandler
+ IRQ TIMER3_IRQHandler
+ IRQ TIMER4_IRQHandler
+ IRQ PWM0_IRQHandler
+ IRQ PDM_IRQHandler
+ IRQ MWU_IRQHandler
+ IRQ PWM1_IRQHandler
+ IRQ PWM2_IRQHandler
+ IRQ SPIM2_SPIS2_SPI2_IRQHandler
+ IRQ RTC2_IRQHandler
+ IRQ I2S_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52_split.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52_split.s b/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52_split.s
new file mode 100755
index 0000000..7426848
--- /dev/null
+++ b/hw/bsp/nrf52dk/src/arch/cortex_m4/gcc_startup_nrf52_split.s
@@ -0,0 +1,150 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/nucleo-f401re/src/arch/cortex_m4/startup_STM32F40x.s
----------------------------------------------------------------------
diff --git a/hw/bsp/nucleo-f401re/src/arch/cortex_m4/startup_STM32F40x.s b/hw/bsp/nucleo-f401re/src/arch/cortex_m4/startup_STM32F40x.s
new file mode 100644
index 0000000..646b4bf
--- /dev/null
+++ b/hw/bsp/nucleo-f401re/src/arch/cortex_m4/startup_STM32F40x.s
@@ -0,0 +1,343 @@
+/* File: startup_STM32F40x.S
+ * Purpose: startup file for Cortex-M4 devices. Should use with
+ * GCC for ARM Embedded Processors
+ * Version: V1.4
+ * Date: 09 July 2012
+ *
+ * Copyright (c) 2011, 2012, ARM Limited
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the ARM Limited nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+#ifdef __STACK_SIZE
+ .equ Stack_Size, __STACK_SIZE
+#else
+ .equ Stack_Size, 0xc00
+#endif
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long MemManage_Handler /* MPU Fault Handler */
+ .long BusFault_Handler /* Bus Fault Handler */
+ .long UsageFault_Handler /* Usage Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long DebugMon_Handler /* Debug Monitor Handler */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External interrupts */
+ .long WWDG_IRQHandler /* Window WatchDog */
+ .long PVD_IRQHandler /* PVD through EXTI Line detection */
+ .long TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
+ .long RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
+ .long FLASH_IRQHandler /* FLASH */
+ .long RCC_IRQHandler /* RCC */
+ .long EXTI0_IRQHandler /* EXTI Line0 */
+ .long EXTI1_IRQHandler /* EXTI Line1 */
+ .long EXTI2_IRQHandler /* EXTI Line2 */
+ .long EXTI3_IRQHandler /* EXTI Line3 */
+ .long EXTI4_IRQHandler /* EXTI Line4 */
+ .long DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
+ .long DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
+ .long DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
+ .long DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
+ .long DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
+ .long DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
+ .long DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
+ .long ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
+ .long CAN1_TX_IRQHandler /* CAN1 TX */
+ .long CAN1_RX0_IRQHandler /* CAN1 RX0 */
+ .long CAN1_RX1_IRQHandler /* CAN1 RX1 */
+ .long CAN1_SCE_IRQHandler /* CAN1 SCE */
+ .long EXTI9_5_IRQHandler /* External Line[9:5]s */
+ .long TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
+ .long TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
+ .long TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
+ .long TIM1_CC_IRQHandler /* TIM1 Capture Compare */
+ .long TIM2_IRQHandler /* TIM2 */
+ .long TIM3_IRQHandler /* TIM3 */
+ .long TIM4_IRQHandler /* TIM4 */
+ .long I2C1_EV_IRQHandler /* I2C1 Event */
+ .long I2C1_ER_IRQHandler /* I2C1 Error */
+ .long I2C2_EV_IRQHandler /* I2C2 Event */
+ .long I2C2_ER_IRQHandler /* I2C2 Error */
+ .long SPI1_IRQHandler /* SPI1 */
+ .long SPI2_IRQHandler /* SPI2 */
+ .long USART1_IRQHandler /* USART1 */
+ .long USART2_IRQHandler /* USART2 */
+ .long USART3_IRQHandler /* USART3 */
+ .long EXTI15_10_IRQHandler /* External Line[15:10]s */
+ .long RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
+ .long OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
+ .long TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
+ .long TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
+ .long TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
+ .long TIM8_CC_IRQHandler /* TIM8 Capture Compare */
+ .long DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
+ .long FSMC_IRQHandler /* FSMC */
+ .long SDIO_IRQHandler /* SDIO */
+ .long TIM5_IRQHandler /* TIM5 */
+ .long SPI3_IRQHandler /* SPI3 */
+ .long UART4_IRQHandler /* UART4 */
+ .long UART5_IRQHandler /* UART5 */
+ .long TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
+ .long TIM7_IRQHandler /* TIM7 */
+ .long DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
+ .long DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
+ .long DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
+ .long DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
+ .long DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
+ .long ETH_IRQHandler /* Ethernet */
+ .long ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
+ .long CAN2_TX_IRQHandler /* CAN2 TX */
+ .long CAN2_RX0_IRQHandler /* CAN2 RX0 */
+ .long CAN2_RX1_IRQHandler /* CAN2 RX1 */
+ .long CAN2_SCE_IRQHandler /* CAN2 SCE */
+ .long OTG_FS_IRQHandler /* USB OTG FS */
+ .long DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
+ .long DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
+ .long DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
+ .long USART6_IRQHandler /* USART6 */
+ .long I2C3_EV_IRQHandler /* I2C3 event */
+ .long I2C3_ER_IRQHandler /* I2C3 error */
+ .long OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
+ .long OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
+ .long OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
+ .long OTG_HS_IRQHandler /* USB OTG HS */
+ .long DCMI_IRQHandler /* DCMI */
+ .long CRYP_IRQHandler /* CRYP crypto */
+ .long HASH_RNG_IRQHandler /* Hash and Rng */
+ .long FPU_IRQHandler /* FPU */
+
+ .size __isr_vector, . - __isr_vector
+
+ .text
+ .thumb
+ .thumb_func
+ .align 2
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+/* Copy data core section from flash to RAM */
+ ldr r1, =__etext
+ ldr r2, =__coredata_start__
+ ldr r3, =__coredata_end__
+
+.LC0:
+ cmp r2, r3
+ ittt lt
+ ldrlt r0, [r1], #4
+ strlt r0, [r2], #4
+ blt .LC0
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+ ldr r1, =__ecoredata
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+.LC1:
+ cmp r2, r3
+ ittt lt
+ ldrlt r0, [r1], #4
+ strlt r0, [r2], #4
+ blt .LC1
+
+/* Set the bss core section to zero */
+ mov r0, #0
+ ldr r1, =__corebss_start__
+ ldr r2, =__corebss_end__
+
+.LC2:
+ cmp r1, r2
+ itt lt
+ strlt r0, [r1], #4
+ blt .LC2
+
+/* Call system initialization and startup routines */
+ ldr r0, =SystemInit
+ blx r0
+ ldr r0, =_start
+ bx r0
+ .pool
+ .size Reset_Handler, . - Reset_Handler
+
+ .text
+/* Macro to define default handlers. Default handler
+ * will be weak symbol and just dead loops. They can be
+ * overwritten by other handlers */
+ .macro def_default_handler handler_name
+ .align 1
+ .thumb_func
+ .weak \handler_name
+ .type \handler_name, %function
+\handler_name :
+ b .
+ .size \handler_name, . - \handler_name
+ .endm
+
+ def_default_handler NMI_Handler
+ def_default_handler HardFault_Handler
+ def_default_handler MemManage_Handler
+ def_default_handler BusFault_Handler
+ def_default_handler UsageFault_Handler
+ def_default_handler SVC_Handler
+ def_default_handler DebugMon_Handler
+ def_default_handler PendSV_Handler
+ def_default_handler SysTick_Handler
+ def_default_handler Default_Handler
+
+ .macro def_irq_default_handler handler_name
+ .weak \handler_name
+ .set \handler_name, Default_Handler
+ .endm
+
+ def_irq_default_handler WWDG_IRQHandler
+ def_irq_default_handler PVD_IRQHandler
+ def_irq_default_handler TAMP_STAMP_IRQHandler
+ def_irq_default_handler RTC_WKUP_IRQHandler
+ def_irq_default_handler FLASH_IRQHandler
+ def_irq_default_handler RCC_IRQHandler
+ def_irq_default_handler EXTI0_IRQHandler
+ def_irq_default_handler EXTI1_IRQHandler
+ def_irq_default_handler EXTI2_IRQHandler
+ def_irq_default_handler EXTI3_IRQHandler
+ def_irq_default_handler EXTI4_IRQHandler
+ def_irq_default_handler DMA1_Stream0_IRQHandler
+ def_irq_default_handler DMA1_Stream1_IRQHandler
+ def_irq_default_handler DMA1_Stream2_IRQHandler
+ def_irq_default_handler DMA1_Stream3_IRQHandler
+ def_irq_default_handler DMA1_Stream4_IRQHandler
+ def_irq_default_handler DMA1_Stream5_IRQHandler
+ def_irq_default_handler DMA1_Stream6_IRQHandler
+ def_irq_default_handler ADC_IRQHandler
+ def_irq_default_handler CAN1_TX_IRQHandler
+ def_irq_default_handler CAN1_RX0_IRQHandler
+ def_irq_default_handler CAN1_RX1_IRQHandler
+ def_irq_default_handler CAN1_SCE_IRQHandler
+ def_irq_default_handler EXTI9_5_IRQHandler
+ def_irq_default_handler TIM1_BRK_TIM9_IRQHandler
+ def_irq_default_handler TIM1_UP_TIM10_IRQHandler
+ def_irq_default_handler TIM1_TRG_COM_TIM11_IRQHandler
+ def_irq_default_handler TIM1_CC_IRQHandler
+ def_irq_default_handler TIM2_IRQHandler
+ def_irq_default_handler TIM3_IRQHandler
+ def_irq_default_handler TIM4_IRQHandler
+ def_irq_default_handler I2C1_EV_IRQHandler
+ def_irq_default_handler I2C1_ER_IRQHandler
+ def_irq_default_handler I2C2_EV_IRQHandler
+ def_irq_default_handler I2C2_ER_IRQHandler
+ def_irq_default_handler SPI1_IRQHandler
+ def_irq_default_handler SPI2_IRQHandler
+ def_irq_default_handler USART1_IRQHandler
+ def_irq_default_handler USART2_IRQHandler
+ def_irq_default_handler USART3_IRQHandler
+ def_irq_default_handler EXTI15_10_IRQHandler
+ def_irq_default_handler RTC_Alarm_IRQHandler
+ def_irq_default_handler OTG_FS_WKUP_IRQHandler
+ def_irq_default_handler TIM8_BRK_TIM12_IRQHandler
+ def_irq_default_handler TIM8_UP_TIM13_IRQHandler
+ def_irq_default_handler TIM8_TRG_COM_TIM14_IRQHandler
+ def_irq_default_handler TIM8_CC_IRQHandler
+ def_irq_default_handler DMA1_Stream7_IRQHandler
+ def_irq_default_handler FSMC_IRQHandler
+ def_irq_default_handler SDIO_IRQHandler
+ def_irq_default_handler TIM5_IRQHandler
+ def_irq_default_handler SPI3_IRQHandler
+ def_irq_default_handler UART4_IRQHandler
+ def_irq_default_handler UART5_IRQHandler
+ def_irq_default_handler TIM6_DAC_IRQHandler
+ def_irq_default_handler TIM7_IRQHandler
+ def_irq_default_handler DMA2_Stream0_IRQHandler
+ def_irq_default_handler DMA2_Stream1_IRQHandler
+ def_irq_default_handler DMA2_Stream2_IRQHandler
+ def_irq_default_handler DMA2_Stream3_IRQHandler
+ def_irq_default_handler DMA2_Stream4_IRQHandler
+ def_irq_default_handler ETH_IRQHandler
+ def_irq_default_handler ETH_WKUP_IRQHandler
+ def_irq_default_handler CAN2_TX_IRQHandler
+ def_irq_default_handler CAN2_RX0_IRQHandler
+ def_irq_default_handler CAN2_RX1_IRQHandler
+ def_irq_default_handler CAN2_SCE_IRQHandler
+ def_irq_default_handler OTG_FS_IRQHandler
+ def_irq_default_handler DMA2_Stream5_IRQHandler
+ def_irq_default_handler DMA2_Stream6_IRQHandler
+ def_irq_default_handler DMA2_Stream7_IRQHandler
+ def_irq_default_handler USART6_IRQHandler
+ def_irq_default_handler I2C3_EV_IRQHandler
+ def_irq_default_handler I2C3_ER_IRQHandler
+ def_irq_default_handler OTG_HS_EP1_OUT_IRQHandler
+ def_irq_default_handler OTG_HS_EP1_IN_IRQHandler
+ def_irq_default_handler OTG_HS_WKUP_IRQHandler
+ def_irq_default_handler OTG_HS_IRQHandler
+ def_irq_default_handler DCMI_IRQHandler
+ def_irq_default_handler CRYP_IRQHandler
+ def_irq_default_handler HASH_RNG_IRQHandler
+ def_irq_default_handler FPU_IRQHandler
+ def_irq_default_handler DEF_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/olimex_stm32-e407_devboard/src/arch/cortex_m4/startup_STM32F40x.s
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/src/arch/cortex_m4/startup_STM32F40x.s b/hw/bsp/olimex_stm32-e407_devboard/src/arch/cortex_m4/startup_STM32F40x.s
new file mode 100755
index 0000000..646b4bf
--- /dev/null
+++ b/hw/bsp/olimex_stm32-e407_devboard/src/arch/cortex_m4/startup_STM32F40x.s
@@ -0,0 +1,343 @@
+/* File: startup_STM32F40x.S
+ * Purpose: startup file for Cortex-M4 devices. Should use with
+ * GCC for ARM Embedded Processors
+ * Version: V1.4
+ * Date: 09 July 2012
+ *
+ * Copyright (c) 2011, 2012, ARM Limited
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the ARM Limited nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+#ifdef __STACK_SIZE
+ .equ Stack_Size, __STACK_SIZE
+#else
+ .equ Stack_Size, 0xc00
+#endif
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long MemManage_Handler /* MPU Fault Handler */
+ .long BusFault_Handler /* Bus Fault Handler */
+ .long UsageFault_Handler /* Usage Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long DebugMon_Handler /* Debug Monitor Handler */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External interrupts */
+ .long WWDG_IRQHandler /* Window WatchDog */
+ .long PVD_IRQHandler /* PVD through EXTI Line detection */
+ .long TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
+ .long RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
+ .long FLASH_IRQHandler /* FLASH */
+ .long RCC_IRQHandler /* RCC */
+ .long EXTI0_IRQHandler /* EXTI Line0 */
+ .long EXTI1_IRQHandler /* EXTI Line1 */
+ .long EXTI2_IRQHandler /* EXTI Line2 */
+ .long EXTI3_IRQHandler /* EXTI Line3 */
+ .long EXTI4_IRQHandler /* EXTI Line4 */
+ .long DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
+ .long DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
+ .long DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
+ .long DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
+ .long DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
+ .long DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
+ .long DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
+ .long ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
+ .long CAN1_TX_IRQHandler /* CAN1 TX */
+ .long CAN1_RX0_IRQHandler /* CAN1 RX0 */
+ .long CAN1_RX1_IRQHandler /* CAN1 RX1 */
+ .long CAN1_SCE_IRQHandler /* CAN1 SCE */
+ .long EXTI9_5_IRQHandler /* External Line[9:5]s */
+ .long TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
+ .long TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
+ .long TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
+ .long TIM1_CC_IRQHandler /* TIM1 Capture Compare */
+ .long TIM2_IRQHandler /* TIM2 */
+ .long TIM3_IRQHandler /* TIM3 */
+ .long TIM4_IRQHandler /* TIM4 */
+ .long I2C1_EV_IRQHandler /* I2C1 Event */
+ .long I2C1_ER_IRQHandler /* I2C1 Error */
+ .long I2C2_EV_IRQHandler /* I2C2 Event */
+ .long I2C2_ER_IRQHandler /* I2C2 Error */
+ .long SPI1_IRQHandler /* SPI1 */
+ .long SPI2_IRQHandler /* SPI2 */
+ .long USART1_IRQHandler /* USART1 */
+ .long USART2_IRQHandler /* USART2 */
+ .long USART3_IRQHandler /* USART3 */
+ .long EXTI15_10_IRQHandler /* External Line[15:10]s */
+ .long RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
+ .long OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
+ .long TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
+ .long TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
+ .long TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
+ .long TIM8_CC_IRQHandler /* TIM8 Capture Compare */
+ .long DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
+ .long FSMC_IRQHandler /* FSMC */
+ .long SDIO_IRQHandler /* SDIO */
+ .long TIM5_IRQHandler /* TIM5 */
+ .long SPI3_IRQHandler /* SPI3 */
+ .long UART4_IRQHandler /* UART4 */
+ .long UART5_IRQHandler /* UART5 */
+ .long TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
+ .long TIM7_IRQHandler /* TIM7 */
+ .long DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
+ .long DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
+ .long DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
+ .long DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
+ .long DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
+ .long ETH_IRQHandler /* Ethernet */
+ .long ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
+ .long CAN2_TX_IRQHandler /* CAN2 TX */
+ .long CAN2_RX0_IRQHandler /* CAN2 RX0 */
+ .long CAN2_RX1_IRQHandler /* CAN2 RX1 */
+ .long CAN2_SCE_IRQHandler /* CAN2 SCE */
+ .long OTG_FS_IRQHandler /* USB OTG FS */
+ .long DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
+ .long DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
+ .long DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
+ .long USART6_IRQHandler /* USART6 */
+ .long I2C3_EV_IRQHandler /* I2C3 event */
+ .long I2C3_ER_IRQHandler /* I2C3 error */
+ .long OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
+ .long OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
+ .long OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
+ .long OTG_HS_IRQHandler /* USB OTG HS */
+ .long DCMI_IRQHandler /* DCMI */
+ .long CRYP_IRQHandler /* CRYP crypto */
+ .long HASH_RNG_IRQHandler /* Hash and Rng */
+ .long FPU_IRQHandler /* FPU */
+
+ .size __isr_vector, . - __isr_vector
+
+ .text
+ .thumb
+ .thumb_func
+ .align 2
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+/* Copy data core section from flash to RAM */
+ ldr r1, =__etext
+ ldr r2, =__coredata_start__
+ ldr r3, =__coredata_end__
+
+.LC0:
+ cmp r2, r3
+ ittt lt
+ ldrlt r0, [r1], #4
+ strlt r0, [r2], #4
+ blt .LC0
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+ ldr r1, =__ecoredata
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+.LC1:
+ cmp r2, r3
+ ittt lt
+ ldrlt r0, [r1], #4
+ strlt r0, [r2], #4
+ blt .LC1
+
+/* Set the bss core section to zero */
+ mov r0, #0
+ ldr r1, =__corebss_start__
+ ldr r2, =__corebss_end__
+
+.LC2:
+ cmp r1, r2
+ itt lt
+ strlt r0, [r1], #4
+ blt .LC2
+
+/* Call system initialization and startup routines */
+ ldr r0, =SystemInit
+ blx r0
+ ldr r0, =_start
+ bx r0
+ .pool
+ .size Reset_Handler, . - Reset_Handler
+
+ .text
+/* Macro to define default handlers. Default handler
+ * will be weak symbol and just dead loops. They can be
+ * overwritten by other handlers */
+ .macro def_default_handler handler_name
+ .align 1
+ .thumb_func
+ .weak \handler_name
+ .type \handler_name, %function
+\handler_name :
+ b .
+ .size \handler_name, . - \handler_name
+ .endm
+
+ def_default_handler NMI_Handler
+ def_default_handler HardFault_Handler
+ def_default_handler MemManage_Handler
+ def_default_handler BusFault_Handler
+ def_default_handler UsageFault_Handler
+ def_default_handler SVC_Handler
+ def_default_handler DebugMon_Handler
+ def_default_handler PendSV_Handler
+ def_default_handler SysTick_Handler
+ def_default_handler Default_Handler
+
+ .macro def_irq_default_handler handler_name
+ .weak \handler_name
+ .set \handler_name, Default_Handler
+ .endm
+
+ def_irq_default_handler WWDG_IRQHandler
+ def_irq_default_handler PVD_IRQHandler
+ def_irq_default_handler TAMP_STAMP_IRQHandler
+ def_irq_default_handler RTC_WKUP_IRQHandler
+ def_irq_default_handler FLASH_IRQHandler
+ def_irq_default_handler RCC_IRQHandler
+ def_irq_default_handler EXTI0_IRQHandler
+ def_irq_default_handler EXTI1_IRQHandler
+ def_irq_default_handler EXTI2_IRQHandler
+ def_irq_default_handler EXTI3_IRQHandler
+ def_irq_default_handler EXTI4_IRQHandler
+ def_irq_default_handler DMA1_Stream0_IRQHandler
+ def_irq_default_handler DMA1_Stream1_IRQHandler
+ def_irq_default_handler DMA1_Stream2_IRQHandler
+ def_irq_default_handler DMA1_Stream3_IRQHandler
+ def_irq_default_handler DMA1_Stream4_IRQHandler
+ def_irq_default_handler DMA1_Stream5_IRQHandler
+ def_irq_default_handler DMA1_Stream6_IRQHandler
+ def_irq_default_handler ADC_IRQHandler
+ def_irq_default_handler CAN1_TX_IRQHandler
+ def_irq_default_handler CAN1_RX0_IRQHandler
+ def_irq_default_handler CAN1_RX1_IRQHandler
+ def_irq_default_handler CAN1_SCE_IRQHandler
+ def_irq_default_handler EXTI9_5_IRQHandler
+ def_irq_default_handler TIM1_BRK_TIM9_IRQHandler
+ def_irq_default_handler TIM1_UP_TIM10_IRQHandler
+ def_irq_default_handler TIM1_TRG_COM_TIM11_IRQHandler
+ def_irq_default_handler TIM1_CC_IRQHandler
+ def_irq_default_handler TIM2_IRQHandler
+ def_irq_default_handler TIM3_IRQHandler
+ def_irq_default_handler TIM4_IRQHandler
+ def_irq_default_handler I2C1_EV_IRQHandler
+ def_irq_default_handler I2C1_ER_IRQHandler
+ def_irq_default_handler I2C2_EV_IRQHandler
+ def_irq_default_handler I2C2_ER_IRQHandler
+ def_irq_default_handler SPI1_IRQHandler
+ def_irq_default_handler SPI2_IRQHandler
+ def_irq_default_handler USART1_IRQHandler
+ def_irq_default_handler USART2_IRQHandler
+ def_irq_default_handler USART3_IRQHandler
+ def_irq_default_handler EXTI15_10_IRQHandler
+ def_irq_default_handler RTC_Alarm_IRQHandler
+ def_irq_default_handler OTG_FS_WKUP_IRQHandler
+ def_irq_default_handler TIM8_BRK_TIM12_IRQHandler
+ def_irq_default_handler TIM8_UP_TIM13_IRQHandler
+ def_irq_default_handler TIM8_TRG_COM_TIM14_IRQHandler
+ def_irq_default_handler TIM8_CC_IRQHandler
+ def_irq_default_handler DMA1_Stream7_IRQHandler
+ def_irq_default_handler FSMC_IRQHandler
+ def_irq_default_handler SDIO_IRQHandler
+ def_irq_default_handler TIM5_IRQHandler
+ def_irq_default_handler SPI3_IRQHandler
+ def_irq_default_handler UART4_IRQHandler
+ def_irq_default_handler UART5_IRQHandler
+ def_irq_default_handler TIM6_DAC_IRQHandler
+ def_irq_default_handler TIM7_IRQHandler
+ def_irq_default_handler DMA2_Stream0_IRQHandler
+ def_irq_default_handler DMA2_Stream1_IRQHandler
+ def_irq_default_handler DMA2_Stream2_IRQHandler
+ def_irq_default_handler DMA2_Stream3_IRQHandler
+ def_irq_default_handler DMA2_Stream4_IRQHandler
+ def_irq_default_handler ETH_IRQHandler
+ def_irq_default_handler ETH_WKUP_IRQHandler
+ def_irq_default_handler CAN2_TX_IRQHandler
+ def_irq_default_handler CAN2_RX0_IRQHandler
+ def_irq_default_handler CAN2_RX1_IRQHandler
+ def_irq_default_handler CAN2_SCE_IRQHandler
+ def_irq_default_handler OTG_FS_IRQHandler
+ def_irq_default_handler DMA2_Stream5_IRQHandler
+ def_irq_default_handler DMA2_Stream6_IRQHandler
+ def_irq_default_handler DMA2_Stream7_IRQHandler
+ def_irq_default_handler USART6_IRQHandler
+ def_irq_default_handler I2C3_EV_IRQHandler
+ def_irq_default_handler I2C3_ER_IRQHandler
+ def_irq_default_handler OTG_HS_EP1_OUT_IRQHandler
+ def_irq_default_handler OTG_HS_EP1_IN_IRQHandler
+ def_irq_default_handler OTG_HS_WKUP_IRQHandler
+ def_irq_default_handler OTG_HS_IRQHandler
+ def_irq_default_handler DCMI_IRQHandler
+ def_irq_default_handler CRYP_IRQHandler
+ def_irq_default_handler HASH_RNG_IRQHandler
+ def_irq_default_handler FPU_IRQHandler
+ def_irq_default_handler DEF_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52.s
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52.s b/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52.s
new file mode 100755
index 0000000..fb804fd
--- /dev/null
+++ b/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52.s
@@ -0,0 +1,289 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long POWER_CLOCK_IRQHandler
+ .long RADIO_IRQHandler
+ .long UARTE0_UART0_IRQHandler
+ .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ .long NFCT_IRQHandler
+ .long GPIOTE_IRQHandler
+ .long SAADC_IRQHandler
+ .long TIMER0_IRQHandler
+ .long TIMER1_IRQHandler
+ .long TIMER2_IRQHandler
+ .long RTC0_IRQHandler
+ .long TEMP_IRQHandler
+ .long RNG_IRQHandler
+ .long ECB_IRQHandler
+ .long CCM_AAR_IRQHandler
+ .long WDT_IRQHandler
+ .long RTC1_IRQHandler
+ .long QDEC_IRQHandler
+ .long COMP_LPCOMP_IRQHandler
+ .long SWI0_EGU0_IRQHandler
+ .long SWI1_EGU1_IRQHandler
+ .long SWI2_EGU2_IRQHandler
+ .long SWI3_EGU3_IRQHandler
+ .long SWI4_EGU4_IRQHandler
+ .long SWI5_EGU5_IRQHandler
+ .long TIMER3_IRQHandler
+ .long TIMER4_IRQHandler
+ .long PWM0_IRQHandler
+ .long PDM_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long MWU_IRQHandler
+ .long PWM1_IRQHandler
+ .long PWM2_IRQHandler
+ .long SPIM2_SPIS2_SPI2_IRQHandler
+ .long RTC2_IRQHandler
+ .long I2S_IRQHandler
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+
+ .weak HardFault_Handler
+ .type HardFault_Handler, %function
+HardFault_Handler:
+ B .
+ .size HardFault_Handler, . - HardFault_Handler
+
+
+ .weak MemoryManagement_Handler
+ .type MemoryManagement_Handler, %function
+MemoryManagement_Handler:
+ B .
+ .size MemoryManagement_Handler, . - MemoryManagement_Handler
+
+
+ .weak BusFault_Handler
+ .type BusFault_Handler, %function
+BusFault_Handler:
+ B .
+ .size BusFault_Handler, . - BusFault_Handler
+
+
+ .weak UsageFault_Handler
+ .type UsageFault_Handler, %function
+UsageFault_Handler:
+ B .
+ .size UsageFault_Handler, . - UsageFault_Handler
+
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+
+/* IRQ Handlers */
+
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ B .
+ .size Default_Handler, . - Default_Handler
+
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ POWER_CLOCK_IRQHandler
+ IRQ RADIO_IRQHandler
+ IRQ UARTE0_UART0_IRQHandler
+ IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ IRQ NFCT_IRQHandler
+ IRQ GPIOTE_IRQHandler
+ IRQ SAADC_IRQHandler
+ IRQ TIMER0_IRQHandler
+ IRQ TIMER1_IRQHandler
+ IRQ TIMER2_IRQHandler
+ IRQ RTC0_IRQHandler
+ IRQ TEMP_IRQHandler
+ IRQ RNG_IRQHandler
+ IRQ ECB_IRQHandler
+ IRQ CCM_AAR_IRQHandler
+ IRQ WDT_IRQHandler
+ IRQ RTC1_IRQHandler
+ IRQ QDEC_IRQHandler
+ IRQ COMP_LPCOMP_IRQHandler
+ IRQ SWI0_EGU0_IRQHandler
+ IRQ SWI1_EGU1_IRQHandler
+ IRQ SWI2_EGU2_IRQHandler
+ IRQ SWI3_EGU3_IRQHandler
+ IRQ SWI4_EGU4_IRQHandler
+ IRQ SWI5_EGU5_IRQHandler
+ IRQ TIMER3_IRQHandler
+ IRQ TIMER4_IRQHandler
+ IRQ PWM0_IRQHandler
+ IRQ PDM_IRQHandler
+ IRQ MWU_IRQHandler
+ IRQ PWM1_IRQHandler
+ IRQ PWM2_IRQHandler
+ IRQ SPIM2_SPIS2_SPI2_IRQHandler
+ IRQ RTC2_IRQHandler
+ IRQ I2S_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52_split.s
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52_split.s b/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52_split.s
new file mode 100755
index 0000000..7426848
--- /dev/null
+++ b/hw/bsp/rb-nano2/src/arch/cortex_m4/gcc_startup_nrf52_split.s
@@ -0,0 +1,150 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/bsp/stm32f4discovery/src/arch/cortex_m4/startup_STM32F40x.s
----------------------------------------------------------------------
diff --git a/hw/bsp/stm32f4discovery/src/arch/cortex_m4/startup_STM32F40x.s b/hw/bsp/stm32f4discovery/src/arch/cortex_m4/startup_STM32F40x.s
new file mode 100644
index 0000000..646b4bf
--- /dev/null
+++ b/hw/bsp/stm32f4discovery/src/arch/cortex_m4/startup_STM32F40x.s
@@ -0,0 +1,343 @@
+/* File: startup_STM32F40x.S
+ * Purpose: startup file for Cortex-M4 devices. Should use with
+ * GCC for ARM Embedded Processors
+ * Version: V1.4
+ * Date: 09 July 2012
+ *
+ * Copyright (c) 2011, 2012, ARM Limited
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the ARM Limited nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+#ifdef __STACK_SIZE
+ .equ Stack_Size, __STACK_SIZE
+#else
+ .equ Stack_Size, 0xc00
+#endif
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long MemManage_Handler /* MPU Fault Handler */
+ .long BusFault_Handler /* Bus Fault Handler */
+ .long UsageFault_Handler /* Usage Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long DebugMon_Handler /* Debug Monitor Handler */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External interrupts */
+ .long WWDG_IRQHandler /* Window WatchDog */
+ .long PVD_IRQHandler /* PVD through EXTI Line detection */
+ .long TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
+ .long RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
+ .long FLASH_IRQHandler /* FLASH */
+ .long RCC_IRQHandler /* RCC */
+ .long EXTI0_IRQHandler /* EXTI Line0 */
+ .long EXTI1_IRQHandler /* EXTI Line1 */
+ .long EXTI2_IRQHandler /* EXTI Line2 */
+ .long EXTI3_IRQHandler /* EXTI Line3 */
+ .long EXTI4_IRQHandler /* EXTI Line4 */
+ .long DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
+ .long DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
+ .long DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
+ .long DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
+ .long DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
+ .long DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
+ .long DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
+ .long ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
+ .long CAN1_TX_IRQHandler /* CAN1 TX */
+ .long CAN1_RX0_IRQHandler /* CAN1 RX0 */
+ .long CAN1_RX1_IRQHandler /* CAN1 RX1 */
+ .long CAN1_SCE_IRQHandler /* CAN1 SCE */
+ .long EXTI9_5_IRQHandler /* External Line[9:5]s */
+ .long TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
+ .long TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
+ .long TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
+ .long TIM1_CC_IRQHandler /* TIM1 Capture Compare */
+ .long TIM2_IRQHandler /* TIM2 */
+ .long TIM3_IRQHandler /* TIM3 */
+ .long TIM4_IRQHandler /* TIM4 */
+ .long I2C1_EV_IRQHandler /* I2C1 Event */
+ .long I2C1_ER_IRQHandler /* I2C1 Error */
+ .long I2C2_EV_IRQHandler /* I2C2 Event */
+ .long I2C2_ER_IRQHandler /* I2C2 Error */
+ .long SPI1_IRQHandler /* SPI1 */
+ .long SPI2_IRQHandler /* SPI2 */
+ .long USART1_IRQHandler /* USART1 */
+ .long USART2_IRQHandler /* USART2 */
+ .long USART3_IRQHandler /* USART3 */
+ .long EXTI15_10_IRQHandler /* External Line[15:10]s */
+ .long RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
+ .long OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
+ .long TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
+ .long TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
+ .long TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
+ .long TIM8_CC_IRQHandler /* TIM8 Capture Compare */
+ .long DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
+ .long FSMC_IRQHandler /* FSMC */
+ .long SDIO_IRQHandler /* SDIO */
+ .long TIM5_IRQHandler /* TIM5 */
+ .long SPI3_IRQHandler /* SPI3 */
+ .long UART4_IRQHandler /* UART4 */
+ .long UART5_IRQHandler /* UART5 */
+ .long TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
+ .long TIM7_IRQHandler /* TIM7 */
+ .long DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
+ .long DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
+ .long DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
+ .long DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
+ .long DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
+ .long ETH_IRQHandler /* Ethernet */
+ .long ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
+ .long CAN2_TX_IRQHandler /* CAN2 TX */
+ .long CAN2_RX0_IRQHandler /* CAN2 RX0 */
+ .long CAN2_RX1_IRQHandler /* CAN2 RX1 */
+ .long CAN2_SCE_IRQHandler /* CAN2 SCE */
+ .long OTG_FS_IRQHandler /* USB OTG FS */
+ .long DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
+ .long DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
+ .long DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
+ .long USART6_IRQHandler /* USART6 */
+ .long I2C3_EV_IRQHandler /* I2C3 event */
+ .long I2C3_ER_IRQHandler /* I2C3 error */
+ .long OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
+ .long OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
+ .long OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
+ .long OTG_HS_IRQHandler /* USB OTG HS */
+ .long DCMI_IRQHandler /* DCMI */
+ .long CRYP_IRQHandler /* CRYP crypto */
+ .long HASH_RNG_IRQHandler /* Hash and Rng */
+ .long FPU_IRQHandler /* FPU */
+
+ .size __isr_vector, . - __isr_vector
+
+ .text
+ .thumb
+ .thumb_func
+ .align 2
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+/* Copy data core section from flash to RAM */
+ ldr r1, =__etext
+ ldr r2, =__coredata_start__
+ ldr r3, =__coredata_end__
+
+.LC0:
+ cmp r2, r3
+ ittt lt
+ ldrlt r0, [r1], #4
+ strlt r0, [r2], #4
+ blt .LC0
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+ ldr r1, =__ecoredata
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+.LC1:
+ cmp r2, r3
+ ittt lt
+ ldrlt r0, [r1], #4
+ strlt r0, [r2], #4
+ blt .LC1
+
+/* Set the bss core section to zero */
+ mov r0, #0
+ ldr r1, =__corebss_start__
+ ldr r2, =__corebss_end__
+
+.LC2:
+ cmp r1, r2
+ itt lt
+ strlt r0, [r1], #4
+ blt .LC2
+
+/* Call system initialization and startup routines */
+ ldr r0, =SystemInit
+ blx r0
+ ldr r0, =_start
+ bx r0
+ .pool
+ .size Reset_Handler, . - Reset_Handler
+
+ .text
+/* Macro to define default handlers. Default handler
+ * will be weak symbol and just dead loops. They can be
+ * overwritten by other handlers */
+ .macro def_default_handler handler_name
+ .align 1
+ .thumb_func
+ .weak \handler_name
+ .type \handler_name, %function
+\handler_name :
+ b .
+ .size \handler_name, . - \handler_name
+ .endm
+
+ def_default_handler NMI_Handler
+ def_default_handler HardFault_Handler
+ def_default_handler MemManage_Handler
+ def_default_handler BusFault_Handler
+ def_default_handler UsageFault_Handler
+ def_default_handler SVC_Handler
+ def_default_handler DebugMon_Handler
+ def_default_handler PendSV_Handler
+ def_default_handler SysTick_Handler
+ def_default_handler Default_Handler
+
+ .macro def_irq_default_handler handler_name
+ .weak \handler_name
+ .set \handler_name, Default_Handler
+ .endm
+
+ def_irq_default_handler WWDG_IRQHandler
+ def_irq_default_handler PVD_IRQHandler
+ def_irq_default_handler TAMP_STAMP_IRQHandler
+ def_irq_default_handler RTC_WKUP_IRQHandler
+ def_irq_default_handler FLASH_IRQHandler
+ def_irq_default_handler RCC_IRQHandler
+ def_irq_default_handler EXTI0_IRQHandler
+ def_irq_default_handler EXTI1_IRQHandler
+ def_irq_default_handler EXTI2_IRQHandler
+ def_irq_default_handler EXTI3_IRQHandler
+ def_irq_default_handler EXTI4_IRQHandler
+ def_irq_default_handler DMA1_Stream0_IRQHandler
+ def_irq_default_handler DMA1_Stream1_IRQHandler
+ def_irq_default_handler DMA1_Stream2_IRQHandler
+ def_irq_default_handler DMA1_Stream3_IRQHandler
+ def_irq_default_handler DMA1_Stream4_IRQHandler
+ def_irq_default_handler DMA1_Stream5_IRQHandler
+ def_irq_default_handler DMA1_Stream6_IRQHandler
+ def_irq_default_handler ADC_IRQHandler
+ def_irq_default_handler CAN1_TX_IRQHandler
+ def_irq_default_handler CAN1_RX0_IRQHandler
+ def_irq_default_handler CAN1_RX1_IRQHandler
+ def_irq_default_handler CAN1_SCE_IRQHandler
+ def_irq_default_handler EXTI9_5_IRQHandler
+ def_irq_default_handler TIM1_BRK_TIM9_IRQHandler
+ def_irq_default_handler TIM1_UP_TIM10_IRQHandler
+ def_irq_default_handler TIM1_TRG_COM_TIM11_IRQHandler
+ def_irq_default_handler TIM1_CC_IRQHandler
+ def_irq_default_handler TIM2_IRQHandler
+ def_irq_default_handler TIM3_IRQHandler
+ def_irq_default_handler TIM4_IRQHandler
+ def_irq_default_handler I2C1_EV_IRQHandler
+ def_irq_default_handler I2C1_ER_IRQHandler
+ def_irq_default_handler I2C2_EV_IRQHandler
+ def_irq_default_handler I2C2_ER_IRQHandler
+ def_irq_default_handler SPI1_IRQHandler
+ def_irq_default_handler SPI2_IRQHandler
+ def_irq_default_handler USART1_IRQHandler
+ def_irq_default_handler USART2_IRQHandler
+ def_irq_default_handler USART3_IRQHandler
+ def_irq_default_handler EXTI15_10_IRQHandler
+ def_irq_default_handler RTC_Alarm_IRQHandler
+ def_irq_default_handler OTG_FS_WKUP_IRQHandler
+ def_irq_default_handler TIM8_BRK_TIM12_IRQHandler
+ def_irq_default_handler TIM8_UP_TIM13_IRQHandler
+ def_irq_default_handler TIM8_TRG_COM_TIM14_IRQHandler
+ def_irq_default_handler TIM8_CC_IRQHandler
+ def_irq_default_handler DMA1_Stream7_IRQHandler
+ def_irq_default_handler FSMC_IRQHandler
+ def_irq_default_handler SDIO_IRQHandler
+ def_irq_default_handler TIM5_IRQHandler
+ def_irq_default_handler SPI3_IRQHandler
+ def_irq_default_handler UART4_IRQHandler
+ def_irq_default_handler UART5_IRQHandler
+ def_irq_default_handler TIM6_DAC_IRQHandler
+ def_irq_default_handler TIM7_IRQHandler
+ def_irq_default_handler DMA2_Stream0_IRQHandler
+ def_irq_default_handler DMA2_Stream1_IRQHandler
+ def_irq_default_handler DMA2_Stream2_IRQHandler
+ def_irq_default_handler DMA2_Stream3_IRQHandler
+ def_irq_default_handler DMA2_Stream4_IRQHandler
+ def_irq_default_handler ETH_IRQHandler
+ def_irq_default_handler ETH_WKUP_IRQHandler
+ def_irq_default_handler CAN2_TX_IRQHandler
+ def_irq_default_handler CAN2_RX0_IRQHandler
+ def_irq_default_handler CAN2_RX1_IRQHandler
+ def_irq_default_handler CAN2_SCE_IRQHandler
+ def_irq_default_handler OTG_FS_IRQHandler
+ def_irq_default_handler DMA2_Stream5_IRQHandler
+ def_irq_default_handler DMA2_Stream6_IRQHandler
+ def_irq_default_handler DMA2_Stream7_IRQHandler
+ def_irq_default_handler USART6_IRQHandler
+ def_irq_default_handler I2C3_EV_IRQHandler
+ def_irq_default_handler I2C3_ER_IRQHandler
+ def_irq_default_handler OTG_HS_EP1_OUT_IRQHandler
+ def_irq_default_handler OTG_HS_EP1_IN_IRQHandler
+ def_irq_default_handler OTG_HS_WKUP_IRQHandler
+ def_irq_default_handler OTG_HS_IRQHandler
+ def_irq_default_handler DCMI_IRQHandler
+ def_irq_default_handler CRYP_IRQHandler
+ def_irq_default_handler HASH_RNG_IRQHandler
+ def_irq_default_handler FPU_IRQHandler
+ def_irq_default_handler DEF_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s b/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s
deleted file mode 100755
index fbc88bd..0000000
--- a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51.s
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv6-m
-
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector
- .align 2
- .globl __isr_vector
-__isr_vector:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler /* Reset Handler */
- .long _NMI_Handler /* NMI Handler */
- .long _HardFault_Handler /* Hard Fault Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long _SVC_Handler /* SVCall Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long _PendSV_Handler /* PendSV Handler */
- .long _SysTick_Handler /* SysTick Handler */
-
- /* External Interrupts */
- .long _POWER_CLOCK_IRQHandler
- .long _RADIO_IRQHandler
- .long _UART0_IRQHandler
- .long _SPI0_TWI0_IRQHandler
- .long _SPI1_TWI1_IRQHandler
- .long 0 /*Reserved */
- .long _GPIOTE_IRQHandler
- .long ADC_IRQHandler
- .long _TIMER0_IRQHandler
- .long _TIMER1_IRQHandler
- .long _TIMER2_IRQHandler
- .long _RTC0_IRQHandler
- .long _TEMP_IRQHandler
- .long _RNG_IRQHandler
- .long _ECB_IRQHandler
- .long _CCM_AAR_IRQHandler
- .long _WDT_IRQHandler
- .long _RTC1_IRQHandler
- .long _QDEC_IRQHandler
- .long _LPCOMP_IRQHandler
- .long _SWI0_IRQHandler
- .long _SWI1_IRQHandler
- .long _SWI2_IRQHandler
- .long _SWI3_IRQHandler
- .long _SWI4_IRQHandler
- .long _SWI5_IRQHandler
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long 0 /*Reserved */
-
- .size __isr_vector, . - __isr_vector
-
-/* Reset Handler */
-
- .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
- .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
- .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler
- .type Reset_Handler, %function
-Reset_Handler:
- .fnstart
-
-/* Make sure ALL RAM banks are powered on */
- MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
-
- LDR R0, =NRF_POWER_RAMON_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
- LDR R0, =NRF_POWER_RAMONB_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-.LC0:
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler,.-Reset_Handler
-
- .section ".text"
-
-
-/* Dummy Exception Handlers (infinite loops which can be modified) */
-
- .weak NMI_Handler
- .type NMI_Handler, %function
-NMI_Handler:
- B .
- .size NMI_Handler, . - NMI_Handler
-
- .weak SVC_Handler
- .type SVC_Handler, %function
-SVC_Handler:
- B .
- .size SVC_Handler, . - SVC_Handler
-
-
- .weak PendSV_Handler
- .type PendSV_Handler, %function
-PendSV_Handler:
- B .
- .size PendSV_Handler, . - PendSV_Handler
-
-
- .weak SysTick_Handler
- .type SysTick_Handler, %function
-SysTick_Handler:
- B .
- .size SysTick_Handler, . - SysTick_Handler
-
-/* Default handler. This uses the vector in the relocated vector table */
- .globl Default_Handler
- .type Default_Handler, %function
-Default_Handler:
- LDR R2, =__vector_tbl_reloc__
- MRS R0, PSR
- MOVS R1, #0x3F
- ANDS R0, R1
- LSLS R0, R0, #2
- LDR R0, [R0, R2]
- BX R0
- .size Default_Handler, . - Default_Handler
-
-/*
- * All of the following IRQ Handlers will point to the default handler unless
- * they are defined elsewhere.
- */
- .macro IRQ handler
- .weak \handler
- .set \handler, Default_Handler
- .endm
-
- IRQ _NMI_Handler
- IRQ _HardFault_Handler
- IRQ _SVC_Handler
- IRQ _PendSV_Handler
- IRQ _SysTick_Handler
- IRQ _POWER_CLOCK_IRQHandler
- IRQ _RADIO_IRQHandler
- IRQ _UART0_IRQHandler
- IRQ _SPI0_TWI0_IRQHandler
- IRQ _SPI1_TWI1_IRQHandler
- IRQ _GPIOTE_IRQHandler
- IRQ ADC_IRQHandler
- IRQ _TIMER0_IRQHandler
- IRQ _TIMER1_IRQHandler
- IRQ _TIMER2_IRQHandler
- IRQ _RTC0_IRQHandler
- IRQ _TEMP_IRQHandler
- IRQ _RNG_IRQHandler
- IRQ _ECB_IRQHandler
- IRQ _CCM_AAR_IRQHandler
- IRQ _WDT_IRQHandler
- IRQ _RTC1_IRQHandler
- IRQ _QDEC_IRQHandler
- IRQ _LPCOMP_IRQHandler
- IRQ _SWI0_IRQHandler
- IRQ _SWI1_IRQHandler
- IRQ _SWI2_IRQHandler
- IRQ _SWI3_IRQHandler
- IRQ _SWI4_IRQHandler
- IRQ _SWI5_IRQHandler
-
- .end
[27/50] [abbrv] incubator-mynewt-core git commit: BLE TPS service -
Use latest host API.
Posted by cc...@apache.org.
BLE TPS service - Use latest host API.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/524af89e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/524af89e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/524af89e
Branch: refs/heads/master
Commit: 524af89eee7c166e451eb4f923ffc3d533ad8d12
Parents: 58d6bcd
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 8 14:53:40 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 14:53:40 2016 -0800
----------------------------------------------------------------------
net/nimble/host/services/tps/src/ble_svc_tps.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/524af89e/net/nimble/host/services/tps/src/ble_svc_tps.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/tps/src/ble_svc_tps.c b/net/nimble/host/services/tps/src/ble_svc_tps.c
index 2351a79..6987a5d 100644
--- a/net/nimble/host/services/tps/src/ble_svc_tps.c
+++ b/net/nimble/host/services/tps/src/ble_svc_tps.c
@@ -19,9 +19,17 @@
#include <assert.h>
#include <string.h>
+#include "sysinit/sysinit.h"
+#include "syscfg/syscfg.h"
#include "host/ble_hs.h"
#include "services/tps/ble_svc_tps.h"
+/* XXX: We shouldn't be including the host's private header files. The host
+ * API needs to be updated with a function to query the advertising transmit
+ * power.
+ */
+#include "../src/ble_hs_hci_priv.h"
+
int8_t ble_svc_tps_tx_power_level;
/* Access function */
@@ -63,7 +71,11 @@ ble_svc_tps_access(uint16_t conn_handle, uint16_t attr_handle,
switch (ctxt->op) {
case BLE_GATT_ACCESS_OP_READ_CHR:
- ble_hci_util_read_adv_tx_pwr(&ble_svc_tps_tx_power_level);
+ rc = ble_hs_hci_util_read_adv_tx_pwr(&ble_svc_tps_tx_power_level);
+ if (rc != 0) {
+ return BLE_ATT_ERR_UNLIKELY;
+ }
+
rc = os_mbuf_append(ctxt->om, &ble_svc_tps_tx_power_level,
sizeof ble_svc_tps_tx_power_level);
return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
@@ -84,7 +96,7 @@ ble_svc_tps_init(void)
{
int rc;
- rc = ble_gatts_count_cfg(ble_svc_tps_defs, cfg);
+ rc = ble_gatts_count_cfg(ble_svc_tps_defs);
SYSINIT_PANIC_ASSERT(rc == 0);
rc = ble_gatts_add_svcs(ble_svc_tps_defs);
[43/50] [abbrv] incubator-mynewt-core git commit: Adding coredump
support for red bear nano 1
Posted by cc...@apache.org.
Adding coredump support for red bear nano 1
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/7102b024
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/7102b024
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/7102b024
Branch: refs/heads/master
Commit: 7102b024e673433b486f7825684e283ee9aa799a
Parents: e2b6001
Author: Vipul Rahane <vi...@apache.org>
Authored: Wed Nov 9 18:11:08 2016 -0800
Committer: Vipul Rahane <vi...@apache.org>
Committed: Wed Nov 9 18:12:14 2016 -0800
----------------------------------------------------------------------
hw/bsp/nrf51-blenano/include/bsp/bsp.h | 4 ++++
hw/bsp/nrf51-blenano/src/hal_bsp.c | 18 ++++++++++++++++++
2 files changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7102b024/hw/bsp/nrf51-blenano/include/bsp/bsp.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/include/bsp/bsp.h b/hw/bsp/nrf51-blenano/include/bsp/bsp.h
index e46ec90..9a381ac 100644
--- a/hw/bsp/nrf51-blenano/include/bsp/bsp.h
+++ b/hw/bsp/nrf51-blenano/include/bsp/bsp.h
@@ -24,6 +24,7 @@
extern "C" {
#endif
+#include "inttypes.h"
/* Define special stackos sections */
#define sec_data_core __attribute__((section(".data.core")))
#define sec_bss_core __attribute__((section(".bss.core")))
@@ -31,6 +32,9 @@ extern "C" {
/* More convenient section placement macros. */
#define bssnz_t
+extern uint8_t _ram_start;
+#define RAM_SIZE 0x8000
+
/* LED pins */
#define LED_BLINK_PIN (19)
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7102b024/hw/bsp/nrf51-blenano/src/hal_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/src/hal_bsp.c b/hw/bsp/nrf51-blenano/src/hal_bsp.c
index 8bc8f22..1b6ef42 100644
--- a/hw/bsp/nrf51-blenano/src/hal_bsp.c
+++ b/hw/bsp/nrf51-blenano/src/hal_bsp.c
@@ -20,6 +20,7 @@
#include <stdint.h>
#include <stddef.h>
#include <assert.h>
+#include "bsp/bsp.h"
#include <nrf51.h>
#include "mcu/nrf51_hal.h"
#include "hal/hal_bsp.h"
@@ -86,6 +87,16 @@ static const nrf_drv_spis_config_t os_bsp_spi1s_cfg = {
};
#endif
+/*
+ * What memory to include in coredump.
+ */
+static const struct hal_bsp_mem_dump dump_cfg[] = {
+ [0] = {
+ .hbmd_start = &_ram_start,
+ .hbmd_size = RAM_SIZE
+ }
+};
+
const struct hal_flash *
hal_bsp_flash_dev(uint8_t id)
{
@@ -98,6 +109,13 @@ hal_bsp_flash_dev(uint8_t id)
return &nrf51_flash_dev;
}
+const struct hal_bsp_mem_dump *
+hal_bsp_core_dump(int *area_cnt)
+{
+ *area_cnt = sizeof(dump_cfg) / sizeof(dump_cfg[0]);
+ return dump_cfg;
+}
+
int
hal_bsp_power_state(int state)
{
[12/50] [abbrv] incubator-mynewt-core git commit: Move startup code
back into BSP pgks (from MCU).
Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s b/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s
deleted file mode 100755
index ed5f207..0000000
--- a/hw/mcu/nordic/nrf51xxx/src/arch/cortex_m0/gcc_startup_nrf51_split.s
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv6-m
-
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector_split
- .align 2
- .globl __isr_vector_split
-__isr_vector_split:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler_split /* Reset Handler */
-
- .size __isr_vector_split, . - __isr_vector_split
-
-/* Reset Handler */
-
- .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
- .equ NRF_POWER_RAMONB_ADDRESS, 0x40000554
- .equ NRF_POWER_RAMONx_RAMxON_ONMODE_Msk, 0x3
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler_split
- .type Reset_Handler_split, %function
-Reset_Handler_split:
- .fnstart
-
-/* Make sure ALL RAM banks are powered on */
- MOVS R1, #NRF_POWER_RAMONx_RAMxON_ONMODE_Msk
-
- LDR R0, =NRF_POWER_RAMON_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
- LDR R0, =NRF_POWER_RAMONB_ADDRESS
- LDR R2, [R0]
- ORRS R2, R1
- STR R2, [R0]
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-.LC0:
- ldr r1, =__etext_loader
- ldr r2, =__data_start___loader
- ldr r3, =__data_end___loader
-
- subs r3, r2
- ble .LC2
-
-.LC3:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC3
-.LC2:
-
- subs r0, r0
- ldr r2, =__bss_start___loader
- ldr r3, =__bss_end___loader
-
- subs r3, r2
- ble .LC4
-
-.LC5:
- subs r3, 4
- str r0, [r2,r3]
- bgt .LC5
-.LC4:
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler_split,.-Reset_Handler_split
-
- .section ".text"
-
- .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
deleted file mode 100755
index fb804fd..0000000
--- a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv7-m
-
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector
- .align 2
- .globl __isr_vector
-__isr_vector:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler /* Reset Handler */
- .long NMI_Handler /* NMI Handler */
- .long HardFault_Handler /* Hard Fault Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long SVC_Handler /* SVCall Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long PendSV_Handler /* PendSV Handler */
- .long SysTick_Handler /* SysTick Handler */
-
- /* External Interrupts */
- .long POWER_CLOCK_IRQHandler
- .long RADIO_IRQHandler
- .long UARTE0_UART0_IRQHandler
- .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
- .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
- .long NFCT_IRQHandler
- .long GPIOTE_IRQHandler
- .long SAADC_IRQHandler
- .long TIMER0_IRQHandler
- .long TIMER1_IRQHandler
- .long TIMER2_IRQHandler
- .long RTC0_IRQHandler
- .long TEMP_IRQHandler
- .long RNG_IRQHandler
- .long ECB_IRQHandler
- .long CCM_AAR_IRQHandler
- .long WDT_IRQHandler
- .long RTC1_IRQHandler
- .long QDEC_IRQHandler
- .long COMP_LPCOMP_IRQHandler
- .long SWI0_EGU0_IRQHandler
- .long SWI1_EGU1_IRQHandler
- .long SWI2_EGU2_IRQHandler
- .long SWI3_EGU3_IRQHandler
- .long SWI4_EGU4_IRQHandler
- .long SWI5_EGU5_IRQHandler
- .long TIMER3_IRQHandler
- .long TIMER4_IRQHandler
- .long PWM0_IRQHandler
- .long PDM_IRQHandler
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long MWU_IRQHandler
- .long PWM1_IRQHandler
- .long PWM2_IRQHandler
- .long SPIM2_SPIS2_SPI2_IRQHandler
- .long RTC2_IRQHandler
- .long I2S_IRQHandler
-
- .size __isr_vector, . - __isr_vector
-
-/* Reset Handler */
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler
- .type Reset_Handler, %function
-Reset_Handler:
- .fnstart
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-
-.LC0:
-
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
-
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler,.-Reset_Handler
-
- .section ".text"
-
-
-/* Dummy Exception Handlers (infinite loops which can be modified) */
-
- .weak NMI_Handler
- .type NMI_Handler, %function
-NMI_Handler:
- B .
- .size NMI_Handler, . - NMI_Handler
-
-
- .weak HardFault_Handler
- .type HardFault_Handler, %function
-HardFault_Handler:
- B .
- .size HardFault_Handler, . - HardFault_Handler
-
-
- .weak MemoryManagement_Handler
- .type MemoryManagement_Handler, %function
-MemoryManagement_Handler:
- B .
- .size MemoryManagement_Handler, . - MemoryManagement_Handler
-
-
- .weak BusFault_Handler
- .type BusFault_Handler, %function
-BusFault_Handler:
- B .
- .size BusFault_Handler, . - BusFault_Handler
-
-
- .weak UsageFault_Handler
- .type UsageFault_Handler, %function
-UsageFault_Handler:
- B .
- .size UsageFault_Handler, . - UsageFault_Handler
-
-
- .weak SVC_Handler
- .type SVC_Handler, %function
-SVC_Handler:
- B .
- .size SVC_Handler, . - SVC_Handler
-
-
- .weak PendSV_Handler
- .type PendSV_Handler, %function
-PendSV_Handler:
- B .
- .size PendSV_Handler, . - PendSV_Handler
-
-
- .weak SysTick_Handler
- .type SysTick_Handler, %function
-SysTick_Handler:
- B .
- .size SysTick_Handler, . - SysTick_Handler
-
-
-/* IRQ Handlers */
-
- .globl Default_Handler
- .type Default_Handler, %function
-Default_Handler:
- B .
- .size Default_Handler, . - Default_Handler
-
- .macro IRQ handler
- .weak \handler
- .set \handler, Default_Handler
- .endm
-
- IRQ POWER_CLOCK_IRQHandler
- IRQ RADIO_IRQHandler
- IRQ UARTE0_UART0_IRQHandler
- IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
- IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
- IRQ NFCT_IRQHandler
- IRQ GPIOTE_IRQHandler
- IRQ SAADC_IRQHandler
- IRQ TIMER0_IRQHandler
- IRQ TIMER1_IRQHandler
- IRQ TIMER2_IRQHandler
- IRQ RTC0_IRQHandler
- IRQ TEMP_IRQHandler
- IRQ RNG_IRQHandler
- IRQ ECB_IRQHandler
- IRQ CCM_AAR_IRQHandler
- IRQ WDT_IRQHandler
- IRQ RTC1_IRQHandler
- IRQ QDEC_IRQHandler
- IRQ COMP_LPCOMP_IRQHandler
- IRQ SWI0_EGU0_IRQHandler
- IRQ SWI1_EGU1_IRQHandler
- IRQ SWI2_EGU2_IRQHandler
- IRQ SWI3_EGU3_IRQHandler
- IRQ SWI4_EGU4_IRQHandler
- IRQ SWI5_EGU5_IRQHandler
- IRQ TIMER3_IRQHandler
- IRQ TIMER4_IRQHandler
- IRQ PWM0_IRQHandler
- IRQ PDM_IRQHandler
- IRQ MWU_IRQHandler
- IRQ PWM1_IRQHandler
- IRQ PWM2_IRQHandler
- IRQ SPIM2_SPIS2_SPI2_IRQHandler
- IRQ RTC2_IRQHandler
- IRQ I2S_IRQHandler
-
- .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
deleted file mode 100755
index 7426848..0000000
--- a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv7-m
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector_split
- .align 2
- .globl __isr_vector_split
-__isr_vector_split:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler_split /* Reset Handler */
-
- .size __isr_vector_split, . - __isr_vector_split
-
-/* Reset Handler */
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler_split
- .type Reset_Handler_split, %function
-Reset_Handler_split:
- .fnstart
-
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-
-.LC0:
- ldr r1, =__etext_loader
- ldr r2, =__data_start___loader
- ldr r3, =__data_end___loader
-
- subs r3, r2
- ble .LC2
-
-.LC3:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC3
-.LC2:
-
- subs r0, r0
- ldr r2, =__bss_start___loader
- ldr r3, =__bss_end___loader
-
- subs r3, r2
- ble .LC4
-
-.LC5:
- subs r3, 4
- str r0, [r2,r3]
- bgt .LC5
-.LC4:
-
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler_split,.-Reset_Handler_split
-
- .section ".text"
- .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/90067c9a/hw/mcu/stm/stm32f4xx/src/startup_STM32F40x.s
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/src/startup_STM32F40x.s b/hw/mcu/stm/stm32f4xx/src/startup_STM32F40x.s
deleted file mode 100644
index 646b4bf..0000000
--- a/hw/mcu/stm/stm32f4xx/src/startup_STM32F40x.s
+++ /dev/null
@@ -1,343 +0,0 @@
-/* File: startup_STM32F40x.S
- * Purpose: startup file for Cortex-M4 devices. Should use with
- * GCC for ARM Embedded Processors
- * Version: V1.4
- * Date: 09 July 2012
- *
- * Copyright (c) 2011, 2012, ARM Limited
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the ARM Limited nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- .syntax unified
- .arch armv7-m
-
- .section .stack
- .align 3
-#ifdef __STACK_SIZE
- .equ Stack_Size, __STACK_SIZE
-#else
- .equ Stack_Size, 0xc00
-#endif
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector
- .align 2
- .globl __isr_vector
-__isr_vector:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler /* Reset Handler */
- .long NMI_Handler /* NMI Handler */
- .long HardFault_Handler /* Hard Fault Handler */
- .long MemManage_Handler /* MPU Fault Handler */
- .long BusFault_Handler /* Bus Fault Handler */
- .long UsageFault_Handler /* Usage Fault Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long SVC_Handler /* SVCall Handler */
- .long DebugMon_Handler /* Debug Monitor Handler */
- .long 0 /* Reserved */
- .long PendSV_Handler /* PendSV Handler */
- .long SysTick_Handler /* SysTick Handler */
-
- /* External interrupts */
- .long WWDG_IRQHandler /* Window WatchDog */
- .long PVD_IRQHandler /* PVD through EXTI Line detection */
- .long TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
- .long RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
- .long FLASH_IRQHandler /* FLASH */
- .long RCC_IRQHandler /* RCC */
- .long EXTI0_IRQHandler /* EXTI Line0 */
- .long EXTI1_IRQHandler /* EXTI Line1 */
- .long EXTI2_IRQHandler /* EXTI Line2 */
- .long EXTI3_IRQHandler /* EXTI Line3 */
- .long EXTI4_IRQHandler /* EXTI Line4 */
- .long DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
- .long DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
- .long DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
- .long DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
- .long DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
- .long DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
- .long DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
- .long ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
- .long CAN1_TX_IRQHandler /* CAN1 TX */
- .long CAN1_RX0_IRQHandler /* CAN1 RX0 */
- .long CAN1_RX1_IRQHandler /* CAN1 RX1 */
- .long CAN1_SCE_IRQHandler /* CAN1 SCE */
- .long EXTI9_5_IRQHandler /* External Line[9:5]s */
- .long TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
- .long TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
- .long TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
- .long TIM1_CC_IRQHandler /* TIM1 Capture Compare */
- .long TIM2_IRQHandler /* TIM2 */
- .long TIM3_IRQHandler /* TIM3 */
- .long TIM4_IRQHandler /* TIM4 */
- .long I2C1_EV_IRQHandler /* I2C1 Event */
- .long I2C1_ER_IRQHandler /* I2C1 Error */
- .long I2C2_EV_IRQHandler /* I2C2 Event */
- .long I2C2_ER_IRQHandler /* I2C2 Error */
- .long SPI1_IRQHandler /* SPI1 */
- .long SPI2_IRQHandler /* SPI2 */
- .long USART1_IRQHandler /* USART1 */
- .long USART2_IRQHandler /* USART2 */
- .long USART3_IRQHandler /* USART3 */
- .long EXTI15_10_IRQHandler /* External Line[15:10]s */
- .long RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
- .long OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
- .long TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
- .long TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
- .long TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
- .long TIM8_CC_IRQHandler /* TIM8 Capture Compare */
- .long DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
- .long FSMC_IRQHandler /* FSMC */
- .long SDIO_IRQHandler /* SDIO */
- .long TIM5_IRQHandler /* TIM5 */
- .long SPI3_IRQHandler /* SPI3 */
- .long UART4_IRQHandler /* UART4 */
- .long UART5_IRQHandler /* UART5 */
- .long TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
- .long TIM7_IRQHandler /* TIM7 */
- .long DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
- .long DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
- .long DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
- .long DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
- .long DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
- .long ETH_IRQHandler /* Ethernet */
- .long ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
- .long CAN2_TX_IRQHandler /* CAN2 TX */
- .long CAN2_RX0_IRQHandler /* CAN2 RX0 */
- .long CAN2_RX1_IRQHandler /* CAN2 RX1 */
- .long CAN2_SCE_IRQHandler /* CAN2 SCE */
- .long OTG_FS_IRQHandler /* USB OTG FS */
- .long DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
- .long DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
- .long DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
- .long USART6_IRQHandler /* USART6 */
- .long I2C3_EV_IRQHandler /* I2C3 event */
- .long I2C3_ER_IRQHandler /* I2C3 error */
- .long OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
- .long OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
- .long OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
- .long OTG_HS_IRQHandler /* USB OTG HS */
- .long DCMI_IRQHandler /* DCMI */
- .long CRYP_IRQHandler /* CRYP crypto */
- .long HASH_RNG_IRQHandler /* Hash and Rng */
- .long FPU_IRQHandler /* FPU */
-
- .size __isr_vector, . - __isr_vector
-
- .text
- .thumb
- .thumb_func
- .align 2
- .globl Reset_Handler
- .type Reset_Handler, %function
-Reset_Handler:
-/* Copy data core section from flash to RAM */
- ldr r1, =__etext
- ldr r2, =__coredata_start__
- ldr r3, =__coredata_end__
-
-.LC0:
- cmp r2, r3
- ittt lt
- ldrlt r0, [r1], #4
- strlt r0, [r2], #4
- blt .LC0
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
- ldr r1, =__ecoredata
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
-.LC1:
- cmp r2, r3
- ittt lt
- ldrlt r0, [r1], #4
- strlt r0, [r2], #4
- blt .LC1
-
-/* Set the bss core section to zero */
- mov r0, #0
- ldr r1, =__corebss_start__
- ldr r2, =__corebss_end__
-
-.LC2:
- cmp r1, r2
- itt lt
- strlt r0, [r1], #4
- blt .LC2
-
-/* Call system initialization and startup routines */
- ldr r0, =SystemInit
- blx r0
- ldr r0, =_start
- bx r0
- .pool
- .size Reset_Handler, . - Reset_Handler
-
- .text
-/* Macro to define default handlers. Default handler
- * will be weak symbol and just dead loops. They can be
- * overwritten by other handlers */
- .macro def_default_handler handler_name
- .align 1
- .thumb_func
- .weak \handler_name
- .type \handler_name, %function
-\handler_name :
- b .
- .size \handler_name, . - \handler_name
- .endm
-
- def_default_handler NMI_Handler
- def_default_handler HardFault_Handler
- def_default_handler MemManage_Handler
- def_default_handler BusFault_Handler
- def_default_handler UsageFault_Handler
- def_default_handler SVC_Handler
- def_default_handler DebugMon_Handler
- def_default_handler PendSV_Handler
- def_default_handler SysTick_Handler
- def_default_handler Default_Handler
-
- .macro def_irq_default_handler handler_name
- .weak \handler_name
- .set \handler_name, Default_Handler
- .endm
-
- def_irq_default_handler WWDG_IRQHandler
- def_irq_default_handler PVD_IRQHandler
- def_irq_default_handler TAMP_STAMP_IRQHandler
- def_irq_default_handler RTC_WKUP_IRQHandler
- def_irq_default_handler FLASH_IRQHandler
- def_irq_default_handler RCC_IRQHandler
- def_irq_default_handler EXTI0_IRQHandler
- def_irq_default_handler EXTI1_IRQHandler
- def_irq_default_handler EXTI2_IRQHandler
- def_irq_default_handler EXTI3_IRQHandler
- def_irq_default_handler EXTI4_IRQHandler
- def_irq_default_handler DMA1_Stream0_IRQHandler
- def_irq_default_handler DMA1_Stream1_IRQHandler
- def_irq_default_handler DMA1_Stream2_IRQHandler
- def_irq_default_handler DMA1_Stream3_IRQHandler
- def_irq_default_handler DMA1_Stream4_IRQHandler
- def_irq_default_handler DMA1_Stream5_IRQHandler
- def_irq_default_handler DMA1_Stream6_IRQHandler
- def_irq_default_handler ADC_IRQHandler
- def_irq_default_handler CAN1_TX_IRQHandler
- def_irq_default_handler CAN1_RX0_IRQHandler
- def_irq_default_handler CAN1_RX1_IRQHandler
- def_irq_default_handler CAN1_SCE_IRQHandler
- def_irq_default_handler EXTI9_5_IRQHandler
- def_irq_default_handler TIM1_BRK_TIM9_IRQHandler
- def_irq_default_handler TIM1_UP_TIM10_IRQHandler
- def_irq_default_handler TIM1_TRG_COM_TIM11_IRQHandler
- def_irq_default_handler TIM1_CC_IRQHandler
- def_irq_default_handler TIM2_IRQHandler
- def_irq_default_handler TIM3_IRQHandler
- def_irq_default_handler TIM4_IRQHandler
- def_irq_default_handler I2C1_EV_IRQHandler
- def_irq_default_handler I2C1_ER_IRQHandler
- def_irq_default_handler I2C2_EV_IRQHandler
- def_irq_default_handler I2C2_ER_IRQHandler
- def_irq_default_handler SPI1_IRQHandler
- def_irq_default_handler SPI2_IRQHandler
- def_irq_default_handler USART1_IRQHandler
- def_irq_default_handler USART2_IRQHandler
- def_irq_default_handler USART3_IRQHandler
- def_irq_default_handler EXTI15_10_IRQHandler
- def_irq_default_handler RTC_Alarm_IRQHandler
- def_irq_default_handler OTG_FS_WKUP_IRQHandler
- def_irq_default_handler TIM8_BRK_TIM12_IRQHandler
- def_irq_default_handler TIM8_UP_TIM13_IRQHandler
- def_irq_default_handler TIM8_TRG_COM_TIM14_IRQHandler
- def_irq_default_handler TIM8_CC_IRQHandler
- def_irq_default_handler DMA1_Stream7_IRQHandler
- def_irq_default_handler FSMC_IRQHandler
- def_irq_default_handler SDIO_IRQHandler
- def_irq_default_handler TIM5_IRQHandler
- def_irq_default_handler SPI3_IRQHandler
- def_irq_default_handler UART4_IRQHandler
- def_irq_default_handler UART5_IRQHandler
- def_irq_default_handler TIM6_DAC_IRQHandler
- def_irq_default_handler TIM7_IRQHandler
- def_irq_default_handler DMA2_Stream0_IRQHandler
- def_irq_default_handler DMA2_Stream1_IRQHandler
- def_irq_default_handler DMA2_Stream2_IRQHandler
- def_irq_default_handler DMA2_Stream3_IRQHandler
- def_irq_default_handler DMA2_Stream4_IRQHandler
- def_irq_default_handler ETH_IRQHandler
- def_irq_default_handler ETH_WKUP_IRQHandler
- def_irq_default_handler CAN2_TX_IRQHandler
- def_irq_default_handler CAN2_RX0_IRQHandler
- def_irq_default_handler CAN2_RX1_IRQHandler
- def_irq_default_handler CAN2_SCE_IRQHandler
- def_irq_default_handler OTG_FS_IRQHandler
- def_irq_default_handler DMA2_Stream5_IRQHandler
- def_irq_default_handler DMA2_Stream6_IRQHandler
- def_irq_default_handler DMA2_Stream7_IRQHandler
- def_irq_default_handler USART6_IRQHandler
- def_irq_default_handler I2C3_EV_IRQHandler
- def_irq_default_handler I2C3_ER_IRQHandler
- def_irq_default_handler OTG_HS_EP1_OUT_IRQHandler
- def_irq_default_handler OTG_HS_EP1_IN_IRQHandler
- def_irq_default_handler OTG_HS_WKUP_IRQHandler
- def_irq_default_handler OTG_HS_IRQHandler
- def_irq_default_handler DCMI_IRQHandler
- def_irq_default_handler CRYP_IRQHandler
- def_irq_default_handler HASH_RNG_IRQHandler
- def_irq_default_handler FPU_IRQHandler
- def_irq_default_handler DEF_IRQHandler
-
- .end
[24/50] [abbrv] incubator-mynewt-core git commit: BLE ANS service -
Use sysinit.
Posted by cc...@apache.org.
BLE ANS service - Use sysinit.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/32b0d33a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/32b0d33a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/32b0d33a
Branch: refs/heads/master
Commit: 32b0d33a3a409668e9199c9bb6c28a8f5db3d374
Parents: ff4ce46
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 8 14:40:56 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 14:40:56 2016 -0800
----------------------------------------------------------------------
.../ans/include/services/ans/ble_svc_ans.h | 4 +-
net/nimble/host/services/ans/pkg.yml | 3 +
net/nimble/host/services/ans/src/ble_svc_ans.c | 65 ++++++++------------
net/nimble/host/services/ans/syscfg.yml | 25 ++++++++
4 files changed, 56 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/32b0d33a/net/nimble/host/services/ans/include/services/ans/ble_svc_ans.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/ans/include/services/ans/ble_svc_ans.h b/net/nimble/host/services/ans/include/services/ans/ble_svc_ans.h
index eaf102a..8d3e3cf 100644
--- a/net/nimble/host/services/ans/include/services/ans/ble_svc_ans.h
+++ b/net/nimble/host/services/ans/include/services/ans/ble_svc_ans.h
@@ -79,9 +79,7 @@ int ble_svc_ans_new_alert_add(uint8_t cat_id,
const char * info_str);
int ble_svc_ans_unr_alert_add(uint8_t cat_id);
-int ble_svc_ans_init(struct ble_hs_cfg *cfg,
- uint8_t initial_new_alert_cat,
- uint8_t initial_unr_alert_cat);
+void ble_svc_ans_init(void);
#endif
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/32b0d33a/net/nimble/host/services/ans/pkg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/ans/pkg.yml b/net/nimble/host/services/ans/pkg.yml
index 91a92c6..41a738c 100644
--- a/net/nimble/host/services/ans/pkg.yml
+++ b/net/nimble/host/services/ans/pkg.yml
@@ -29,3 +29,6 @@ pkg.keywords:
pkg.deps:
- net/nimble/host
+
+pkg.init_function: ble_svc_ans_init
+pkg.init_stage: 3
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/32b0d33a/net/nimble/host/services/ans/src/ble_svc_ans.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/ans/src/ble_svc_ans.c b/net/nimble/host/services/ans/src/ble_svc_ans.c
index eae4598..249e2f5 100644
--- a/net/nimble/host/services/ans/src/ble_svc_ans.c
+++ b/net/nimble/host/services/ans/src/ble_svc_ans.c
@@ -20,6 +20,8 @@
#include <assert.h>
#include <string.h>
#include <math.h>
+#include "sysinit/sysinit.h"
+#include "syscfg/syscfg.h"
#include "host/ble_hs.h"
#include "host/ble_gap.h"
#include "services/ans/ble_svc_ans.h"
@@ -348,44 +350,6 @@ ble_svc_ans_unr_alert_add(uint8_t cat_id)
}
/**
- * Initialize the ANS with initial values for enabled categories
- * for new and unread alert characteristics. Bitwise or the
- * catagory bitmasks to enable multiple catagories.
- *
- * XXX: We should technically be able to change the new alert and
- * unread alert catagories when we have no active connections.
- *
- * @param cfg The host configuration
- * @param initial_new_alert_cat Initial supported new alert category
- * bitmask.
- * @param initial_unr_alert_cat Initial supported unread alert category
- * bitmask.
- *
- * @return 0 on success, non-zero error code otherwise.
- */
-int
-ble_svc_ans_init(struct ble_hs_cfg *cfg, uint8_t initial_new_alert_cat,
- uint8_t initial_unr_alert_cat)
-{
- int rc;
-
- ble_svc_ans_new_alert_cat = initial_new_alert_cat;
- ble_svc_ans_unr_alert_cat = initial_unr_alert_cat;
-
- rc = ble_gatts_count_cfg(ble_svc_ans_defs, cfg);
- if (rc != 0) {
- return rc;
- }
-
- rc = ble_gatts_add_svcs(ble_svc_ans_defs);
- if (rc != 0) {
- return rc;
- }
-
- return 0;
-}
-
-/**
* Send a new alert notification to the given category with the
* given info string.
*
@@ -465,3 +429,28 @@ ble_svc_ans_chr_write(struct os_mbuf *om, uint16_t min_len,
return 0;
}
+
+/**
+ * Initialize the ANS with initial values for enabled categories
+ * for new and unread alert characteristics. Bitwise or the
+ * catagory bitmasks to enable multiple catagories.
+ *
+ * XXX: We should technically be able to change the new alert and
+ * unread alert catagories when we have no active connections.
+ *
+ * @return 0 on success, non-zero error code otherwise.
+ */
+void
+ble_svc_ans_init(void)
+{
+ int rc;
+
+ rc = ble_gatts_count_cfg(ble_svc_ans_defs);
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = ble_gatts_add_svcs(ble_svc_ans_defs);
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ ble_svc_ans_new_alert_cat = MYNEWT_VAL(BLE_SVC_ANS_NEW_ALERT_CAT);
+ ble_svc_ans_unr_alert_cat = MYNEWT_VAL(BLE_SVC_ANS_UNR_ALERT_CAT);
+}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/32b0d33a/net/nimble/host/services/ans/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/ans/syscfg.yml b/net/nimble/host/services/ans/syscfg.yml
new file mode 100644
index 0000000..a77f23d
--- /dev/null
+++ b/net/nimble/host/services/ans/syscfg.yml
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+syscfg.defs:
+ BLE_SVC_ANS_NEW_ALERT_CAT:
+ description: "Initial supported new alert category bitmask."
+ value: 0
+
+ BLE_SVC_ANS_UNR_ALERT_CAT:
+ description: "Initial supported unread alert category bitmask."
+ value: 0
[31/50] [abbrv] incubator-mynewt-core git commit: boot;
don't start OS even when boot_serial is not defined.
Posted by cc...@apache.org.
boot; don't start OS even when boot_serial is not defined.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/0c51338e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/0c51338e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/0c51338e
Branch: refs/heads/master
Commit: 0c51338ed56eee51d3c1b76f90db842eae1cac44
Parents: 41e4670
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 23:29:14 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 23:29:14 2016 -0800
----------------------------------------------------------------------
apps/boot/src/boot.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0c51338e/apps/boot/src/boot.c
----------------------------------------------------------------------
diff --git a/apps/boot/src/boot.c b/apps/boot/src/boot.c
index 43280c1..fbc4b7d 100755
--- a/apps/boot/src/boot.c
+++ b/apps/boot/src/boot.c
@@ -30,6 +30,7 @@
#if MYNEWT_VAL(BOOT_SERIAL)
#include <hal/hal_gpio.h>
#include <boot_serial/boot_serial.h>
+#include <sysinit/sysinit.h>
#endif
#include <console/console.h>
#include "bootutil/image.h"
@@ -39,12 +40,7 @@
#define AREA_DESC_MAX (BOOT_AREA_DESC_MAX)
#if MYNEWT_VAL(BOOT_SERIAL)
-#define BOOT_SER_PRIO_TASK 1
-#define BOOT_SER_STACK_SZ 512
#define BOOT_SER_CONS_INPUT 128
-
-static struct os_task boot_ser_task;
-static os_stack_t boot_ser_stack[BOOT_SER_STACK_SZ];
#endif
int
@@ -67,10 +63,8 @@ main(void)
*/
hal_gpio_init_in(BOOT_SERIAL_DETECT_PIN, BOOT_SERIAL_DETECT_PIN_CFG);
if (hal_gpio_read(BOOT_SERIAL_DETECT_PIN) == BOOT_SERIAL_DETECT_PIN_VAL) {
- rc = boot_serial_task_init(&boot_ser_task, BOOT_SER_PRIO_TASK,
- boot_ser_stack, BOOT_SER_STACK_SZ, BOOT_SER_CONS_INPUT);
- assert(rc == 0);
- os_start();
+ boot_serial_start(BOOT_SER_CONS_INPUT);
+ assert(0);
}
#endif
rc = boot_go(&rsp);
[45/50] [abbrv] incubator-mynewt-core git commit: boot_serial - Begin
converting tests to use cbor
Posted by cc...@apache.org.
boot_serial - Begin converting tests to use cbor
Tests used to send JSON newtmgr commands. This conversion is
incomplete, so some tests still fail.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/82631392
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/82631392
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/82631392
Branch: refs/heads/master
Commit: 82631392b0969a4f1ae4071ed74a7acde16a02d0
Parents: 7102b02
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 18:53:21 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 18:53:21 2016 -0800
----------------------------------------------------------------------
.../src/testcases/boot_serial_empty_img_msg.c | 2 +-
.../test/src/testcases/boot_serial_img_msg.c | 27 ++++++++++++++------
.../testcases/boot_serial_upload_bigger_image.c | 2 +-
3 files changed, 21 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/82631392/boot/boot_serial/test/src/testcases/boot_serial_empty_img_msg.c
----------------------------------------------------------------------
diff --git a/boot/boot_serial/test/src/testcases/boot_serial_empty_img_msg.c b/boot/boot_serial/test/src/testcases/boot_serial_empty_img_msg.c
index 88a4ee8..ff69324 100644
--- a/boot/boot_serial/test/src/testcases/boot_serial_empty_img_msg.c
+++ b/boot/boot_serial/test/src/testcases/boot_serial_empty_img_msg.c
@@ -26,7 +26,7 @@ TEST_CASE(boot_serial_empty_img_msg)
hdr = (struct nmgr_hdr *)buf;
memset(hdr, 0, sizeof(*hdr));
hdr->nh_op = NMGR_OP_WRITE;
- hdr->nh_group = htons(NMGR_GROUP_ID_IMAGE);
+ hdr->nh_group = htons(MGMT_GROUP_ID_IMAGE);
hdr->nh_id = IMGMGR_NMGR_OP_UPLOAD;
hdr->nh_len = htons(2);
strcpy((char *)(hdr + 1), "{}");
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/82631392/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
----------------------------------------------------------------------
diff --git a/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c b/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
index 7c5428f..0ecce37 100644
--- a/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
+++ b/boot/boot_serial/test/src/testcases/boot_serial_img_msg.c
@@ -28,22 +28,33 @@ TEST_CASE(boot_serial_img_msg)
struct nmgr_hdr *hdr;
const struct flash_area *fap;
+ /* 00000000 a3 64 64 61 74 61 58 10 |.ddataX.|
+ * 00000008 a5 a5 a5 a5 a5 a5 a5 a5 |........|
+ * 00000010 a5 a5 a5 a5 a5 a5 a5 a5 |........|
+ * 00000018 63 6c 65 6e 1a 00 01 14 |clen....|
+ * 00000020 e8 63 6f 66 66 00 |.coff.|
+ */
+ static const uint8_t payload[] = {
+ 0xa3, 0x64, 0x64, 0x61, 0x74, 0x61, 0x58, 0x10,
+ /* 16 bytes of image data starts here. */
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+ 0x63, 0x6c, 0x65, 0x6e, 0x1a, 0x00, 0x01, 0x14,
+ 0xe8, 0x63, 0x6f, 0x66, 0x66, 0x00,
+ };
+
memset(img, 0xa5, sizeof(img));
- len = base64_encode(img, sizeof(img), enc_img, 1);
- assert(len > 0);
hdr = (struct nmgr_hdr *)buf;
memset(hdr, 0, sizeof(*hdr));
hdr->nh_op = NMGR_OP_WRITE;
- hdr->nh_group = htons(NMGR_GROUP_ID_IMAGE);
+ hdr->nh_group = htons(MGMT_GROUP_ID_IMAGE);
hdr->nh_id = IMGMGR_NMGR_OP_UPLOAD;
- len = sprintf((char *)(hdr + 1),
- "{\"off\":0,\"len\":16,\"data\":\"%s\"}", enc_img);
- hdr->nh_len = htons(len);
-
- len = sizeof(*hdr) + len;
+ memcpy(hdr + 1, payload, sizeof payload);
+ hdr->nh_len = htons(sizeof payload);
+ len = sizeof(*hdr) + sizeof payload;
tx_msg(buf, len);
/*
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/82631392/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
----------------------------------------------------------------------
diff --git a/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c b/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
index b551bb2..1cd8c0e 100644
--- a/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
+++ b/boot/boot_serial/test/src/testcases/boot_serial_upload_bigger_image.c
@@ -41,7 +41,7 @@ TEST_CASE(boot_serial_upload_bigger_image)
hdr = (struct nmgr_hdr *)buf;
memset(hdr, 0, sizeof(*hdr));
hdr->nh_op = NMGR_OP_WRITE;
- hdr->nh_group = htons(NMGR_GROUP_ID_IMAGE);
+ hdr->nh_group = htons(MGMT_GROUP_ID_IMAGE);
hdr->nh_id = IMGMGR_NMGR_OP_UPLOAD;
if (off) {
[18/50] [abbrv] incubator-mynewt-core git commit: wifi;
bring back the task to get this to build again.
Posted by cc...@apache.org.
wifi; bring back the task to get this to build again.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/eefa203f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/eefa203f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/eefa203f
Branch: refs/heads/master
Commit: eefa203fd730b08582c0f7b95d9526c244c18e24
Parents: 6031086
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 13:25:31 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 13:25:31 2016 -0800
----------------------------------------------------------------------
net/wifi/wifi_mgmt/src/wifi.c | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eefa203f/net/wifi/wifi_mgmt/src/wifi.c
----------------------------------------------------------------------
diff --git a/net/wifi/wifi_mgmt/src/wifi.c b/net/wifi/wifi_mgmt/src/wifi.c
index f0be059..75cdd6a 100644
--- a/net/wifi/wifi_mgmt/src/wifi.c
+++ b/net/wifi/wifi_mgmt/src/wifi.c
@@ -31,28 +31,15 @@
#include "wifi_priv.h"
static struct os_task wifi_os_task;
-struct os_eventq *wifi_evq;
+struct os_eventq wifi_evq;
static struct wifi_ap *wifi_find_ap(struct wifi_if *wi, char *ssid);
-static void wifi_events(void *arg);
+static void wifi_events(struct os_event *);
static void wifi_event_state(struct os_event *ev);
static struct wifi_if *wifi_if;
-static struct os_eventq *
-wifi_evq_get(void)
-{
- os_eventq_ensure(&wifi_evq, NULL);
- return wifi_evq;
-}
-
-void
-wifi_evq_set(struct os_eventq *evq)
-{
- os_eventq_designate(&wifi_evq, evq, NULL);
-}
-
/*
* Looks up interface based on port number.
*/
@@ -184,7 +171,7 @@ wifi_find_ap(struct wifi_if *wi, char *ssid)
}
static void
-wifi_events(void *arg)
+wifi_events(struct os_event *ev)
{
/*
* Expire connection attempts. Periodic scanning if tgt AP not visible.
@@ -334,6 +321,14 @@ wifi_event_state(struct os_event *ev)
}
}
+static void
+wifi_task(void *arg)
+{
+ while (1) {
+ os_eventq_run(&wifi_evq);
+ }
+}
+
int
wifi_task_init(uint8_t prio, os_stack_t *stack, uint16_t stack_size)
{
[28/50] [abbrv] incubator-mynewt-core git commit: newtmgr;
remove obsolete definitions.
Posted by cc...@apache.org.
newtmgr; remove obsolete definitions.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/de697825
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/de697825
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/de697825
Branch: refs/heads/master
Commit: de6978257cb90101e0b97854371bd4ab29bf6772
Parents: 524af89
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 22:01:26 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 22:02:17 2016 -0800
----------------------------------------------------------------------
mgmt/newtmgr/include/newtmgr/newtmgr.h | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/de697825/mgmt/newtmgr/include/newtmgr/newtmgr.h
----------------------------------------------------------------------
diff --git a/mgmt/newtmgr/include/newtmgr/newtmgr.h b/mgmt/newtmgr/include/newtmgr/newtmgr.h
index 2349578..98e7374 100644
--- a/mgmt/newtmgr/include/newtmgr/newtmgr.h
+++ b/mgmt/newtmgr/include/newtmgr/newtmgr.h
@@ -28,25 +28,12 @@
extern "C" {
#endif
-/* First 64 groups are reserved for system level newtmgr commands.
- * Per-user commands are then defined after group 64.
- */
-#define NMGR_GROUP_ID_DEFAULT (0)
-#define NMGR_GROUP_ID_IMAGE (1)
-#define NMGR_GROUP_ID_STATS (2)
-#define NMGR_GROUP_ID_CONFIG (3)
-#define NMGR_GROUP_ID_LOGS (4)
-#define NMGR_GROUP_ID_CRASH (5)
-#define NMGR_GROUP_ID_SPLIT (6)
-#define NMGR_GROUP_ID_RUNTEST (7)
-#define NMGR_GROUP_ID_PERUSER (64)
-
#define NMGR_OP_READ (0)
#define NMGR_OP_READ_RSP (1)
#define NMGR_OP_WRITE (2)
#define NMGR_OP_WRITE_RSP (3)
-#define NMGR_F_CBOR_RSP_COMPLETE (0x0001)
+#define NMGR_F_CBOR_RSP_COMPLETE (0x01)
struct nmgr_hdr {
uint8_t nh_op; /* NMGR_OP_XXX */
[49/50] [abbrv] incubator-mynewt-core git commit: stm32f4 hal_spi.c;
fix uninitialized return code.
Posted by cc...@apache.org.
stm32f4 hal_spi.c; fix uninitialized return code.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c28fbddf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c28fbddf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c28fbddf
Branch: refs/heads/master
Commit: c28fbddf5dc0f4f007d59c83e0af51784cc1a42d
Parents: bd6933c
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Nov 10 14:10:04 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Nov 10 14:10:38 2016 -0800
----------------------------------------------------------------------
hw/mcu/stm/stm32f4xx/src/hal_spi.c | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c28fbddf/hw/mcu/stm/stm32f4xx/src/hal_spi.c
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/src/hal_spi.c b/hw/mcu/stm/stm32f4xx/src/hal_spi.c
index f1b868b..9729066 100644
--- a/hw/mcu/stm/stm32f4xx/src/hal_spi.c
+++ b/hw/mcu/stm/stm32f4xx/src/hal_spi.c
@@ -760,6 +760,7 @@ hal_spi_slave_set_def_tx_val(int spi_num, uint16_t val)
STM32F4_HAL_SPI_RESOLVE(spi_num, spi);
if (spi->slave) {
+ rc = 0;
__HAL_DISABLE_INTERRUPTS(sr);
if (spi->handle.Init.DataSize == SPI_DATASIZE_8BIT) {
for (i = 0; i < 4; i++) {
[39/50] [abbrv] incubator-mynewt-core git commit: Fix
part2linkerscript relative paths.
Posted by cc...@apache.org.
Fix part2linkerscript relative paths.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8e986d24
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8e986d24
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8e986d24
Branch: refs/heads/master
Commit: 8e986d24852914d651b7cbdc6dffa0de081d8c8b
Parents: 5020d45
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 16:03:43 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 16:03:43 2016 -0800
----------------------------------------------------------------------
hw/bsp/bmd300eval/bsp.yml | 2 +-
hw/bsp/nrf51-blenano/bsp.yml | 2 +-
hw/bsp/nrf51dk-16kbram/bsp.yml | 2 +-
hw/bsp/nrf51dk/bsp.yml | 2 +-
hw/bsp/nrf52dk/bsp.yml | 2 +-
hw/bsp/rb-nano2/bsp.yml | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8e986d24/hw/bsp/bmd300eval/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/bsp.yml b/hw/bsp/bmd300eval/bsp.yml
index 98b1927..239825c 100644
--- a/hw/bsp/bmd300eval/bsp.yml
+++ b/hw/bsp/bmd300eval/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/bmd300eval/boot-nrf52xxaa.ld"
- "hw/mcu/nordic/nrf52xxx/nrf52.ld"
-bsp.part2linkerscript: "split-bmd300eval.ld"
+bsp.part2linkerscript: "hw/bsp/split-bmd300eval.ld"
bsp.downloadscript: "hw/bsp/bmd300eval/bmd300eval_download.sh"
bsp.debugscript: "hw/bsp/bmd300eval/bmd300eval_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8e986d24/hw/bsp/nrf51-blenano/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51-blenano/bsp.yml b/hw/bsp/nrf51-blenano/bsp.yml
index f706c3c..8fa5fe0 100644
--- a/hw/bsp/nrf51-blenano/bsp.yml
+++ b/hw/bsp/nrf51-blenano/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf51-blenano/boot-nrf51xxac.ld"
- "hw/mcu/nordic/nrf51xxx/nrf51.ld"
-bsp.part2linkerscript: "split-nrf51dk.ld"
+bsp.part2linkerscript: "hw/bsp/split-nrf51dk.ld"
bsp.downloadscript: "hw/bsp/nrf51-blenano/nrf51dk_download.sh"
bsp.debugscript: "hw/bsp/nrf51-blenano/nrf51dk_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8e986d24/hw/bsp/nrf51dk-16kbram/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk-16kbram/bsp.yml b/hw/bsp/nrf51dk-16kbram/bsp.yml
index dd2abf3..901422e 100644
--- a/hw/bsp/nrf51dk-16kbram/bsp.yml
+++ b/hw/bsp/nrf51dk-16kbram/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf51dk-16kbram/boot-nrf51xxaa.ld"
- "hw/mcu/nordic/nrf51xxx/nrf51.ld"
-bsp.part2linkerscript: "split-nrf51dk-16kbram.ld"
+bsp.part2linkerscript: "hw/bsp/split-nrf51dk-16kbram.ld"
bsp.downloadscript: "hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh"
bsp.debugscript: "hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8e986d24/hw/bsp/nrf51dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/bsp.yml b/hw/bsp/nrf51dk/bsp.yml
index 48d6792..9e5fc78 100644
--- a/hw/bsp/nrf51dk/bsp.yml
+++ b/hw/bsp/nrf51dk/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf51dk/boot-nrf51xxac.ld"
- "hw/mcu/nordic/nrf51xxx/nrf51.ld"
-bsp.part2linkerscript: "split-nrf51dk.ld"
+bsp.part2linkerscript: "hw/bsp/split-nrf51dk.ld"
bsp.downloadscript: "hw/bsp/nrf51dk/nrf51dk_download.sh"
bsp.debugscript: "hw/bsp/nrf51dk/nrf51dk_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8e986d24/hw/bsp/nrf52dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/bsp.yml b/hw/bsp/nrf52dk/bsp.yml
index 83613fe..41142cb 100644
--- a/hw/bsp/nrf52dk/bsp.yml
+++ b/hw/bsp/nrf52dk/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/nrf52dk/boot-nrf52xxaa.ld"
- "hw/mcu/nordic/nrf52xxx/nrf52.ld"
-bsp.part2linkerscript: "split-nrf52dk.ld"
+bsp.part2linkerscript: "hw/bsp/split-nrf52dk.ld"
bsp.downloadscript: "hw/bsp/nrf52dk/nrf52dk_download.sh"
bsp.debugscript: "hw/bsp/nrf52dk/nrf52dk_debug.sh"
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8e986d24/hw/bsp/rb-nano2/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/bsp.yml b/hw/bsp/rb-nano2/bsp.yml
index d461cb4..13ca042 100644
--- a/hw/bsp/rb-nano2/bsp.yml
+++ b/hw/bsp/rb-nano2/bsp.yml
@@ -25,7 +25,7 @@ bsp.linkerscript:
bsp.linkerscript.BOOT_LOADER.OVERWRITE:
- "hw/bsp/rb-nano2/boot-nrf52xxaa.ld"
- "hw/mcu/nordic/nrf52xxx/nrf52.ld"
-bsp.part2linkerscript: "split-rb-nano2.ld"
+bsp.part2linkerscript: "hw/bsp/split-rb-nano2.ld"
bsp.downloadscript: "hw/bsp/rb-nano2/rb-nano2_download.sh"
bsp.debugscript: "hw/bsp/rb-nano2/rb-nano2_debug.sh"
[29/50] [abbrv] incubator-mynewt-core git commit: boot_serial;
first take at converting from JSON to cbor encoded data.
Posted by cc...@apache.org.
boot_serial; first take at converting from JSON to cbor encoded
data.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/39a34a25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/39a34a25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/39a34a25
Branch: refs/heads/master
Commit: 39a34a25d1e657c2405196865ed50a53a5e62a8a
Parents: de69782
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 23:27:16 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 23:27:16 2016 -0800
----------------------------------------------------------------------
.../include/boot_serial/boot_serial.h | 9 +-
boot/boot_serial/pkg.yml | 2 +
boot/boot_serial/src/boot_serial.c | 228 ++++++++++---------
boot/boot_serial/src/boot_serial_priv.h | 12 +-
4 files changed, 133 insertions(+), 118 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/39a34a25/boot/boot_serial/include/boot_serial/boot_serial.h
----------------------------------------------------------------------
diff --git a/boot/boot_serial/include/boot_serial/boot_serial.h b/boot/boot_serial/include/boot_serial/boot_serial.h
index b9f6f6f..b93c28f 100644
--- a/boot/boot_serial/include/boot_serial/boot_serial.h
+++ b/boot/boot_serial/include/boot_serial/boot_serial.h
@@ -25,14 +25,11 @@ extern "C" {
#endif
/*
- * Create a task for uploading image0 over serial.
+ * Start processing newtmgr commands for uploading image0 over serial.
*
- * Task opens console serial port and waits for download command.
- * Return code 0 means new image was uploaded, non-zero means that
- * there was an error.
+ * Open console serial port and wait for download command.
*/
-int boot_serial_task_init(struct os_task *task, uint8_t prio,
- os_stack_t *stack, uint16_t stack_size, int max_input);
+void boot_serial_start(int max_input);
#ifdef __cplusplus
}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/39a34a25/boot/boot_serial/pkg.yml
----------------------------------------------------------------------
diff --git a/boot/boot_serial/pkg.yml b/boot/boot_serial/pkg.yml
index 6cf45ec..5913877 100644
--- a/boot/boot_serial/pkg.yml
+++ b/boot/boot_serial/pkg.yml
@@ -29,6 +29,8 @@ pkg.deps:
- hw/hal
- kernel/os
- boot/bootutil
+ - encoding/tinycbor
+ - encoding/cborattr
- encoding/base64
- sys/flash_map
- util/crc
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/39a34a25/boot/boot_serial/src/boot_serial.c
----------------------------------------------------------------------
diff --git a/boot/boot_serial/src/boot_serial.c b/boot/boot_serial/src/boot_serial.c
index d9a8ece..ac935c1 100644
--- a/boot/boot_serial/src/boot_serial.c
+++ b/boot/boot_serial/src/boot_serial.c
@@ -33,9 +33,13 @@
#include <os/endian.h>
#include <os/os.h>
#include <os/os_malloc.h>
+#include <os/os_cputime.h>
#include <console/console.h>
+#include <tinycbor/cbor.h>
+#include <tinycbor/cbor_buf_reader.h>
+#include <cborattr/cborattr.h>
#include <base64/base64.h>
#include <crc/crc16.h>
@@ -50,7 +54,26 @@ static uint32_t curr_off;
static uint32_t img_size;
static struct nmgr_hdr *bs_hdr;
-static void boot_serial_output(char *data, int len);
+static char bs_obuf[BOOT_SERIAL_OUT_MAX];
+
+static int bs_cbor_writer(struct cbor_encoder_writer *, const char *data,
+ int len);
+static void boot_serial_output(void);
+
+static struct cbor_encoder_writer bs_writer = {
+ .write = bs_cbor_writer
+};
+static CborEncoder bs_root;
+static CborEncoder bs_rsp;
+
+int
+bs_cbor_writer(struct cbor_encoder_writer *cew, const char *data, int len)
+{
+ memcpy(&bs_obuf[cew->bytes_written], data, len);
+ cew->bytes_written += len;
+
+ return 0;
+}
/*
* Looks for 'name' from NULL-terminated json data in buf.
@@ -86,48 +109,46 @@ bs_find_val(char *buf, char *name)
static void
bs_list(char *buf, int len)
{
- char *ptr;
+ CborEncoder images;
+ CborEncoder image;
struct image_header hdr;
uint8_t tmpbuf[64];
- const struct flash_area *fap = NULL;
- int good_img, need_comma = 0;
- int area_id;
- int rc;
- int i;
+ int i, area_id;
+ const struct flash_area *fap;
- ptr = os_malloc(BOOT_SERIAL_OUT_MAX);
- if (!ptr) {
- return;
- }
- len = snprintf(ptr, BOOT_SERIAL_OUT_MAX, "{\"images\":[");
+ cbor_encoder_create_map(&bs_root, &bs_rsp, CborIndefiniteLength);
+ cbor_encode_text_stringz(&bs_rsp, "images");
+ cbor_encoder_create_array(&bs_rsp, &images, CborIndefiniteLength);
for (i = 0; i < 2; i++) {
area_id = flash_area_id_from_image_slot(i);
- rc = flash_area_open(area_id, &fap);
- if (rc) {
+ if (flash_area_open(area_id, &fap)) {
continue;
}
flash_area_read(fap, 0, &hdr, sizeof(hdr));
- if (hdr.ih_magic == IMAGE_MAGIC &&
+ if (hdr.ih_magic != IMAGE_MAGIC ||
bootutil_img_validate(&hdr, fap, tmpbuf, sizeof(tmpbuf),
- NULL, 0, NULL) == 0) {
- good_img = 1;
- } else {
- good_img = 0;
- }
- if (good_img) {
- len += snprintf(ptr + len, BOOT_SERIAL_OUT_MAX - len,
- "%c\"%u.%u.%u.%u\"", need_comma ? ',' : ' ',
- hdr.ih_ver.iv_major, hdr.ih_ver.iv_minor, hdr.ih_ver.iv_revision,
- (unsigned int)hdr.ih_ver.iv_build_num);
+ NULL, 0, NULL)) {
+ flash_area_close(fap);
+ continue;
}
flash_area_close(fap);
- need_comma = 1;
+
+ cbor_encoder_create_map(&images, &image, CborIndefiniteLength);
+ cbor_encode_text_stringz(&image, "slot");
+ cbor_encode_int(&image, i);
+ cbor_encode_text_stringz(&image, "version");
+
+ len = snprintf((char *)tmpbuf, sizeof(tmpbuf),
+ "%u.%u.%u.%u", hdr.ih_ver.iv_major, hdr.ih_ver.iv_minor,
+ hdr.ih_ver.iv_revision, (unsigned int)hdr.ih_ver.iv_build_num);
+ cbor_encode_text_stringz(&image, (char *)tmpbuf);
+ cbor_encoder_close_container(&images, &image);
}
- len += snprintf(ptr + len, BOOT_SERIAL_OUT_MAX - len, "]}");
- boot_serial_output(ptr, len);
- os_free(ptr);
+ cbor_encoder_close_container(&bs_rsp, &images);
+ cbor_encoder_close_container(&bs_root, &bs_rsp);
+ boot_serial_output();
}
/*
@@ -136,68 +157,62 @@ bs_list(char *buf, int len)
static void
bs_upload(char *buf, int len)
{
- char *ptr;
- char *data_ptr;
- uint32_t off, data_len = 0;
+ CborParser parser;
+ struct cbor_buf_reader reader;
+ struct CborValue value;
+ uint8_t img_data[400];
+ long long unsigned int off = UINT_MAX;
+ size_t img_blen = 0;
+ long long unsigned int data_len = UINT_MAX;
+ const struct cbor_attr_t attr[4] = {
+ [0] = {
+ .attribute = "data",
+ .type = CborAttrByteStringType,
+ .addr.bytestring.data = img_data,
+ .addr.bytestring.len = &img_blen,
+ .len = sizeof(img_data)
+ },
+ [1] = {
+ .attribute = "off",
+ .type = CborAttrUnsignedIntegerType,
+ .addr.uinteger = &off,
+ .nodefault = true
+ },
+ [2] = {
+ .attribute = "len",
+ .type = CborAttrUnsignedIntegerType,
+ .addr.uinteger = &data_len,
+ .nodefault = true
+ }
+ };
const struct flash_area *fap = NULL;
int rc;
- /*
- * should be json inside
- */
- ptr = bs_find_val(buf, "\"off\"");
- if (!ptr) {
- rc = NMGR_ERR_EINVAL;
- goto out;
- }
- off = strtoul(ptr, NULL, 10);
-
- if (off == 0) {
- ptr = bs_find_val(buf, "\"len\"");
- if (!ptr) {
- rc = NMGR_ERR_EINVAL;
- goto out;
- }
- data_len = strtoul(ptr, NULL, 10);
-
- }
- data_ptr = bs_find_val(buf, "\"data\"");
- if (!data_ptr) {
- rc = NMGR_ERR_EINVAL;
- goto out;
- }
- if (*data_ptr != '"') {
- rc = NMGR_ERR_EINVAL;
- goto out;
- }
- ++data_ptr;
- data_ptr = strsep(&data_ptr, "\"");
- if (!data_ptr) {
- rc = NMGR_ERR_EINVAL;
+ memset(img_data, 0, sizeof(img_data));
+ cbor_buf_reader_init(&reader, (uint8_t *)buf, len);
+ cbor_parser_init(&reader.r, 0, &parser, &value);
+ rc = cbor_read_object(&value, attr);
+ if (rc || off == UINT_MAX) {
+ rc = MGMT_ERR_EINVAL;
goto out;
}
- len = base64_decode(data_ptr, data_ptr);
- if (len <= 0) {
- rc = NMGR_ERR_EINVAL;
- goto out;
- }
- rc = flash_area_open(FLASH_AREA_IMAGE_0, &fap);
+ rc = flash_area_open(flash_area_id_from_image_slot(0), &fap);
if (rc) {
- rc = NMGR_ERR_EINVAL;
+ rc = MGMT_ERR_EINVAL;
goto out;
}
if (off == 0) {
curr_off = 0;
if (data_len > fap->fa_size) {
- rc = NMGR_ERR_EINVAL;
+ rc = MGMT_ERR_EINVAL;
goto out;
}
rc = flash_area_erase(fap, 0, fap->fa_size);
if (rc) {
- rc = NMGR_ERR_EINVAL;
+ rc = MGMT_ERR_EINVAL;
goto out;
}
img_size = data_len;
@@ -206,26 +221,24 @@ bs_upload(char *buf, int len)
rc = 0;
goto out;
}
- rc = flash_area_write(fap, curr_off, data_ptr, len);
+ rc = flash_area_write(fap, curr_off, img_data, img_blen);
if (rc) {
- rc = NMGR_ERR_EINVAL;
+ rc = MGMT_ERR_EINVAL;
goto out;
}
- curr_off += len;
+ curr_off += img_blen;
out:
- ptr = os_malloc(BOOT_SERIAL_OUT_MAX);
- if (!ptr) {
- return;
- }
+ cbor_encoder_create_map(&bs_root, &bs_rsp, CborIndefiniteLength);
+ cbor_encode_text_stringz(&bs_rsp, "rc");
+ cbor_encode_int(&bs_rsp, rc);
if (rc == 0) {
- len = snprintf(ptr, BOOT_SERIAL_OUT_MAX, "{\"rc\":%d,\"off\":%u}",
- rc, (int)curr_off);
- } else {
- len = snprintf(ptr, BOOT_SERIAL_OUT_MAX, "{\"rc\":%d}", rc);
+ cbor_encode_text_stringz(&bs_rsp, "off");
+ cbor_encode_uint(&bs_rsp, curr_off);
}
- boot_serial_output(ptr, len);
- os_free(ptr);
+ cbor_encoder_close_container(&bs_root, &bs_rsp);
+
+ boot_serial_output();
flash_area_close(fap);
}
@@ -235,20 +248,23 @@ out:
static void
bs_echo_ctl(char *buf, int len)
{
- boot_serial_output(NULL, 0);
+ boot_serial_output();
}
/*
* Reset, and (presumably) boot to newly uploaded image. Flush console
* before restarting.
*/
-static void
+static int
bs_reset(char *buf, int len)
{
- char msg[] = "{\"rc\":0}";
+ cbor_encoder_create_map(&bs_root, &bs_rsp, CborIndefiniteLength);
+ cbor_encode_text_stringz(&bs_rsp, "rc");
+ cbor_encode_int(&bs_rsp, 0);
+ cbor_encoder_close_container(&bs_root, &bs_rsp);
- boot_serial_output(msg, strlen(msg));
- os_time_delay(250);
+ boot_serial_output();
+ os_cputime_delay_usecs(250000);
hal_system_reset();
}
@@ -273,10 +289,13 @@ boot_serial_input(char *buf, int len)
buf += sizeof(*hdr);
len -= sizeof(*hdr);
+ bs_writer.bytes_written = 0;
+ cbor_encoder_init(&bs_root, &bs_writer, 0);
+
/*
* Limited support for commands.
*/
- if (hdr->nh_group == NMGR_GROUP_ID_IMAGE) {
+ if (hdr->nh_group == MGMT_GROUP_ID_IMAGE) {
switch (hdr->nh_id) {
case IMGMGR_NMGR_OP_STATE:
bs_list(buf, len);
@@ -287,7 +306,7 @@ boot_serial_input(char *buf, int len)
default:
break;
}
- } else if (hdr->nh_group == NMGR_GROUP_ID_DEFAULT) {
+ } else if (hdr->nh_group == MGMT_GROUP_ID_DEFAULT) {
switch (hdr->nh_id) {
case NMGR_ID_CONS_ECHO_CTRL:
bs_echo_ctl(buf, len);
@@ -302,15 +321,21 @@ boot_serial_input(char *buf, int len)
}
static void
-boot_serial_output(char *data, int len)
+boot_serial_output(void)
{
+ char *data;
+ int len;
uint16_t crc;
uint16_t totlen;
char pkt_start[2] = { SHELL_NLIP_PKT_START1, SHELL_NLIP_PKT_START2 };
char buf[BOOT_SERIAL_OUT_MAX];
char encoded_buf[BASE64_ENCODE_SIZE(BOOT_SERIAL_OUT_MAX)];
+ data = bs_obuf;
+ len = bs_writer.bytes_written;
+
bs_hdr->nh_op++;
+ bs_hdr->nh_flags = NMGR_F_CBOR_RSP_COMPLETE;
bs_hdr->nh_len = htons(len);
bs_hdr->nh_group = htons(bs_hdr->nh_group);
@@ -376,9 +401,8 @@ boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout)
* Task which waits reading console, expecting to get image over
* serial port.
*/
-int cont;
-static void
-boot_serial(void *arg)
+void
+boot_serial_start(int max_input)
{
int rc;
int off;
@@ -386,7 +410,6 @@ boot_serial(void *arg)
char *dec;
int dec_off;
int full_line;
- int max_input = (int)arg;
rc = console_init(NULL);
assert(rc == 0);
@@ -412,7 +435,6 @@ boot_serial(void *arg)
rc = boot_serial_in_dec(&buf[2], off - 2, dec, &dec_off, max_input);
} else if (buf[0] == SHELL_NLIP_DATA_START1 &&
buf[1] == SHELL_NLIP_DATA_START2) {
- ++cont;
rc = boot_serial_in_dec(&buf[2], off - 2, dec, &dec_off, max_input);
}
if (rc == 1) {
@@ -421,11 +443,3 @@ boot_serial(void *arg)
off = 0;
}
}
-
-int
-boot_serial_task_init(struct os_task *task, uint8_t prio, os_stack_t *stack,
- uint16_t stack_size, int max_input)
-{
- return os_task_init(task, "boot", boot_serial, (void *)max_input,
- prio, OS_WAIT_FOREVER, stack, stack_size);
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/39a34a25/boot/boot_serial/src/boot_serial_priv.h
----------------------------------------------------------------------
diff --git a/boot/boot_serial/src/boot_serial_priv.h b/boot/boot_serial/src/boot_serial_priv.h
index b350173..146aa6a 100644
--- a/boot/boot_serial/src/boot_serial_priv.h
+++ b/boot/boot_serial/src/boot_serial_priv.h
@@ -30,19 +30,21 @@ extern "C" {
#define SHELL_NLIP_PKT_START1 6
#define SHELL_NLIP_PKT_START2 9
-#define SHELL_NLIP_DATA_START1 4
-#define SHELL_NLIP_DATA_START2 20
+#define SHELL_NLIP_DATA_START1 4
+#define SHELL_NLIP_DATA_START2 20
/*
* From newtmgr.h
*/
-#define NMGR_ERR_EINVAL 3
+#define MGMT_ERR_EINVAL 3
#define NMGR_OP_READ 0
#define NMGR_OP_WRITE 2
-#define NMGR_GROUP_ID_DEFAULT 0
-#define NMGR_GROUP_ID_IMAGE 1
+#define NMGR_F_CBOR_RSP_COMPLETE 0x01
+
+#define MGMT_GROUP_ID_DEFAULT 0
+#define MGMT_GROUP_ID_IMAGE 1
#define NMGR_ID_CONS_ECHO_CTRL 1
#define NMGR_ID_RESET 5
[38/50] [abbrv] incubator-mynewt-core git commit: License audit
Posted by cc...@apache.org.
License audit
Add apache licenses where needed; augment .rat-excludes for
third-party packages.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/5020d451
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5020d451
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5020d451
Branch: refs/heads/master
Commit: 5020d45127bc33ac96c24e7d965f7d1126f46b26
Parents: a982ff6
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Nov 9 15:54:52 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Nov 9 15:54:52 2016 -0800
----------------------------------------------------------------------
.rat-excludes | 55 ++++++++++++++++----
apps/blecent/syscfg.yml | 18 +++++++
apps/bleprph/syscfg.yml | 18 +++++++
apps/bletest/syscfg.yml | 18 +++++++
apps/bletiny/syscfg.yml | 18 +++++++
apps/bleuart/syscfg.yml | 18 +++++++
apps/boot/syscfg.yml | 18 +++++++
apps/slinky/syscfg.yml | 18 +++++++
apps/slinky_oic/syscfg.yml | 18 +++++++
apps/spitest/syscfg.yml | 18 +++++++
apps/splitty/README.md | 21 ++++++++
apps/splitty/syscfg.yml | 18 +++++++
apps/timtest/syscfg.yml | 18 +++++++
boot/boot_serial/test/syscfg.yml | 18 +++++++
boot/bootutil/syscfg.yml | 18 +++++++
boot/split/README.md | 21 ++++++++
boot/split/src/split_config.c | 19 +++++++
compiler/gdbmacros/nffs.gdb | 18 +++++++
docs/doxygen.xml | 18 +++++++
.../include/tinycbor/cbor_mbuf_reader.h | 24 +++++----
.../tinycbor/include/tinycbor/cborconstants_p.h | 19 +++++++
fs/fs/syscfg.yml | 18 +++++++
fs/nffs/syscfg.yml | 18 +++++++
fs/nffs/test/src/nffs_test.c | 19 +++++++
hw/bsp/arduino_primo_nrf52/include/bsp/boards.h | 19 +++++++
hw/bsp/bmd300eval/include/bsp/boards.h | 19 +++++++
hw/bsp/native/sim.gdb | 18 +++++++
hw/bsp/nrf51dk/include/bsp/boards.h | 19 +++++++
hw/bsp/nrf52dk/include/bsp/boards.h | 19 +++++++
hw/bsp/nrf52dk/syscfg.yml | 18 +++++++
hw/bsp/olimex_stm32-e407_devboard/syscfg.yml | 18 +++++++
hw/bsp/rb-nano2/include/bsp/boards.h | 19 +++++++
kernel/os/syscfg.yml | 18 +++++++
mgmt/imgmgr/syscfg.yml | 18 +++++++
mgmt/newtmgr/syscfg.yml | 18 +++++++
net/nimble/controller/syscfg.yml | 18 +++++++
net/nimble/host/services/bleuart/syscfg.yml | 18 +++++++
net/nimble/host/src/ble_hs_mbuf_priv.h | 19 +++++++
net/nimble/host/syscfg.yml | 18 +++++++
net/nimble/host/test/syscfg.yml | 18 +++++++
net/nimble/host/tools/log2smtest.rb | 19 +++++++
net/nimble/syscfg.yml | 18 +++++++
.../ram/include/transport/ram/ble_hci_ram.h | 19 +++++++
net/nimble/transport/ram/syscfg.yml | 18 +++++++
net/nimble/transport/uart/syscfg.yml | 18 +++++++
net/wifi/wifi_mgmt/syscfg.yml | 18 +++++++
sys/config/syscfg.yml | 18 +++++++
sys/config/test-fcb/syscfg.yml | 18 +++++++
sys/config/test-nffs/syscfg.yml | 18 +++++++
sys/console/full/syscfg.yml | 18 +++++++
sys/log/test/syscfg.yml | 18 +++++++
sys/reboot/syscfg.yml | 18 +++++++
sys/shell/syscfg.yml | 18 +++++++
sys/stats/syscfg.yml | 18 +++++++
sys/sysinit/syscfg.yml | 18 +++++++
test/runtest/syscfg.yml | 18 +++++++
56 files changed, 1050 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/.rat-excludes
----------------------------------------------------------------------
diff --git a/.rat-excludes b/.rat-excludes
index 71786d1..060f920 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -23,25 +23,38 @@ gcc_startup_nrf51.s
boot-nrf51dk-16kbram.ld
nrf51dk-16kbram.ld
nrf51dk-16kbram_no_boot.ld
+boot-nrf51-arduino_101.ld
+nrf51-arduino_101.ld
+boot-nrf51xxaa.ld
+nrf51xxaa.ld
+boot-nrf51xxac.ld
+nrf51xxac.ld
+split-nrf51dk.ld
+boot-nrf51xxac.ld
+nrf51xxac.ld
+split-nrf51dk.ld
+split-nrf51dk-16kbram.ld
+nrf51.ld
nrf51.h
nrf51422_peripherals.h
nrf51822_peripherals.h
nrf51_bitfields.h
nrf51_deprecated.h
system_nrf51.h
-boot-nrf51-arduino_101.ld
-nrf51-arduino_101.ld
+gcc_startup_nrf51_split.s
# Nordic nRF52 SDK - BSD License.
-nrf52pdk.ld
-boot-nrf52pdk.ld
-nrf52pdk_no_boot.ld
-nrf52dk.ld
-boot-nrf52dk.ld
nrf52dk_no_boot.ld
-bmd300eval.ld
-boot-bmd300eval.ld
bmd300eval_no_boot.ld
+boot-nrf52xxaa.ld
+nrf52xxaa.ld
+primo_no_boot.ld
+split-primo.ld
+split-bmd300eval.ld
+split-nrf52dk.ld
+rb-nano2_no_boot.ld
+split-rb-nano2.ld
+nrf52.ld
system_nrf52.c
gcc_startup_nrf52.s
nrf51_to_nrf52.h
@@ -49,6 +62,7 @@ nrf52.h
nrf52832_peripherals.h
nrf52_bitfields.h
system_nrf52.h
+gcc_startup_nrf52_split.s
# Nordic nRF51 SDK - BSD License.
# Nordic nRF52 SDK - BSD License.
@@ -173,3 +187,26 @@ base64.c
# crc32.c - Public domain.
crc32.c
+
+# tinycrypt - BSD License.
+tinycrypt
+
+# frdm-k64f clock configuration - BSD License.
+clock_config.c
+clock_config.h
+
+# CMSIS Cortex-M4, STM32f4 - BSD License.
+STM32F4xx
+STM32F4xx_HAL_Driver
+
+# NXP SDK - BSD License.
+sdk-2.0-frdm-k64f_b160321
+MK64FN1M0xxx12_flash.ld
+boot-MK64FN1M0xxx12_flash.ld
+startup_MK64F12.S
+
+# LWIP - BSD License.
+lwip_base
+
+# OIC - BSD License.
+oic
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/blecent/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/blecent/syscfg.yml b/apps/blecent/syscfg.yml
index f967596..b233e5d 100644
--- a/apps/blecent/syscfg.yml
+++ b/apps/blecent/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/blecent
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/bleprph/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/bleprph/syscfg.yml b/apps/bleprph/syscfg.yml
index 738dfb2..6db8c1e 100644
--- a/apps/bleprph/syscfg.yml
+++ b/apps/bleprph/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/bleprph
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/bletest/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/bletest/syscfg.yml b/apps/bletest/syscfg.yml
index 74ca068..f1a2369 100644
--- a/apps/bletest/syscfg.yml
+++ b/apps/bletest/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/bletest
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/bletiny/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/bletiny/syscfg.yml b/apps/bletiny/syscfg.yml
index 97d91a2..27acdde 100644
--- a/apps/bletiny/syscfg.yml
+++ b/apps/bletiny/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/bletiny
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/bleuart/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/bleuart/syscfg.yml b/apps/bleuart/syscfg.yml
index e6d86eb..15ddb95 100644
--- a/apps/bleuart/syscfg.yml
+++ b/apps/bleuart/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/bleuart
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/boot/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/boot/syscfg.yml b/apps/boot/syscfg.yml
index f5b168c..c9e25ed 100644
--- a/apps/boot/syscfg.yml
+++ b/apps/boot/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/boot
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/slinky/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/slinky/syscfg.yml b/apps/slinky/syscfg.yml
index 7ed1a08..7438a81 100644
--- a/apps/slinky/syscfg.yml
+++ b/apps/slinky/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/slinky
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/slinky_oic/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/slinky_oic/syscfg.yml b/apps/slinky_oic/syscfg.yml
index 896a777..6b82a40 100644
--- a/apps/slinky_oic/syscfg.yml
+++ b/apps/slinky_oic/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/slinky
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/spitest/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/spitest/syscfg.yml b/apps/spitest/syscfg.yml
index 565626b..a790cfb 100644
--- a/apps/spitest/syscfg.yml
+++ b/apps/spitest/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/spitest
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/splitty/README.md
----------------------------------------------------------------------
diff --git a/apps/splitty/README.md b/apps/splitty/README.md
index dc53092..adb1be3 100644
--- a/apps/splitty/README.md
+++ b/apps/splitty/README.md
@@ -1,3 +1,24 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+
<img src="http://mynewt.apache.org/img/logo.svg" width="250" alt="Apache Mynewt">
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/splitty/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/splitty/syscfg.yml b/apps/splitty/syscfg.yml
index 4ba5766..7ff1dfb 100644
--- a/apps/splitty/syscfg.yml
+++ b/apps/splitty/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/splitty
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/apps/timtest/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/timtest/syscfg.yml b/apps/timtest/syscfg.yml
index 619b4ec..ed8f912 100644
--- a/apps/timtest/syscfg.yml
+++ b/apps/timtest/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: apps/timtest
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/boot/boot_serial/test/syscfg.yml
----------------------------------------------------------------------
diff --git a/boot/boot_serial/test/syscfg.yml b/boot/boot_serial/test/syscfg.yml
index 2f7868c..c982db5 100644
--- a/boot/boot_serial/test/syscfg.yml
+++ b/boot/boot_serial/test/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: boot/boot_serial/test
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/boot/bootutil/syscfg.yml
----------------------------------------------------------------------
diff --git a/boot/bootutil/syscfg.yml b/boot/bootutil/syscfg.yml
index cfa3d44..2951c03 100644
--- a/boot/bootutil/syscfg.yml
+++ b/boot/bootutil/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: boot/bootutil
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/boot/split/README.md
----------------------------------------------------------------------
diff --git a/boot/split/README.md b/boot/split/README.md
index 1ef4cc5..a5cdf6b 100644
--- a/boot/split/README.md
+++ b/boot/split/README.md
@@ -1,3 +1,24 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+
<img src="http://mynewt.apache.org/img/logo.svg" width="250" alt="Apache Mynewt">
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/boot/split/src/split_config.c
----------------------------------------------------------------------
diff --git a/boot/split/src/split_config.c b/boot/split/src/split_config.c
index 9332e90..2bc7980 100644
--- a/boot/split/src/split_config.c
+++ b/boot/split/src/split_config.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#include <assert.h>
#include <string.h>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/compiler/gdbmacros/nffs.gdb
----------------------------------------------------------------------
diff --git a/compiler/gdbmacros/nffs.gdb b/compiler/gdbmacros/nffs.gdb
index 0e76d35..4d6cb80 100644
--- a/compiler/gdbmacros/nffs.gdb
+++ b/compiler/gdbmacros/nffs.gdb
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Print the linked list of nffs hash entries starting with the input argument
# (gdb) hash-list <struct nffs_hash_entry *>
#
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/docs/doxygen.xml
----------------------------------------------------------------------
diff --git a/docs/doxygen.xml b/docs/doxygen.xml
index b5c59a5..cb612e5 100644
--- a/docs/doxygen.xml
+++ b/docs/doxygen.xml
@@ -1,5 +1,23 @@
# Doxyfile 1.8.11
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/encoding/tinycbor/include/tinycbor/cbor_mbuf_reader.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/cbor_mbuf_reader.h b/encoding/tinycbor/include/tinycbor/cbor_mbuf_reader.h
index 128fda9..cbe819a 100644
--- a/encoding/tinycbor/include/tinycbor/cbor_mbuf_reader.h
+++ b/encoding/tinycbor/include/tinycbor/cbor_mbuf_reader.h
@@ -1,14 +1,20 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
-/*
- * File: cbor_mbuf_reader.h
- * Author: paulfdietrich
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Created on October 5, 2016, 1:19 PM
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
#ifndef CBOR_MBUF_READER_H
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/encoding/tinycbor/include/tinycbor/cborconstants_p.h
----------------------------------------------------------------------
diff --git a/encoding/tinycbor/include/tinycbor/cborconstants_p.h b/encoding/tinycbor/include/tinycbor/cborconstants_p.h
index 2dc0394..80f3111 100644
--- a/encoding/tinycbor/include/tinycbor/cborconstants_p.h
+++ b/encoding/tinycbor/include/tinycbor/cborconstants_p.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#ifndef CBORCONSTANTS_P_H
#define CBORCONSTANTS_P_H
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/fs/fs/syscfg.yml
----------------------------------------------------------------------
diff --git a/fs/fs/syscfg.yml b/fs/fs/syscfg.yml
index ea54fe4..487d10c 100644
--- a/fs/fs/syscfg.yml
+++ b/fs/fs/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: fs/fs
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/fs/nffs/syscfg.yml
----------------------------------------------------------------------
diff --git a/fs/nffs/syscfg.yml b/fs/nffs/syscfg.yml
index 98451b0..5602e4b 100644
--- a/fs/nffs/syscfg.yml
+++ b/fs/nffs/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: fs/nffs
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/fs/nffs/test/src/nffs_test.c
----------------------------------------------------------------------
diff --git a/fs/nffs/test/src/nffs_test.c b/fs/nffs/test/src/nffs_test.c
index 65337a5..f813687 100644
--- a/fs/nffs/test/src/nffs_test.c
+++ b/fs/nffs/test/src/nffs_test.c
@@ -6,6 +6,25 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/arduino_primo_nrf52/include/bsp/boards.h
----------------------------------------------------------------------
diff --git a/hw/bsp/arduino_primo_nrf52/include/bsp/boards.h b/hw/bsp/arduino_primo_nrf52/include/bsp/boards.h
index e69de29..560c31f 100644
--- a/hw/bsp/arduino_primo_nrf52/include/bsp/boards.h
+++ b/hw/bsp/arduino_primo_nrf52/include/bsp/boards.h
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/bmd300eval/include/bsp/boards.h
----------------------------------------------------------------------
diff --git a/hw/bsp/bmd300eval/include/bsp/boards.h b/hw/bsp/bmd300eval/include/bsp/boards.h
index e69de29..560c31f 100644
--- a/hw/bsp/bmd300eval/include/bsp/boards.h
+++ b/hw/bsp/bmd300eval/include/bsp/boards.h
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/native/sim.gdb
----------------------------------------------------------------------
diff --git a/hw/bsp/native/sim.gdb b/hw/bsp/native/sim.gdb
index 0846420..7f7ca93 100644
--- a/hw/bsp/native/sim.gdb
+++ b/hw/bsp/native/sim.gdb
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
define hook-stop
handle SIGALRM nopass
end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/nrf51dk/include/bsp/boards.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/include/bsp/boards.h b/hw/bsp/nrf51dk/include/bsp/boards.h
index e69de29..560c31f 100644
--- a/hw/bsp/nrf51dk/include/bsp/boards.h
+++ b/hw/bsp/nrf51dk/include/bsp/boards.h
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/nrf52dk/include/bsp/boards.h
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/include/bsp/boards.h b/hw/bsp/nrf52dk/include/bsp/boards.h
index e69de29..560c31f 100644
--- a/hw/bsp/nrf52dk/include/bsp/boards.h
+++ b/hw/bsp/nrf52dk/include/bsp/boards.h
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/nrf52dk/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/syscfg.yml b/hw/bsp/nrf52dk/syscfg.yml
index ae178d3..72f6afd 100644
--- a/hw/bsp/nrf52dk/syscfg.yml
+++ b/hw/bsp/nrf52dk/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: hw/bsp/nrf52dk
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml b/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
index 20dd4e1..bccc40c 100644
--- a/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
+++ b/hw/bsp/olimex_stm32-e407_devboard/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: hw/bsp/olimex_stm32-e407_devboard
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/hw/bsp/rb-nano2/include/bsp/boards.h
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/include/bsp/boards.h b/hw/bsp/rb-nano2/include/bsp/boards.h
index e69de29..560c31f 100644
--- a/hw/bsp/rb-nano2/include/bsp/boards.h
+++ b/hw/bsp/rb-nano2/include/bsp/boards.h
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/kernel/os/syscfg.yml
----------------------------------------------------------------------
diff --git a/kernel/os/syscfg.yml b/kernel/os/syscfg.yml
index 840d854..e2efda7 100644
--- a/kernel/os/syscfg.yml
+++ b/kernel/os/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: kernel/os
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/mgmt/imgmgr/syscfg.yml
----------------------------------------------------------------------
diff --git a/mgmt/imgmgr/syscfg.yml b/mgmt/imgmgr/syscfg.yml
index eea7a06..8a687af 100644
--- a/mgmt/imgmgr/syscfg.yml
+++ b/mgmt/imgmgr/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: mgmt/imgmgr
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/mgmt/newtmgr/syscfg.yml
----------------------------------------------------------------------
diff --git a/mgmt/newtmgr/syscfg.yml b/mgmt/newtmgr/syscfg.yml
index 05d07cd..6b5da78 100644
--- a/mgmt/newtmgr/syscfg.yml
+++ b/mgmt/newtmgr/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: mgmt/newtmgr
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/controller/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/controller/syscfg.yml b/net/nimble/controller/syscfg.yml
index de10d0c..ff69b08 100644
--- a/net/nimble/controller/syscfg.yml
+++ b/net/nimble/controller/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/nimble/controller
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/host/services/bleuart/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/services/bleuart/syscfg.yml b/net/nimble/host/services/bleuart/syscfg.yml
index 9f78658..328838d 100644
--- a/net/nimble/host/services/bleuart/syscfg.yml
+++ b/net/nimble/host/services/bleuart/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/nimble/host/services/bleuart
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/host/src/ble_hs_mbuf_priv.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_mbuf_priv.h b/net/nimble/host/src/ble_hs_mbuf_priv.h
index de036ce..78c5617 100644
--- a/net/nimble/host/src/ble_hs_mbuf_priv.h
+++ b/net/nimble/host/src/ble_hs_mbuf_priv.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#ifndef H_BLE_HS_MBUF_PRIV_
#define H_BLE_HS_MBUF_PRIV_
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/host/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/syscfg.yml b/net/nimble/host/syscfg.yml
index 7f3be23..ad8ab7a 100644
--- a/net/nimble/host/syscfg.yml
+++ b/net/nimble/host/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/nimble/host
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/host/test/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/syscfg.yml b/net/nimble/host/test/syscfg.yml
index d1d13c5..47d3b11 100644
--- a/net/nimble/host/test/syscfg.yml
+++ b/net/nimble/host/test/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/nimble/host/test
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/host/tools/log2smtest.rb
----------------------------------------------------------------------
diff --git a/net/nimble/host/tools/log2smtest.rb b/net/nimble/host/tools/log2smtest.rb
index cc7612a..e5662d4 100755
--- a/net/nimble/host/tools/log2smtest.rb
+++ b/net/nimble/host/tools/log2smtest.rb
@@ -1,5 +1,24 @@
#!/usr/bin/env ruby
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
### This script converts a bletiny log into a security manager unit test. The
### input log must contain the connection establishment and complete pairing
### procedure.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/syscfg.yml b/net/nimble/syscfg.yml
index 01a1ef6..80322c8 100644
--- a/net/nimble/syscfg.yml
+++ b/net/nimble/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/nimble
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
----------------------------------------------------------------------
diff --git a/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h b/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
index 79b9242..5e8a25b 100644
--- a/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
+++ b/net/nimble/transport/ram/include/transport/ram/ble_hci_ram.h
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
#ifndef H_BLE_HCI_RAM_
#define H_BLE_HCI_RAM_
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/transport/ram/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/transport/ram/syscfg.yml b/net/nimble/transport/ram/syscfg.yml
index 63fcdc2..b7940ed 100644
--- a/net/nimble/transport/ram/syscfg.yml
+++ b/net/nimble/transport/ram/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/nimble/transport/ram
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/nimble/transport/uart/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/nimble/transport/uart/syscfg.yml b/net/nimble/transport/uart/syscfg.yml
index 847f501..b3c6c8d 100644
--- a/net/nimble/transport/uart/syscfg.yml
+++ b/net/nimble/transport/uart/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/nimble/transport/uart
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/net/wifi/wifi_mgmt/syscfg.yml
----------------------------------------------------------------------
diff --git a/net/wifi/wifi_mgmt/syscfg.yml b/net/wifi/wifi_mgmt/syscfg.yml
index 1e5c332..c0916fc 100644
--- a/net/wifi/wifi_mgmt/syscfg.yml
+++ b/net/wifi/wifi_mgmt/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: net/wifi/wifi_mgmt
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/config/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/config/syscfg.yml b/sys/config/syscfg.yml
index 3017df0..1a80d61 100644
--- a/sys/config/syscfg.yml
+++ b/sys/config/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/config
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/config/test-fcb/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/config/test-fcb/syscfg.yml b/sys/config/test-fcb/syscfg.yml
index bb352e4..27f83d6 100644
--- a/sys/config/test-fcb/syscfg.yml
+++ b/sys/config/test-fcb/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/config/test-fcb
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/config/test-nffs/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/config/test-nffs/syscfg.yml b/sys/config/test-nffs/syscfg.yml
index 19ea6cb..5995a83 100644
--- a/sys/config/test-nffs/syscfg.yml
+++ b/sys/config/test-nffs/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/config/test-nffs
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/console/full/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/console/full/syscfg.yml b/sys/console/full/syscfg.yml
index e90402f..fd16737 100644
--- a/sys/console/full/syscfg.yml
+++ b/sys/console/full/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/console/full
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/log/test/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/log/test/syscfg.yml b/sys/log/test/syscfg.yml
index 9891285..22487f5 100644
--- a/sys/log/test/syscfg.yml
+++ b/sys/log/test/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/log/test
syscfg.vals:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/reboot/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/reboot/syscfg.yml b/sys/reboot/syscfg.yml
index db32874..a71aa92 100644
--- a/sys/reboot/syscfg.yml
+++ b/sys/reboot/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/reboot
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/shell/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/shell/syscfg.yml b/sys/shell/syscfg.yml
index 2198fca..e3539b8 100644
--- a/sys/shell/syscfg.yml
+++ b/sys/shell/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/shell
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/stats/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/stats/syscfg.yml b/sys/stats/syscfg.yml
index 8fe11e7..5d477f8 100644
--- a/sys/stats/syscfg.yml
+++ b/sys/stats/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/stats
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/sys/sysinit/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/sysinit/syscfg.yml b/sys/sysinit/syscfg.yml
index 7d7011f..a94b8fd 100644
--- a/sys/sysinit/syscfg.yml
+++ b/sys/sysinit/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: sys/sysinit
syscfg.defs:
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5020d451/test/runtest/syscfg.yml
----------------------------------------------------------------------
diff --git a/test/runtest/syscfg.yml b/test/runtest/syscfg.yml
index 9e78bf3..f9bad84 100644
--- a/test/runtest/syscfg.yml
+++ b/test/runtest/syscfg.yml
@@ -1,3 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Package: test/runtest
syscfg.defs:
[21/50] [abbrv] incubator-mynewt-core git commit: This closes #87.
Posted by cc...@apache.org.
This closes #87.
Merge remote-tracking branch 'bgiori/feature-ias' into develop
* bgiori/feature-ias:
update ias package structure into host/services
Immediate Alert Service implemented.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/44fffd4d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/44fffd4d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/44fffd4d
Branch: refs/heads/master
Commit: 44fffd4d28f3b3880db0f3b7dd1deaec6eae35f3
Parents: fcef18f 635dc15
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 8 14:01:56 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 8 14:01:56 2016 -0800
----------------------------------------------------------------------
.../ias/include/services/ias/ble_svc_ias.h | 40 +++++
net/nimble/host/services/ias/pkg.yml | 32 ++++
net/nimble/host/services/ias/src/ble_svc_ias.c | 146 +++++++++++++++++++
3 files changed, 218 insertions(+)
----------------------------------------------------------------------
[15/50] [abbrv] incubator-mynewt-core git commit: MYNEWT-475: BSP
Cleanup
Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf51dk/nrf51xxac.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf51dk/nrf51xxac.ld b/hw/bsp/nrf51dk/nrf51xxac.ld
new file mode 100755
index 0000000..1e36529
--- /dev/null
+++ b/hw/bsp/nrf51dk/nrf51xxac.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x1b800
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf52dk/boot-nrf52dk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/boot-nrf52dk.ld b/hw/bsp/nrf52dk/boot-nrf52dk.ld
deleted file mode 100755
index 5bb2099..0000000
--- a/hw/bsp/nrf52dk/boot-nrf52dk.ld
+++ /dev/null
@@ -1,191 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following
- * caveat:
- * 1. It does not get zeroed at init-time.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf52dk/boot-nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/boot-nrf52xxaa.ld b/hw/bsp/nrf52dk/boot-nrf52xxaa.ld
new file mode 100755
index 0000000..d1f1b99
--- /dev/null
+++ b/hw/bsp/nrf52dk/boot-nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf52dk/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/bsp.yml b/hw/bsp/nrf52dk/bsp.yml
index 8409c13..312e102 100644
--- a/hw/bsp/nrf52dk/bsp.yml
+++ b/hw/bsp/nrf52dk/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "nrf52dk.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-nrf52dk.ld"
+bsp.linkerscript:
+ - "nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.part2linkerscript: "split-nrf52dk.ld"
bsp.downloadscript: nrf52dk_download.sh
bsp.debugscript: nrf52dk_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf52dk/nrf52dk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/nrf52dk.ld b/hw/bsp/nrf52dk/nrf52dk.ld
deleted file mode 100755
index e131176..0000000
--- a/hw/bsp/nrf52dk/nrf52dk.ld
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following two
- * caveats:
- * 1. It does not get zeroed at init-time.
- * 2. You cannot use it as source memory for EasyDMA.
- *
- * This section exists because of a hardware defect; see errata 33 and 34
- * in nrf52 errata sheet.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- _ram_start = ORIGIN(RAM);
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/nrf52dk/nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52dk/nrf52xxaa.ld b/hw/bsp/nrf52dk/nrf52xxaa.ld
new file mode 100755
index 0000000..9433e37
--- /dev/null
+++ b/hw/bsp/nrf52dk/nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/rb-nano2/boot-nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/boot-nrf52xxaa.ld b/hw/bsp/rb-nano2/boot-nrf52xxaa.ld
new file mode 100755
index 0000000..d1f1b99
--- /dev/null
+++ b/hw/bsp/rb-nano2/boot-nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* The bootloader does not contain an image header */
+_imghdr_size = 0x0;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/rb-nano2/boot-rb-nano2.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/boot-rb-nano2.ld b/hw/bsp/rb-nano2/boot-rb-nano2.ld
deleted file mode 100755
index 5bb2099..0000000
--- a/hw/bsp/rb-nano2/boot-rb-nano2.ld
+++ /dev/null
@@ -1,191 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x4000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following
- * caveat:
- * 1. It does not get zeroed at init-time.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/rb-nano2/bsp.yml
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/bsp.yml b/hw/bsp/rb-nano2/bsp.yml
index bc9ef54..4b4f6fe 100644
--- a/hw/bsp/rb-nano2/bsp.yml
+++ b/hw/bsp/rb-nano2/bsp.yml
@@ -19,8 +19,12 @@
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "rb-nano2.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "boot-rb-nano2.ld"
+bsp.linkerscript:
+ - "nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
+bsp.linkerscript.BOOT_LOADER.OVERWRITE:
+ - "boot-nrf52xxaa.ld"
+ - "@apache-mynewt-core/hw/mcu/nordic/nrf52xxx/nrf52.ld"
bsp.part2linkerscript: "split-rb-nano2.ld"
bsp.downloadscript: rb-nano2_download.sh
bsp.debugscript: rb-nano2_debug.sh
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/rb-nano2/nrf52xxaa.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/nrf52xxaa.ld b/hw/bsp/rb-nano2/nrf52xxaa.ld
new file mode 100755
index 0000000..9433e37
--- /dev/null
+++ b/hw/bsp/rb-nano2/nrf52xxaa.ld
@@ -0,0 +1,25 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+}
+
+/* This linker script is used for images and thus contains an image header */
+_imghdr_size = 0x20;
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/bsp/rb-nano2/rb-nano2.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/rb-nano2/rb-nano2.ld b/hw/bsp/rb-nano2/rb-nano2.ld
deleted file mode 100755
index e131176..0000000
--- a/hw/bsp/rb-nano2/rb-nano2.ld
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Linker script for Nordic Semiconductor nRF5 devices
- *
- * Version: Sourcery G++ 4.5-1
- * Support: https://support.codesourcery.com/GNUToolchain/
- *
- * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply.
- */
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x00008000, LENGTH = 0x3a000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
-}
-
-/* Linker script to place sections and symbol values. Should be used together
- * with other linker script that defines memory regions FLASH and RAM.
- * It references following symbols, which must be defined in code:
- * Reset_Handler : Entry of reset handler
- *
- * It defines following symbols, which code can use without definition:
- * __exidx_start
- * __exidx_end
- * __etext
- * __data_start__
- * __preinit_array_start
- * __preinit_array_end
- * __init_array_start
- * __init_array_end
- * __fini_array_start
- * __fini_array_end
- * __data_end__
- * __bss_start__
- * __bss_end__
- * __HeapBase
- * __HeapLimit
- * __StackLimit
- * __StackTop
- * __stack
- * __bssnz_start__
- * __bssnz_end__
- */
-ENTRY(Reset_Handler)
-
-SECTIONS
-{
- .imghdr (NOLOAD):
- {
- . = . + 0x20;
- } > FLASH
-
- .text :
- {
- __isr_vector_start = .;
- KEEP(*(.isr_vector))
- __isr_vector_end = .;
- *(.text*)
-
- KEEP(*(.init))
- KEEP(*(.fini))
-
- /* .ctors */
- *crtbegin.o(.ctors)
- *crtbegin?.o(.ctors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
- *(SORT(.ctors.*))
- *(.ctors)
-
- /* .dtors */
- *crtbegin.o(.dtors)
- *crtbegin?.o(.dtors)
- *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
- *(SORT(.dtors.*))
- *(.dtors)
-
- *(.rodata*)
-
- *(.eh_frame*)
- . = ALIGN(4);
- } > FLASH
-
-
- .ARM.extab :
- {
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
- } > FLASH
-
- __exidx_start = .;
- .ARM.exidx :
- {
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- . = ALIGN(4);
- } > FLASH
- __exidx_end = .;
-
- __etext = .;
-
- .vector_relocation :
- {
- . = ALIGN(4);
- __vector_tbl_reloc__ = .;
- . = . + (__isr_vector_end - __isr_vector_start);
- . = ALIGN(4);
- } > RAM
-
- .data : AT (__etext)
- {
- __data_start__ = .;
- *(vtable)
- *(.data*)
-
- . = ALIGN(4);
- /* preinit data */
- PROVIDE_HIDDEN (__preinit_array_start = .);
- *(.preinit_array)
- PROVIDE_HIDDEN (__preinit_array_end = .);
-
- . = ALIGN(4);
- /* init data */
- PROVIDE_HIDDEN (__init_array_start = .);
- *(SORT(.init_array.*))
- *(.init_array)
- PROVIDE_HIDDEN (__init_array_end = .);
-
-
- . = ALIGN(4);
- /* finit data */
- PROVIDE_HIDDEN (__fini_array_start = .);
- *(SORT(.fini_array.*))
- *(.fini_array)
- PROVIDE_HIDDEN (__fini_array_end = .);
-
- *(.jcr)
- . = ALIGN(4);
- /* All data end */
- __data_end__ = .;
- } > RAM
-
- /* Non-zeroed BSS. This section is similar to BSS, with the following two
- * caveats:
- * 1. It does not get zeroed at init-time.
- * 2. You cannot use it as source memory for EasyDMA.
- *
- * This section exists because of a hardware defect; see errata 33 and 34
- * in nrf52 errata sheet.
- */
- .bssnz :
- {
- . = ALIGN(4);
- __bssnz_start__ = .;
- *(.bss.core.nz*)
- . = ALIGN(4);
- __bssnz_end__ = .;
- } > RAM
-
- .bss :
- {
- . = ALIGN(4);
- __bss_start__ = .;
- *(.bss*)
- *(COMMON)
- . = ALIGN(4);
- __bss_end__ = .;
- } > RAM
-
- /* Heap starts after BSS */
- __HeapBase = .;
-
- /* .stack_dummy section doesn't contains any symbols. It is only
- * used for linker to calculate size of stack sections, and assign
- * values to stack symbols later */
- .stack_dummy (COPY):
- {
- *(.stack*)
- } > RAM
-
- _ram_start = ORIGIN(RAM);
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
- __StackLimit = __StackTop - SIZEOF(.stack_dummy);
- PROVIDE(__stack = __StackTop);
-
- /* Top of head is the bottom of the stack */
- __HeapLimit = __StackLimit;
-
- /* Check if data + heap + stack exceeds RAM limit */
- ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/mcu/nordic/nrf51xxx/nrf51.ld
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf51xxx/nrf51.ld b/hw/mcu/nordic/nrf51xxx/nrf51.ld
new file mode 100755
index 0000000..820510f
--- /dev/null
+++ b/hw/mcu/nordic/nrf51xxx/nrf51.ld
@@ -0,0 +1,180 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+
+/* Linker script to place sections and symbol values. Should be used together
+ * with other linker script that defines memory regions FLASH and RAM.
+ * It references following symbols, which must be defined in code:
+ * Reset_Handler : Entry of reset handler
+ *
+ * It defines following symbols, which code can use without definition:
+ * __exidx_start
+ * __exidx_end
+ * __etext
+ * __data_start__
+ * __preinit_array_start
+ * __preinit_array_end
+ * __init_array_start
+ * __init_array_end
+ * __fini_array_start
+ * __fini_array_end
+ * __data_end__
+ * __bss_start__
+ * __bss_end__
+ * __HeapBase
+ * __HeapLimit
+ * __StackLimit
+ * __StackTop
+ * __stack
+ * __bssnz_start__
+ * __bssnz_end__
+ */
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+ .imghdr (NOLOAD):
+ {
+ . = . + _imghdr_size;
+ } > FLASH
+
+ .text :
+ {
+ __isr_vector_start = .;
+ KEEP(*(.isr_vector))
+ __isr_vector_end = .;
+ *(.text*)
+
+ KEEP(*(.init))
+ KEEP(*(.fini))
+
+ /* .ctors */
+ *crtbegin.o(.ctors)
+ *crtbegin?.o(.ctors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+ *(SORT(.ctors.*))
+ *(.ctors)
+
+ /* .dtors */
+ *crtbegin.o(.dtors)
+ *crtbegin?.o(.dtors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
+ *(SORT(.dtors.*))
+ *(.dtors)
+
+ *(.rodata*)
+
+ *(.eh_frame*)
+ . = ALIGN(4);
+ } > FLASH
+
+
+ .ARM.extab :
+ {
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } > FLASH
+
+ __exidx_start = .;
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ . = ALIGN(4);
+ } > FLASH
+ __exidx_end = .;
+
+ __etext = .;
+
+ /* Keep first in RAM, as well as in bootloader */
+ .vector_relocation :
+ {
+ . = ALIGN(4);
+ __vector_tbl_reloc__ = .;
+ . = . + (__isr_vector_end - __isr_vector_start);
+ . = ALIGN(4);
+ } > RAM
+
+ .data : AT (__etext)
+ {
+ __data_start__ = .;
+ *(vtable)
+ *(.data*)
+
+ . = ALIGN(4);
+ /* preinit data */
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ *(.preinit_array)
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+
+ . = ALIGN(4);
+ /* init data */
+ PROVIDE_HIDDEN (__init_array_start = .);
+ *(SORT(.init_array.*))
+ *(.init_array)
+ PROVIDE_HIDDEN (__init_array_end = .);
+
+
+ . = ALIGN(4);
+ /* finit data */
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ *(SORT(.fini_array.*))
+ *(.fini_array)
+ PROVIDE_HIDDEN (__fini_array_end = .);
+
+ *(.jcr)
+ . = ALIGN(4);
+ /* All data end */
+ __data_end__ = .;
+ } > RAM
+
+ .bss :
+ {
+ . = ALIGN(4);
+ __bss_start__ = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ __bss_end__ = .;
+ } > RAM
+
+ /* Heap starts after BSS */
+ __HeapBase = .;
+
+ /* .stack_dummy section doesn't contains any symbols. It is only
+ * used for linker to calculate size of stack sections, and assign
+ * values to stack symbols later */
+ .stack_dummy (COPY):
+ {
+ *(.stack*)
+ } > RAM
+
+ _ram_start = ORIGIN(RAM);
+
+ /* Set stack top to end of RAM, and stack limit move down by
+ * size of stack_dummy section */
+ __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+ __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+ PROVIDE(__stack = __StackTop);
+
+ /* Top of head is the bottom of the stack */
+ __HeapLimit = __StackLimit;
+
+ /* Check if data + heap + stack exceeds RAM limit */
+ ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/mcu/nordic/nrf52xxx/nrf52.ld
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/nrf52.ld b/hw/mcu/nordic/nrf52xxx/nrf52.ld
new file mode 100755
index 0000000..fda1a8e
--- /dev/null
+++ b/hw/mcu/nordic/nrf52xxx/nrf52.ld
@@ -0,0 +1,196 @@
+/* Linker script for Nordic Semiconductor nRF5 devices
+ *
+ * Version: Sourcery G++ 4.5-1
+ * Support: https://support.codesourcery.com/GNUToolchain/
+ *
+ * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+
+/* Linker script to place sections and symbol values. Should be used together
+ * with other linker script that defines memory regions FLASH and RAM.
+ * It references following symbols, which must be defined in code:
+ * Reset_Handler : Entry of reset handler
+ *
+ * It defines following symbols, which code can use without definition:
+ * __exidx_start
+ * __exidx_end
+ * __etext
+ * __data_start__
+ * __preinit_array_start
+ * __preinit_array_end
+ * __init_array_start
+ * __init_array_end
+ * __fini_array_start
+ * __fini_array_end
+ * __data_end__
+ * __bss_start__
+ * __bss_end__
+ * __HeapBase
+ * __HeapLimit
+ * __StackLimit
+ * __StackTop
+ * __stack
+ * __bssnz_start__
+ * __bssnz_end__
+ */
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+ .imghdr (NOLOAD):
+ {
+ . = . + _imghdr_size;
+ } > FLASH
+
+ .text :
+ {
+ __isr_vector_start = .;
+ KEEP(*(.isr_vector))
+ __isr_vector_end = .;
+ *(.text*)
+
+ KEEP(*(.init))
+ KEEP(*(.fini))
+
+ /* .ctors */
+ *crtbegin.o(.ctors)
+ *crtbegin?.o(.ctors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+ *(SORT(.ctors.*))
+ *(.ctors)
+
+ /* .dtors */
+ *crtbegin.o(.dtors)
+ *crtbegin?.o(.dtors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
+ *(SORT(.dtors.*))
+ *(.dtors)
+
+ *(.rodata*)
+
+ *(.eh_frame*)
+ . = ALIGN(4);
+ } > FLASH
+
+
+ .ARM.extab :
+ {
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
+ } > FLASH
+
+ __exidx_start = .;
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ . = ALIGN(4);
+ } > FLASH
+ __exidx_end = .;
+
+ __etext = .;
+
+ .vector_relocation :
+ {
+ . = ALIGN(4);
+ __vector_tbl_reloc__ = .;
+ . = . + (__isr_vector_end - __isr_vector_start);
+ . = ALIGN(4);
+ } > RAM
+
+ .data : AT (__etext)
+ {
+ __data_start__ = .;
+ *(vtable)
+ *(.data*)
+
+ . = ALIGN(4);
+ /* preinit data */
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ *(.preinit_array)
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+
+ . = ALIGN(4);
+ /* init data */
+ PROVIDE_HIDDEN (__init_array_start = .);
+ *(SORT(.init_array.*))
+ *(.init_array)
+ PROVIDE_HIDDEN (__init_array_end = .);
+
+
+ . = ALIGN(4);
+ /* finit data */
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ *(SORT(.fini_array.*))
+ *(.fini_array)
+ PROVIDE_HIDDEN (__fini_array_end = .);
+
+ *(.jcr)
+ . = ALIGN(4);
+ /* All data end */
+ __data_end__ = .;
+ } > RAM
+
+ /* Non-zeroed BSS. This section is similar to BSS, with the following two
+ * caveats:
+ * 1. It does not get zeroed at init-time.
+ * 2. You cannot use it as source memory for EasyDMA.
+ *
+ * This section exists because of a hardware defect; see errata 33 and 34
+ * in nrf52 errata sheet.
+ */
+ .bssnz :
+ {
+ . = ALIGN(4);
+ __bssnz_start__ = .;
+ *(.bss.core.nz*)
+ . = ALIGN(4);
+ __bssnz_end__ = .;
+ } > RAM
+
+ .bss :
+ {
+ . = ALIGN(4);
+ __bss_start__ = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ __bss_end__ = .;
+ } > RAM
+
+ /* Heap starts after BSS */
+ __HeapBase = .;
+
+ /* .stack_dummy section doesn't contains any symbols. It is only
+ * used for linker to calculate size of stack sections, and assign
+ * values to stack symbols later */
+ .stack_dummy (COPY):
+ {
+ *(.stack*)
+ } > RAM
+
+ _ram_start = ORIGIN(RAM);
+
+ /* Set stack top to end of RAM, and stack limit move down by
+ * size of stack_dummy section */
+ __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+ __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+ PROVIDE(__stack = __StackTop);
+
+ /* Top of head is the bottom of the stack */
+ __HeapLimit = __StackLimit;
+
+ /* Check if data + heap + stack exceeds RAM limit */
+ ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack")
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cd9214ed/hw/mcu/stm/stm32f4xx/stm32f407.ld
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/stm32f407.ld b/hw/mcu/stm/stm32f4xx/stm32f407.ld
new file mode 100644
index 0000000..f193bf5
--- /dev/null
+++ b/hw/mcu/stm/stm32f4xx/stm32f407.ld
@@ -0,0 +1,200 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* Linker script to place sections and symbol values. Should be used together
+ * with other linker script that defines memory regions FLASH and RAM.
+ * It references following symbols, which must be defined in code:
+ * Reset_Handler : Entry of reset handler
+ *
+ * It defines following symbols, which code can use without definition:
+ * __exidx_start
+ * __exidx_end
+ * __etext
+ * __data_start__
+ * __preinit_array_start
+ * __preinit_array_end
+ * __init_array_start
+ * __init_array_end
+ * __fini_array_start
+ * __fini_array_end
+ * __data_end__
+ * __bss_start__
+ * __bss_end__
+ * __end__
+ * end
+ * __HeapBase
+ * __HeapLimit
+ * __StackLimit
+ * __StackTop
+ * __stack
+ * __coredata_start__
+ * __coredata_end__
+ * __corebss_start__
+ * __corebss_end__
+ * __ecoredata
+ * __ecorebss
+ */
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+ /* Reserve space at the start of the image for the header. */
+ .imghdr (NOLOAD):
+ {
+ . = . + _imghdr_size;
+ } > FLASH
+
+ .text :
+ {
+ __isr_vector_start = .;
+ KEEP(*(.isr_vector))
+ __isr_vector_end = .;
+ *(.text*)
+
+ KEEP(*(.init))
+ KEEP(*(.fini))
+
+ /* .ctors */
+ *crtbegin.o(.ctors)
+ *crtbegin?.o(.ctors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
+ *(SORT(.ctors.*))
+ *(.ctors)
+
+ /* .dtors */
+ *crtbegin.o(.dtors)
+ *crtbegin?.o(.dtors)
+ *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
+ *(SORT(.dtors.*))
+ *(.dtors)
+
+ *(.rodata*)
+
+ KEEP(*(.eh_frame*))
+ } > FLASH
+
+ .ARM.extab :
+ {
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ } > FLASH
+
+ __exidx_start = .;
+ .ARM.exidx :
+ {
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ } > FLASH
+
+ __exidx_end = .;
+
+ __etext = .;
+
+ .vector_relocation :
+ {
+ . = ALIGN(4);
+ __vector_tbl_reloc__ = .;
+ . = . + (__isr_vector_end - __isr_vector_start);
+ . = ALIGN(4);
+ } > RAM
+
+ .coredata : AT (__etext)
+ {
+ __coredata_start__ = .;
+ *(.data.core)
+ . = ALIGN(4);
+ __coredata_end__ = .;
+ } > CCM
+
+ __ecoredata = __etext + SIZEOF(.coredata);
+
+ .data : AT (__ecoredata)
+ {
+ __data_start__ = .;
+ *(vtable)
+ *(.data*)
+
+ /* preinit data */
+ PROVIDE_HIDDEN (__preinit_array_start = .);
+ KEEP(*(.preinit_array))
+ PROVIDE_HIDDEN (__preinit_array_end = .);
+
+ . = ALIGN(4);
+ /* init data */
+ PROVIDE_HIDDEN (__init_array_start = .);
+ KEEP(*(SORT(.init_array.*)))
+ KEEP(*(.init_array))
+ PROVIDE_HIDDEN (__init_array_end = .);
+
+
+ . = ALIGN(4);
+ /* finit data */
+ PROVIDE_HIDDEN (__fini_array_start = .);
+ KEEP(*(SORT(.fini_array.*)))
+ KEEP(*(.fini_array))
+ PROVIDE_HIDDEN (__fini_array_end = .);
+
+ KEEP(*(.jcr*))
+ . = ALIGN(4);
+ /* All data end */
+ __data_end__ = .;
+
+ } > RAM
+
+ .corebss (NOLOAD):
+ {
+ . = ALIGN(4);
+ __corebss_start__ = .;
+ *(.bss.core)
+ . = ALIGN(4);
+ __corebss_end__ = .;
+ *(.corebss*)
+ *(.bss.core.nz)
+ . = ALIGN(4);
+ __ecorebss = .;
+ } > CCM
+
+ .bss :
+ {
+ . = ALIGN(4);
+ __bss_start__ = .;
+ *(.bss*)
+ *(COMMON)
+ . = ALIGN(4);
+ __bss_end__ = .;
+ } > RAM
+
+ __HeapBase = .;
+ __HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
+
+ /* .stack_dummy section doesn't contains any symbols. It is only
+ * used for linker to calculate size of stack sections, and assign
+ * values to stack symbols later */
+ .stack_dummy (COPY):
+ {
+ *(.stack*)
+ } > CCM
+
+ /* Set stack top to end of CCM; stack limit is bottom of stack */
+ __StackTop = ORIGIN(CCM) + LENGTH(CCM);
+ __StackLimit = __StackTop - SIZEOF(.stack_dummy);
+ PROVIDE(__stack = __StackTop);
+
+ /* Check for CCM overflow */
+ ASSERT(__StackLimit >= __ecorebss, "CCM overflow!")
+}
+
[03/50] [abbrv] incubator-mynewt-core git commit:
mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash
Posted by cc...@apache.org.
mcu/nordic/nrf52xxx: Fix for nrf52dk startup crash
With this patch it is possible to start nrf52dk board.
Regression observed after patch:
290c683 MYNEWT-475: BSP Cleanup
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/7c0bcce7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/7c0bcce7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/7c0bcce7
Branch: refs/heads/master
Commit: 7c0bcce78a64bd485efcc3723f2ffadc81e5d49e
Parents: c694835
Author: Micha\u0142 Narajowski <mi...@codecoup.pl>
Authored: Mon Nov 7 14:39:40 2016 +0100
Committer: Micha\u0142 Narajowski <mi...@codecoup.pl>
Committed: Mon Nov 7 14:39:40 2016 +0100
----------------------------------------------------------------------
.../src/arch/cortex_m4/gcc_startup_nrf52.s | 289 +++++++++++++++++++
.../arch/cortex_m4/gcc_startup_nrf52_split.s | 150 ++++++++++
hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s | 289 -------------------
.../nrf52xxx/src/gcc_startup_nrf52_split.s | 150 ----------
4 files changed, 439 insertions(+), 439 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7c0bcce7/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
new file mode 100755
index 0000000..fb804fd
--- /dev/null
+++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52.s
@@ -0,0 +1,289 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector
+ .align 2
+ .globl __isr_vector
+__isr_vector:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler /* Reset Handler */
+ .long NMI_Handler /* NMI Handler */
+ .long HardFault_Handler /* Hard Fault Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long SVC_Handler /* SVCall Handler */
+ .long 0 /* Reserved */
+ .long 0 /* Reserved */
+ .long PendSV_Handler /* PendSV Handler */
+ .long SysTick_Handler /* SysTick Handler */
+
+ /* External Interrupts */
+ .long POWER_CLOCK_IRQHandler
+ .long RADIO_IRQHandler
+ .long UARTE0_UART0_IRQHandler
+ .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ .long NFCT_IRQHandler
+ .long GPIOTE_IRQHandler
+ .long SAADC_IRQHandler
+ .long TIMER0_IRQHandler
+ .long TIMER1_IRQHandler
+ .long TIMER2_IRQHandler
+ .long RTC0_IRQHandler
+ .long TEMP_IRQHandler
+ .long RNG_IRQHandler
+ .long ECB_IRQHandler
+ .long CCM_AAR_IRQHandler
+ .long WDT_IRQHandler
+ .long RTC1_IRQHandler
+ .long QDEC_IRQHandler
+ .long COMP_LPCOMP_IRQHandler
+ .long SWI0_EGU0_IRQHandler
+ .long SWI1_EGU1_IRQHandler
+ .long SWI2_EGU2_IRQHandler
+ .long SWI3_EGU3_IRQHandler
+ .long SWI4_EGU4_IRQHandler
+ .long SWI5_EGU5_IRQHandler
+ .long TIMER3_IRQHandler
+ .long TIMER4_IRQHandler
+ .long PWM0_IRQHandler
+ .long PDM_IRQHandler
+ .long 0 /*Reserved */
+ .long 0 /*Reserved */
+ .long MWU_IRQHandler
+ .long PWM1_IRQHandler
+ .long PWM2_IRQHandler
+ .long SPIM2_SPIS2_SPI2_IRQHandler
+ .long RTC2_IRQHandler
+ .long I2S_IRQHandler
+
+ .size __isr_vector, . - __isr_vector
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler
+ .type Reset_Handler, %function
+Reset_Handler:
+ .fnstart
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler,.-Reset_Handler
+
+ .section ".text"
+
+
+/* Dummy Exception Handlers (infinite loops which can be modified) */
+
+ .weak NMI_Handler
+ .type NMI_Handler, %function
+NMI_Handler:
+ B .
+ .size NMI_Handler, . - NMI_Handler
+
+
+ .weak HardFault_Handler
+ .type HardFault_Handler, %function
+HardFault_Handler:
+ B .
+ .size HardFault_Handler, . - HardFault_Handler
+
+
+ .weak MemoryManagement_Handler
+ .type MemoryManagement_Handler, %function
+MemoryManagement_Handler:
+ B .
+ .size MemoryManagement_Handler, . - MemoryManagement_Handler
+
+
+ .weak BusFault_Handler
+ .type BusFault_Handler, %function
+BusFault_Handler:
+ B .
+ .size BusFault_Handler, . - BusFault_Handler
+
+
+ .weak UsageFault_Handler
+ .type UsageFault_Handler, %function
+UsageFault_Handler:
+ B .
+ .size UsageFault_Handler, . - UsageFault_Handler
+
+
+ .weak SVC_Handler
+ .type SVC_Handler, %function
+SVC_Handler:
+ B .
+ .size SVC_Handler, . - SVC_Handler
+
+
+ .weak PendSV_Handler
+ .type PendSV_Handler, %function
+PendSV_Handler:
+ B .
+ .size PendSV_Handler, . - PendSV_Handler
+
+
+ .weak SysTick_Handler
+ .type SysTick_Handler, %function
+SysTick_Handler:
+ B .
+ .size SysTick_Handler, . - SysTick_Handler
+
+
+/* IRQ Handlers */
+
+ .globl Default_Handler
+ .type Default_Handler, %function
+Default_Handler:
+ B .
+ .size Default_Handler, . - Default_Handler
+
+ .macro IRQ handler
+ .weak \handler
+ .set \handler, Default_Handler
+ .endm
+
+ IRQ POWER_CLOCK_IRQHandler
+ IRQ RADIO_IRQHandler
+ IRQ UARTE0_UART0_IRQHandler
+ IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
+ IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
+ IRQ NFCT_IRQHandler
+ IRQ GPIOTE_IRQHandler
+ IRQ SAADC_IRQHandler
+ IRQ TIMER0_IRQHandler
+ IRQ TIMER1_IRQHandler
+ IRQ TIMER2_IRQHandler
+ IRQ RTC0_IRQHandler
+ IRQ TEMP_IRQHandler
+ IRQ RNG_IRQHandler
+ IRQ ECB_IRQHandler
+ IRQ CCM_AAR_IRQHandler
+ IRQ WDT_IRQHandler
+ IRQ RTC1_IRQHandler
+ IRQ QDEC_IRQHandler
+ IRQ COMP_LPCOMP_IRQHandler
+ IRQ SWI0_EGU0_IRQHandler
+ IRQ SWI1_EGU1_IRQHandler
+ IRQ SWI2_EGU2_IRQHandler
+ IRQ SWI3_EGU3_IRQHandler
+ IRQ SWI4_EGU4_IRQHandler
+ IRQ SWI5_EGU5_IRQHandler
+ IRQ TIMER3_IRQHandler
+ IRQ TIMER4_IRQHandler
+ IRQ PWM0_IRQHandler
+ IRQ PDM_IRQHandler
+ IRQ MWU_IRQHandler
+ IRQ PWM1_IRQHandler
+ IRQ PWM2_IRQHandler
+ IRQ SPIM2_SPIS2_SPI2_IRQHandler
+ IRQ RTC2_IRQHandler
+ IRQ I2S_IRQHandler
+
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7c0bcce7/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
new file mode 100755
index 0000000..7426848
--- /dev/null
+++ b/hw/mcu/nordic/nrf52xxx/src/arch/cortex_m4/gcc_startup_nrf52_split.s
@@ -0,0 +1,150 @@
+/*
+Copyright (c) 2015, Nordic Semiconductor ASA
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of Nordic Semiconductor ASA nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+NOTE: Template files (including this one) are application specific and therefore
+expected to be copied into the application project folder prior to its use!
+*/
+
+ .syntax unified
+ .arch armv7-m
+ .section .stack
+ .align 3
+ .equ Stack_Size, 432
+ .globl __StackTop
+ .globl __StackLimit
+__StackLimit:
+ .space Stack_Size
+ .size __StackLimit, . - __StackLimit
+__StackTop:
+ .size __StackTop, . - __StackTop
+
+ .section .heap
+ .align 3
+#ifdef __HEAP_SIZE
+ .equ Heap_Size, __HEAP_SIZE
+#else
+ .equ Heap_Size, 0
+#endif
+ .globl __HeapBase
+ .globl __HeapLimit
+__HeapBase:
+ .if Heap_Size
+ .space Heap_Size
+ .endif
+ .size __HeapBase, . - __HeapBase
+__HeapLimit:
+ .size __HeapLimit, . - __HeapLimit
+
+ .section .isr_vector_split
+ .align 2
+ .globl __isr_vector_split
+__isr_vector_split:
+ .long __StackTop /* Top of Stack */
+ .long Reset_Handler_split /* Reset Handler */
+
+ .size __isr_vector_split, . - __isr_vector_split
+
+/* Reset Handler */
+
+ .text
+ .thumb
+ .thumb_func
+ .align 1
+ .globl Reset_Handler_split
+ .type Reset_Handler_split, %function
+Reset_Handler_split:
+ .fnstart
+
+
+/* Loop to copy data from read only memory to RAM. The ranges
+ * of copy from/to are specified by following symbols evaluated in
+ * linker script.
+ * __etext: End of code section, i.e., begin of data sections to copy from.
+ * __data_start__/__data_end__: RAM address range that data should be
+ * copied to. Both must be aligned to 4 bytes boundary. */
+
+ ldr r1, =__etext
+ ldr r2, =__data_start__
+ ldr r3, =__data_end__
+
+ subs r3, r2
+ ble .LC0
+
+.LC1:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC1
+
+.LC0:
+ ldr r1, =__etext_loader
+ ldr r2, =__data_start___loader
+ ldr r3, =__data_end___loader
+
+ subs r3, r2
+ ble .LC2
+
+.LC3:
+ subs r3, 4
+ ldr r0, [r1,r3]
+ str r0, [r2,r3]
+ bgt .LC3
+.LC2:
+
+ subs r0, r0
+ ldr r2, =__bss_start___loader
+ ldr r3, =__bss_end___loader
+
+ subs r3, r2
+ ble .LC4
+
+.LC5:
+ subs r3, 4
+ str r0, [r2,r3]
+ bgt .LC5
+.LC4:
+
+ LDR R0, =__HeapBase
+ LDR R1, =__HeapLimit
+ BL _sbrkInit
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =_start
+ BX R0
+
+ .pool
+ .cantunwind
+ .fnend
+ .size Reset_Handler_split,.-Reset_Handler_split
+
+ .section ".text"
+ .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7c0bcce7/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
deleted file mode 100755
index fb804fd..0000000
--- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52.s
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv7-m
-
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector
- .align 2
- .globl __isr_vector
-__isr_vector:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler /* Reset Handler */
- .long NMI_Handler /* NMI Handler */
- .long HardFault_Handler /* Hard Fault Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long SVC_Handler /* SVCall Handler */
- .long 0 /* Reserved */
- .long 0 /* Reserved */
- .long PendSV_Handler /* PendSV Handler */
- .long SysTick_Handler /* SysTick Handler */
-
- /* External Interrupts */
- .long POWER_CLOCK_IRQHandler
- .long RADIO_IRQHandler
- .long UARTE0_UART0_IRQHandler
- .long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
- .long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
- .long NFCT_IRQHandler
- .long GPIOTE_IRQHandler
- .long SAADC_IRQHandler
- .long TIMER0_IRQHandler
- .long TIMER1_IRQHandler
- .long TIMER2_IRQHandler
- .long RTC0_IRQHandler
- .long TEMP_IRQHandler
- .long RNG_IRQHandler
- .long ECB_IRQHandler
- .long CCM_AAR_IRQHandler
- .long WDT_IRQHandler
- .long RTC1_IRQHandler
- .long QDEC_IRQHandler
- .long COMP_LPCOMP_IRQHandler
- .long SWI0_EGU0_IRQHandler
- .long SWI1_EGU1_IRQHandler
- .long SWI2_EGU2_IRQHandler
- .long SWI3_EGU3_IRQHandler
- .long SWI4_EGU4_IRQHandler
- .long SWI5_EGU5_IRQHandler
- .long TIMER3_IRQHandler
- .long TIMER4_IRQHandler
- .long PWM0_IRQHandler
- .long PDM_IRQHandler
- .long 0 /*Reserved */
- .long 0 /*Reserved */
- .long MWU_IRQHandler
- .long PWM1_IRQHandler
- .long PWM2_IRQHandler
- .long SPIM2_SPIS2_SPI2_IRQHandler
- .long RTC2_IRQHandler
- .long I2S_IRQHandler
-
- .size __isr_vector, . - __isr_vector
-
-/* Reset Handler */
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler
- .type Reset_Handler, %function
-Reset_Handler:
- .fnstart
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-
-.LC0:
-
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
-
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler,.-Reset_Handler
-
- .section ".text"
-
-
-/* Dummy Exception Handlers (infinite loops which can be modified) */
-
- .weak NMI_Handler
- .type NMI_Handler, %function
-NMI_Handler:
- B .
- .size NMI_Handler, . - NMI_Handler
-
-
- .weak HardFault_Handler
- .type HardFault_Handler, %function
-HardFault_Handler:
- B .
- .size HardFault_Handler, . - HardFault_Handler
-
-
- .weak MemoryManagement_Handler
- .type MemoryManagement_Handler, %function
-MemoryManagement_Handler:
- B .
- .size MemoryManagement_Handler, . - MemoryManagement_Handler
-
-
- .weak BusFault_Handler
- .type BusFault_Handler, %function
-BusFault_Handler:
- B .
- .size BusFault_Handler, . - BusFault_Handler
-
-
- .weak UsageFault_Handler
- .type UsageFault_Handler, %function
-UsageFault_Handler:
- B .
- .size UsageFault_Handler, . - UsageFault_Handler
-
-
- .weak SVC_Handler
- .type SVC_Handler, %function
-SVC_Handler:
- B .
- .size SVC_Handler, . - SVC_Handler
-
-
- .weak PendSV_Handler
- .type PendSV_Handler, %function
-PendSV_Handler:
- B .
- .size PendSV_Handler, . - PendSV_Handler
-
-
- .weak SysTick_Handler
- .type SysTick_Handler, %function
-SysTick_Handler:
- B .
- .size SysTick_Handler, . - SysTick_Handler
-
-
-/* IRQ Handlers */
-
- .globl Default_Handler
- .type Default_Handler, %function
-Default_Handler:
- B .
- .size Default_Handler, . - Default_Handler
-
- .macro IRQ handler
- .weak \handler
- .set \handler, Default_Handler
- .endm
-
- IRQ POWER_CLOCK_IRQHandler
- IRQ RADIO_IRQHandler
- IRQ UARTE0_UART0_IRQHandler
- IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
- IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
- IRQ NFCT_IRQHandler
- IRQ GPIOTE_IRQHandler
- IRQ SAADC_IRQHandler
- IRQ TIMER0_IRQHandler
- IRQ TIMER1_IRQHandler
- IRQ TIMER2_IRQHandler
- IRQ RTC0_IRQHandler
- IRQ TEMP_IRQHandler
- IRQ RNG_IRQHandler
- IRQ ECB_IRQHandler
- IRQ CCM_AAR_IRQHandler
- IRQ WDT_IRQHandler
- IRQ RTC1_IRQHandler
- IRQ QDEC_IRQHandler
- IRQ COMP_LPCOMP_IRQHandler
- IRQ SWI0_EGU0_IRQHandler
- IRQ SWI1_EGU1_IRQHandler
- IRQ SWI2_EGU2_IRQHandler
- IRQ SWI3_EGU3_IRQHandler
- IRQ SWI4_EGU4_IRQHandler
- IRQ SWI5_EGU5_IRQHandler
- IRQ TIMER3_IRQHandler
- IRQ TIMER4_IRQHandler
- IRQ PWM0_IRQHandler
- IRQ PDM_IRQHandler
- IRQ MWU_IRQHandler
- IRQ PWM1_IRQHandler
- IRQ PWM2_IRQHandler
- IRQ SPIM2_SPIS2_SPI2_IRQHandler
- IRQ RTC2_IRQHandler
- IRQ I2S_IRQHandler
-
- .end
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/7c0bcce7/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
----------------------------------------------------------------------
diff --git a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s b/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
deleted file mode 100755
index 7426848..0000000
--- a/hw/mcu/nordic/nrf52xxx/src/gcc_startup_nrf52_split.s
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-Copyright (c) 2015, Nordic Semiconductor ASA
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Nordic Semiconductor ASA nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
-NOTE: Template files (including this one) are application specific and therefore
-expected to be copied into the application project folder prior to its use!
-*/
-
- .syntax unified
- .arch armv7-m
- .section .stack
- .align 3
- .equ Stack_Size, 432
- .globl __StackTop
- .globl __StackLimit
-__StackLimit:
- .space Stack_Size
- .size __StackLimit, . - __StackLimit
-__StackTop:
- .size __StackTop, . - __StackTop
-
- .section .heap
- .align 3
-#ifdef __HEAP_SIZE
- .equ Heap_Size, __HEAP_SIZE
-#else
- .equ Heap_Size, 0
-#endif
- .globl __HeapBase
- .globl __HeapLimit
-__HeapBase:
- .if Heap_Size
- .space Heap_Size
- .endif
- .size __HeapBase, . - __HeapBase
-__HeapLimit:
- .size __HeapLimit, . - __HeapLimit
-
- .section .isr_vector_split
- .align 2
- .globl __isr_vector_split
-__isr_vector_split:
- .long __StackTop /* Top of Stack */
- .long Reset_Handler_split /* Reset Handler */
-
- .size __isr_vector_split, . - __isr_vector_split
-
-/* Reset Handler */
-
- .text
- .thumb
- .thumb_func
- .align 1
- .globl Reset_Handler_split
- .type Reset_Handler_split, %function
-Reset_Handler_split:
- .fnstart
-
-
-/* Loop to copy data from read only memory to RAM. The ranges
- * of copy from/to are specified by following symbols evaluated in
- * linker script.
- * __etext: End of code section, i.e., begin of data sections to copy from.
- * __data_start__/__data_end__: RAM address range that data should be
- * copied to. Both must be aligned to 4 bytes boundary. */
-
- ldr r1, =__etext
- ldr r2, =__data_start__
- ldr r3, =__data_end__
-
- subs r3, r2
- ble .LC0
-
-.LC1:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC1
-
-.LC0:
- ldr r1, =__etext_loader
- ldr r2, =__data_start___loader
- ldr r3, =__data_end___loader
-
- subs r3, r2
- ble .LC2
-
-.LC3:
- subs r3, 4
- ldr r0, [r1,r3]
- str r0, [r2,r3]
- bgt .LC3
-.LC2:
-
- subs r0, r0
- ldr r2, =__bss_start___loader
- ldr r3, =__bss_end___loader
-
- subs r3, r2
- ble .LC4
-
-.LC5:
- subs r3, 4
- str r0, [r2,r3]
- bgt .LC5
-.LC4:
-
- LDR R0, =__HeapBase
- LDR R1, =__HeapLimit
- BL _sbrkInit
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =_start
- BX R0
-
- .pool
- .cantunwind
- .fnend
- .size Reset_Handler_split,.-Reset_Handler_split
-
- .section ".text"
- .end
[19/50] [abbrv] incubator-mynewt-core git commit: shell;
adjust tasks cli command output a bit.
Posted by cc...@apache.org.
shell; adjust tasks cli command output a bit.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ed475682
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ed475682
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ed475682
Branch: refs/heads/master
Commit: ed475682d620382487748b45ecaede1ebb9cea0d
Parents: eefa203
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 8 13:26:24 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 8 13:26:24 2016 -0800
----------------------------------------------------------------------
sys/shell/src/shell_os.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ed475682/sys/shell/src/shell_os.c
----------------------------------------------------------------------
diff --git a/sys/shell/src/shell_os.c b/sys/shell/src/shell_os.c
index aa20419..14b8657 100644
--- a/sys/shell/src/shell_os.c
+++ b/sys/shell/src/shell_os.c
@@ -47,7 +47,7 @@ shell_os_tasks_display_cmd(int argc, char **argv)
console_printf("Tasks: \n");
prev_task = NULL;
- console_printf(" %8s %3s %3s %8s %8s %8s %8s %8s %8s %3s\n",
+ console_printf("%8s %3s %3s %8s %8s %8s %8s %8s %8s %3s\n",
"task", "pri", "tid", "runtime", "csw", "stksz", "stkuse",
"lcheck", "ncheck", "flg");
while (1) {
@@ -64,7 +64,7 @@ shell_os_tasks_display_cmd(int argc, char **argv)
}
}
- console_printf(" %8s %3u %3u %8lu %8lu %8u %8u %8lu %8lu %3x\n",
+ console_printf("%8s %3u %3u %8lu %8lu %8u %8u %8lu %8lu %3x\n",
oti.oti_name, oti.oti_prio, oti.oti_taskid,
(unsigned long)oti.oti_runtime, (unsigned long)oti.oti_cswcnt,
oti.oti_stksize, oti.oti_stkusage,