AnsweredAssumed Answered

STM32F103RB - Heap and Stack Collision

Question asked by sauer.michael.001 on Oct 21, 2014
Latest reply on Oct 21, 2014 by fm
Hi,

i tried on my F103RB to create 4 Arrays with 512 entries and 3 byte wide.
Should be calculated as 6144 byte. So i tried it to create but i only got Heap and Stack collision. Is there a possibility to move this arrays to the flash?
I tried it with some section creating in linker script and defined the arrays with __ATTRIBUTE__ but i cannot figure it out.
Here are the definitions of the arrays and the struct.

#define  WS2812_LED_MAX_ANZ 512
WS2812_RGB_t WS2812_LED_BUF_CH1[WS2812_LED_MAX_ANZ];
WS2812_RGB_t WS2812_LED_BUF_CH2[WS2812_LED_MAX_ANZ];
WS2812_RGB_t WS2812_LED_BUF_CH3[WS2812_LED_MAX_ANZ];
WS2812_RGB_t WS2812_LED_BUF_CH4[WS2812_LED_MAX_ANZ];

typedef struct
{
     uint8_t red;    // 0...255 (als PWM-Wert)
     uint8_t green;  // 0...255  (als PWM-Wert)
     uint8_t blue;   // 0...255 (als PWM-Wert)
} WS2812_RGB_t;

/opt/arm/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: MagicLightController.elf section `.bss' will not fit in region `RAM'
/opt/arm/bin/../lib/gcc/arm-none-eabi/4.6.1/../../../../arm-none-eabi/bin/ld: region `RAM' overflowed by 12932 bytes

And here is the Linker Script im using. Without my section defines.
Its in attached file

Attachments

Outcomes