Skip to content

Commit

Permalink
Reclaim even more space if Ethernet is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Jan 23, 2025
1 parent 6649556 commit 8188ea9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion connectivity/lwipstack/lwip-sys/arch/lwip_sys_arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# elif defined(TOOLCHAIN_GCC_CR)
# define ETHMEM_SECTION __attribute__((section(".data.$RamPeriph32")))
# else
# define ETHMEM_SECTION __attribute__((section("AHBSRAM0"),aligned))
# define ETHMEM_SECTION __attribute__((section("AHBSRAM"),aligned))
# endif
#elif defined(TARGET_STM32H7)
# if defined (__ICCARM__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ char s_trace_buffer[100] = MEM_MNGR_TRACE;
# elif defined(TOOLCHAIN_GCC_CR)
# define ETHMEM_SECTION __attribute__((section(".data.$RamPeriph32")))
# else
# define ETHMEM_SECTION __attribute__((section("AHBSRAM0"),aligned))
# define ETHMEM_SECTION __attribute__((section("AHBSRAM"),aligned))
# endif
#endif
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ MEMORY
{
FLASH (rx) : ORIGIN = MBED_CONFIGURED_ROM_BANK_IROM1_START, LENGTH = MBED_CONFIGURED_ROM_BANK_IROM1_SIZE
RAM (rwx) : ORIGIN = MBED_RAM_BANK_IRAM1_START + VTORS_NEEDED_SPACE, LENGTH = (MBED_RAM_BANK_IRAM1_SIZE - VTORS_NEEDED_SPACE - 32) /* topmost 32 bytes used by IAP functions */

AHBSRAM0(rwx) : ORIGIN = MBED_RAM_BANK_IRAM2_START, LENGTH = 16K
AHBSRAM1(rwx) : ORIGIN = MBED_RAM_BANK_IRAM2_START + 16K, LENGTH = 16K
AHBSRAM(rwx) : ORIGIN = MBED_RAM_BANK_IRAM2_START, LENGTH = MBED_RAM_BANK_IRAM2_SIZE
}

/* Linker script to place sections and symbol values. Should be used together
Expand Down Expand Up @@ -191,18 +189,16 @@ SECTIONS
placed in this higher RAM bank where
they will be left uninitialized.
*/
.AHBSRAM0 (NOLOAD):
.AHBSRAM_bss (NOLOAD):
{
Image$$RW_IRAM2$$Base = . ;
*(AHBSRAM0)
Image$$RW_IRAM2$$ZI$$Limit = .;
} > AHBSRAM0
*(AHBSRAM)
} > AHBSRAM

/* Fill all of AHBSRAM1 with additional heap */
/* Fill remaining space in AHBSRAM with additional heap */
.heap (NOLOAD): ALIGN(8)
{
__mbed_sbrk_start = .;
. = ORIGIN(AHBSRAM1) + LENGTH(AHBSRAM1);
. = ORIGIN(AHBSRAM) + LENGTH(AHBSRAM);
__mbed_krbs_start = .;
} > AHBSRAM1
} > AHBSRAM
}

0 comments on commit 8188ea9

Please sign in to comment.