This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 0c48ddf1be00f779ddc16bfd5317c582dd17c386 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Wed Apr 10 15:16:42 2024 +0200 boot/startup: Allow bsp without BOOTLOADER or FLASH_AREA_0 Standard memory regions BOOT and SLOT0 are now optional and if not present in bsp.yml MEMORY section will be correct. Signed-off-by: Jerzy Kasenberg <[email protected]> --- boot/startup/mynewt_cortex_m0.ld | 4 ++++ boot/startup/mynewt_cortex_m33.ld | 4 ++++ boot/startup/mynewt_cortex_m4.ld | 4 ++++ boot/startup/mynewt_cortex_m7.ld | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/boot/startup/mynewt_cortex_m0.ld b/boot/startup/mynewt_cortex_m0.ld index 7d47daf66..9585918be 100644 --- a/boot/startup/mynewt_cortex_m0.ld +++ b/boot/startup/mynewt_cortex_m0.ld @@ -30,8 +30,12 @@ EXTERN(g_pfnVectors) /* Specify the memory areas */ MEMORY { +#ifdef FLASH_AREA_BOOTLOADER_OFFSET BOOT (rx!w) : ORIGIN = FLASH_AREA_BOOTLOADER_OFFSET, LENGTH = FLASH_AREA_BOOTLOADER_SIZE +#endif +#ifdef FLASH_AREA_IMAGE_0_OFFSET SLOT0 (rx!w) : ORIGIN = FLASH_AREA_IMAGE_0_OFFSET, LENGTH = FLASH_AREA_IMAGE_0_SIZE +#endif RAM (rwx) : ORIGIN = RAM_START, LENGTH = RAM_SIZE #include <memory_regions.ld.h> } diff --git a/boot/startup/mynewt_cortex_m33.ld b/boot/startup/mynewt_cortex_m33.ld index 7d47daf66..9585918be 100644 --- a/boot/startup/mynewt_cortex_m33.ld +++ b/boot/startup/mynewt_cortex_m33.ld @@ -30,8 +30,12 @@ EXTERN(g_pfnVectors) /* Specify the memory areas */ MEMORY { +#ifdef FLASH_AREA_BOOTLOADER_OFFSET BOOT (rx!w) : ORIGIN = FLASH_AREA_BOOTLOADER_OFFSET, LENGTH = FLASH_AREA_BOOTLOADER_SIZE +#endif +#ifdef FLASH_AREA_IMAGE_0_OFFSET SLOT0 (rx!w) : ORIGIN = FLASH_AREA_IMAGE_0_OFFSET, LENGTH = FLASH_AREA_IMAGE_0_SIZE +#endif RAM (rwx) : ORIGIN = RAM_START, LENGTH = RAM_SIZE #include <memory_regions.ld.h> } diff --git a/boot/startup/mynewt_cortex_m4.ld b/boot/startup/mynewt_cortex_m4.ld index 7d47daf66..9585918be 100644 --- a/boot/startup/mynewt_cortex_m4.ld +++ b/boot/startup/mynewt_cortex_m4.ld @@ -30,8 +30,12 @@ EXTERN(g_pfnVectors) /* Specify the memory areas */ MEMORY { +#ifdef FLASH_AREA_BOOTLOADER_OFFSET BOOT (rx!w) : ORIGIN = FLASH_AREA_BOOTLOADER_OFFSET, LENGTH = FLASH_AREA_BOOTLOADER_SIZE +#endif +#ifdef FLASH_AREA_IMAGE_0_OFFSET SLOT0 (rx!w) : ORIGIN = FLASH_AREA_IMAGE_0_OFFSET, LENGTH = FLASH_AREA_IMAGE_0_SIZE +#endif RAM (rwx) : ORIGIN = RAM_START, LENGTH = RAM_SIZE #include <memory_regions.ld.h> } diff --git a/boot/startup/mynewt_cortex_m7.ld b/boot/startup/mynewt_cortex_m7.ld index 92a844b28..18db83a6d 100644 --- a/boot/startup/mynewt_cortex_m7.ld +++ b/boot/startup/mynewt_cortex_m7.ld @@ -31,8 +31,12 @@ EXTERN(g_pfnVectors) /* Specify the memory areas */ MEMORY { +#ifdef FLASH_AREA_BOOTLOADER_OFFSET BOOT (rx!w) : ORIGIN = FLASH_AREA_BOOTLOADER_OFFSET, LENGTH = FLASH_AREA_BOOTLOADER_SIZE +#endif +#ifdef FLASH_AREA_IMAGE_0_OFFSET SLOT0 (rx!w) : ORIGIN = FLASH_AREA_IMAGE_0_OFFSET, LENGTH = FLASH_AREA_IMAGE_0_SIZE +#endif RAM (rwx) : ORIGIN = RAM_START, LENGTH = RAM_SIZE #include <memory_regions.ld.h> }
