-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- BMSSW - BMSB Added app validation to LIB_app.c/h Added verbose appDesc DIDread functionality
- Loading branch information
1 parent
7e85d8c
commit e3d789f
Showing
30 changed files
with
1,025 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
featureDefs: "#/components/bootloaders/STM/stm32f103/FeatureDefs.yaml" | ||
features: | ||
feature_erase_invalid_app: false | ||
feature_can_debug: | ||
feature_can_debug: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 163 additions & 0 deletions
163
components/bootloaders/STM/stm32f103/STM32F103C8-BLFLASHABLE.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
/** | ||
* STM32F103C8.ld | ||
* Linker script for STM32F103C8 | ||
*/ | ||
|
||
/* Entry Point */ | ||
ENTRY(Reset_Handler) | ||
|
||
/* Highest address of the user mode stack */ | ||
_estack = ORIGIN(RAM) + LENGTH(RAM); /* bottom of stack (grows down) */ | ||
|
||
__STACK_SIZE = 0x400; | ||
__HEAP_SIZE = 0x200; | ||
|
||
__RAM_SIZE = 20K; | ||
__FLASH_SIZE = 64K; | ||
__BOOT_FLASH_SIZE = 8K; | ||
|
||
__RAM_ORIGIN = 0x20000000; /* don't change */ | ||
__FLASH_ORIGIN = 0x8000000; /* don't change */ | ||
__APP_FLASH_ORIGIN = __FLASH_ORIGIN + __BOOT_FLASH_SIZE; | ||
__FLASH_END = __FLASH_ORIGIN + __FLASH_SIZE; | ||
__BOOT_FLASH_END = __FLASH_ORIGIN + __BOOT_FLASH_SIZE; | ||
|
||
|
||
/* Memory definition */ | ||
MEMORY | ||
{ | ||
RAM (rwx) : ORIGIN = __RAM_ORIGIN, LENGTH = __RAM_SIZE | ||
FLASH (rx) : ORIGIN = __FLASH_ORIGIN, LENGTH = __BOOT_FLASH_SIZE | ||
} | ||
|
||
SECTIONS | ||
{ | ||
.isr_vector : ALIGN(0x100) | ||
{ | ||
__app_start_addr = .; | ||
KEEP(*(.isr_vector)) /* interrupt vector table */ | ||
} > FLASH | ||
|
||
/* The program code and other data into "FLASH" Rom type memory */ | ||
.text : | ||
{ | ||
. = ALIGN(4); | ||
*(.text .text.* .gnu.linkonce.t.*) /* .text sections (code) */ | ||
*(.rodata .rodata.* .gnu.linkonce.r.*) /* .rodata sections (constants, strings, etc.) */ | ||
*(.eh_frame) /* https://stackoverflow.com/questions/26300819/why-gcc-compiled-c-program-needs-eh-frame-section */ | ||
|
||
. = ALIGN(4); | ||
KEEP (*(.init)) | ||
|
||
. = ALIGN(4); | ||
PROVIDE_HIDDEN (__preinit_array_start = .); | ||
KEEP (*(.preinit_array)) | ||
PROVIDE_HIDDEN (__preinit_array_end = .); | ||
|
||
. = ALIGN(4); | ||
PROVIDE_HIDDEN (__init_array_start = .); | ||
KEEP (*(.init_array)) | ||
KEEP (*(SORT(.init_array.*))) | ||
PROVIDE_HIDDEN (__init_array_end = .); | ||
|
||
. = ALIGN(4); | ||
KEEP (*(.fini)) | ||
|
||
. = ALIGN(4); | ||
_etext = .; /* address of end of text section */ | ||
} > FLASH | ||
|
||
.ARM.extab : | ||
{ | ||
*(.ARM.extab* .gnu.linkonce.armextab.*) | ||
} > FLASH | ||
|
||
.ARM.exidx : | ||
{ | ||
PROVIDE (__exidx_start = .); | ||
*(.ARM.exidx* .gnu.linkonce.armexidx.*) | ||
PROVIDE (__exidx_end = .); | ||
} > FLASH | ||
|
||
/* .ARM.attributes 0 : */ | ||
/* { */ | ||
/* *(.ARM.attributes) */ | ||
/* } */ | ||
|
||
/* Initialized data sections into "RAM" Ram type memory */ | ||
.relocate : | ||
{ | ||
. = ALIGN(4); | ||
_sdata = .; /* create a global symbol at start of section */ | ||
*(.data .data.*) /* .data sections */ | ||
*(.ramfunc .ramfunc.*) /* .ramfunc sections */ | ||
. = ALIGN(4); | ||
_edata = .; /* define a global symbol at end of section */ | ||
|
||
} > RAM AT> FLASH | ||
/* Used by the startup to initialize data */ | ||
_sidata = LOADADDR(.relocate); | ||
__appcrc_addr = __BOOT_FLASH_END - 4; | ||
__appdesc_addr = __appcrc_addr - SIZEOF(.appDescriptor); | ||
.appDescriptor __appdesc_addr : | ||
{ | ||
__app_desc_addr = .; | ||
. = ALIGN(4); | ||
KEEP(*(.appDescriptor)) | ||
} > FLASH | ||
__app_end_addr = __APP_FLASH_ORIGIN - 4; | ||
.crc __appcrc_addr : | ||
{ | ||
__app_crc_addr = .; | ||
KEEP(*(.appCrc)) | ||
} > FLASH | ||
|
||
|
||
/* Uninitialized data section into "RAM" Ram type memory */ | ||
.bss(NOLOAD) : | ||
{ | ||
/* This is used by the startup in order to initialize the .bss section */ | ||
. = ALIGN(4); | ||
_sbss = .; /* define a global symbol at bss start */ | ||
__bss_start__ = _sbss; | ||
*(.bss .bss.*) | ||
*(COMMON) | ||
. = ALIGN(4); | ||
_ebss = .; /* define a global symbol at bss end */ | ||
__bss_end__ = _ebss; | ||
} > RAM | ||
|
||
/* Heap and Stack definitions, if needed */ | ||
.heap (COPY) : | ||
{ | ||
. = ALIGN(8); | ||
__HeapLimit = .; | ||
. = . + __HEAP_SIZE; | ||
. = ALIGN(8); | ||
__HeapTop = .; | ||
PROVIDE(end = .); | ||
} > RAM | ||
|
||
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE) (COPY) : | ||
{ | ||
. = ALIGN(8); | ||
__StackLimit = .; | ||
. = . + __STACK_SIZE; | ||
. = ALIGN(8); | ||
__StackTop = .; | ||
_estack = .; | ||
PROVIDE(__stack = __StackTop); | ||
} > RAM | ||
|
||
ASSERT(__HeapTop < __StackLimit, "RAM overflowed stack") | ||
|
||
/* Remove information from the compiler libraries */ | ||
/DISCARD/ : | ||
{ | ||
libc.a ( * ) | ||
libm.a ( * ) | ||
libgcc.a ( * ) | ||
libc_nano.a ( * ) | ||
libg_nano.a ( * ) | ||
} | ||
} |
Oops, something went wrong.