Robotdyn Blackpill STM32F303CC: PIO has wrong max RAM size!

Hello,
just want to report that RAM size for STM32F303CC mcu (the one used for Robotdyn Blackpill) is 48KB and not 40KB as reported (and hence ,unfortunately, the max allowed by PlatformIO) see screenshots below:

For the project I’m working on, I had counted on squeezing out up to the last drop of that 48KB RAM, but now I’m stucked because PlatformIO refuse to compile if I reach 40KB… :frowning:

Any hint for a “temporary workaround”?

Thanks!

The vendor site says (https://www.st.com/en/microcontrollers-microprocessors/stm32f303cc.html)

The family incorporates high-speed embedded memories (up to 256 Kbytes of Flash memory, up to 40 Kbytes of SRAM)

More precisely the datasheet says

The used linker file is also however unaware of this part of memory and refers to some unmapped 0x600000 part for memory bank 1

When actually the CCM RAM lives at 0x10000000 with length 8K.

So if you want to use the full 48KB you will have to explicitly place some objects / buffers into the CCM RAM by adding special __attribute__ GCC instructions which references the section in the linker script, as this one says

So problem nr. 1 is that the LD script doesn’t know about the 8K CCM RAM (this should be fixed by PIO) and then your problem is just that you need to cleverly need to place stuff in the CCM RAM. I’ll open an issue for the first problem.

1 Like

Follow up at STM32F303CC: Linker script doesn't know about 8KByte CCM RAM · Issue #340 · platformio/platform-ststm32 · GitHub for @valeros to have a look at ^_^.

1 Like