v0.5.1 #25
@ -21,13 +21,12 @@
|
||||
#define FLASH_END_OFFSET 0x1000
|
||||
|
||||
// values from ld script
|
||||
extern uint8_t __TEXT_START__[];
|
||||
extern uint8_t __TEXT_END__[];
|
||||
extern uint8_t __RODATA__[];
|
||||
|
||||
// RAM-function for updating flash cache limit by app size to improve performance
|
||||
__attribute__((section(".ram_text"))) void updateCacheLimit(void)
|
||||
{
|
||||
uint32_t new_limit = (uintptr_t)__TEXT_END__ - (uintptr_t)__TEXT_START__ + 128; // 128 byte for margin
|
||||
uint32_t new_limit = (uintptr_t)__RODATA__ - SPIFI_BASE_ADDRESS;
|
||||
// limit cache size by flash size with margin
|
||||
if (new_limit > (FLASH_SIZE - FLASH_END_OFFSET))
|
||||
new_limit = FLASH_SIZE - FLASH_END_OFFSET;
|
||||
|
||||
@ -21,11 +21,10 @@ SECTIONS {
|
||||
*crt0.S.o(.text .text.*)
|
||||
*(.text.smallsysteminit)
|
||||
*(.text.SmallSystemInit)
|
||||
/*. = ORIGIN(rom) + 0xC0;*/
|
||||
/*KEEP(*crt0.S.o(.trap_text))*/
|
||||
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
PROVIDE(__RODATA__ = .);
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
. = ALIGN(CL_SIZE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user