Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


STM32F407VET6 "RAM overflow" while using only 2/3 of it (afaik)

I need to declare ~153 KB buffer as a framebuffer for display (more precisely at least two buffers, as one must be in CCMRAM to have enough space) and as this MCU has 192 KB RAM in total, it clearly should be possible. But as soon as I declare buffer in CCMRAM (framebuffer2) to be of size 65536 and buffer in normal RAM more than 63798 (framebuffer1), linker gives me “RAM overflowed by ...” error.

I’m pretty new to this, so I don’t know exactly why is this happening, whether it is wrong linker definition, or some debug features taking up space, or something else. I’m working with CubeMX generated HAL project.

output.map and linker definition:
https://drive.google.com/open?id=0BynchtWoOt7aZzhXOFlDVURjMUEQuestion

After investigating output.map I found, that the problem was simple typo. I had buffer declared as

uint8_t buffer2[64000] __attribute__((section("ccmram")));


which I blindly copied from some example on this site and was probably for some different version of HAL. As the correct identifier of core coupled memory in my HAL is .ccmram, not ccmram, linker was putting the buffer into normal RAM, therefore “RAM overflow”. Correct definition is:

uint8_t buffer2[64000] __attribute__((section(".ccmram")));


with which buffer is placed into correct memory:

*(.ccmram)
 .ccmram        0x0000000010000000     0xfa00 Src/main.o
                0x0000000010000000                buffer2
 *(.ccmram*)


Sorry for mistake.


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs