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


TrueStudio and CubeMX external SDRAM setup

I have the STM32F746G Discovery board and used CubeMX to generate the TrueStudio project for this. Out of the box CubeMX already has a project for this board with all paripherals already setup, including external SDRAM. However the generated truestudio project does not appear to set the SDRAM fully to utilise it!

There are calls generated for MX_FMC_Init() which in turn calls the function HAL_SDRAM_Init() but when you debug there is no region appearing in the build analyzer. I have been reading that this must be defined in the .ld file so I have added it so it now looks like this:

MEMORY
{
RAM (xrw)  : ORIGIN = 0x20000000, LENGTH = 320K
FLASH (rx)  : ORIGIN = 0x08000000, LENGTH = 1024K
SDRAM (rx)  : ORIGIN = 0xC0000000, LENGTH = 16M
}

which now shows a region in the build analyzer called SDRAM but my write/reads to any address over 0xC0000000 are still failing and using the memory watch window it cannot show any memory in that region and just shows ????.

What am I missing? Any clues would be great.

Tunisia

Hi,

Before the IDE can read the SDRAM content, you should initialize it in memory mapped mode, so that the memory viewer could read and display its content.

another hint if you need to place some variables, constants within the SDRAM, you should use the section attribute when declaring your variable, and of course you need to create this section within the .ld file.

Regards,
Tarek


 

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