Senior
April 3, 2019
Question
section `.bss' will not fit in region `RAM1'
- April 3, 2019
- 6 replies
- 3141 views
I have this attribute in my code:
#define PHY_ETHTORAM_ATTRIBUTE __attribute__ ((section(".sram2"), aligned(4)))And for example, in my code:
// Ethernet Rx MA Descriptor
volatile __attribute__((aligned(32))) PHY_ETHTORAM_ATTRIBUTE ETH_DMADescTypeDef DMARxDscrTab[RXBUF];
..........And I have this problem:
Output/test.elf section `.bss' will not fit in region `SRAM1'And I know, that this problem is in linker script...
And my memory is here:
/*
* STM32F427ZIT6 memory map - GNU ld linker script file
*/
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K
SRAM1 (rw) : ORIGIN = 0x20000000, LENGTH = 112K
SRAM2 (rw) : ORIGIN = 0x2001C000, LENGTH = 16K
BKPSRAM (rw) : ORIGIN = 0x40024000, LENGTH = 4K
}
INCLUDE Linker/Sections.ldAnd Sections.ld is in attachment.
Complete error messages are here:
- make: *** [Output/MU-Core.elf] Error 1
- Output/test.elf section `.bss' will not fit in region `SRAM1'
- recipe for target 'Output/test.elf' failed
- region `SRAM1' overflowed by 24672 bytes
- section .sram2 VMA [2001c000,2001fcff] overlaps section .bss VMA [200000c0,20021c5f]
Any idea, how to change linker script to function code? And what actually happened?
