v0.5.1 #25

Merged
klassents merged 6 commits from v0.5.1 into main 2025-05-30 12:24:10 +03:00
2 changed files with 3 additions and 5 deletions
Showing only changes of commit cad2582733 - Show all commits

View File

@ -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;

View File

@ -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);