Associate
October 21, 2014
Question
STM32F103RB - Heap and Stack Collision
- October 21, 2014
- 3 replies
- 1419 views
Posted on October 21, 2014 at 11:29
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 512WS2812_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 bytesAnd here is the Linker Script im using. Without my section defines.Its in attached file