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


STM32L4 linker script for 128 KB RAM

Hi ST support,

I’m using STM32L476RG-Nucleo with the last eclipse framework v1.3.0.

I was surprised by the fact that the generated linker script only offers 96 KB RAM.
It appears that this mcu RAM is split in SRAM1 and SRAM2 which are NOT contiguous.

I don’t care where my RAM data is allocated but I need 128 K.

Forcing 128K in the generated linker script make the execution fail as the RAM region are NOT contiguous.

Is it a possibility to define the two sections and link RAM data in these regions without explicitely setting the mapping.
To do that, the linker must look for the best data arrangement to respect the RAM region mapping and I figure this is NOT implemented so it’s mandatory to set the mapping.

Any corrections to my assumptions / suggestions ?

Thanks and regards,
Sylvain

I tried to allocate my OS heap in SRAM2 that way:

Source C code:
static uint8_t attribute ((section (“RAM_2”))) ucHeap configTOTAL_HEAP_SIZE ;

Linker script: definiing the section:
RAM_2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K

But doing this is NOT working: gcc allocate a section RAM_2 in classic RAM section and ucHeap won’t reside in RAM_2 section defined in linker script.

Can you provide the right way to do this ?

thanks and regards,
Sylvain


I solved my own issue using a previous post on the forum:

here is a solution:
linker script:

region definitions:

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
RAM_2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K


in section definitions:

.ram2_bss :
{
. = ALIGN(4);
*(.ram2_bss)
*(.ram2_bss*)

} >RAM_2


C source code:
static uint8_t attribute ((section (“.ram2_bss”), used)) ucHeap configTOTAL_HEAP_SIZE ;

regards,
Sylvain


Hi ST support,

I’m using STM32L476RG-Nucleo, AC6 IDE generated linker script only offers 96 KB RAM.

My need application more RAM, can I use 32 KB which is SRAM2 as below.

32 Kbyte located at address 0x1000 0000 with hardware parity check (SRAM2)

Best regards,
Sachin


 

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