Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Section for external SDRAM STM32F746 GCC

Hey guys,

I have a problem with defining a section for the external SDRAM on the STM32F746-Disco. I red many posts in different forums but I didn’t find the way to a working code.

I initialized the SDRAM in the SystemInit() and it’s working because I can use it in the main() function without additional initialisation. Afterwords I took the linker script and added a memory entry like followed:

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

and a section entry like this:

...
.sdram_data (NOLOAD) :
{
. = ALIGN(8);
_sdram_data_begin = .;
*(.sdram_data)
*(.sdram_data*)
. = ALIGN(8);
_sdram_data_end = .;
} >SDRAM
...

When I now declare a variable in the main file

const char picture1480*272*3 attribute ((section(“.sdram_data”)));

and want to fill it afterwards with information

picture1[] = {
0x00, 0xFF, 0xFF;
0x00, 0xFF, 0xFF;
0x00, 0xFF, 0xFF;
...
};

I get the error:

../src/main.c:53:1: warning: data definition has no type or storage class
picture1[] = {
^
../src/main.c:53:1: warning: type defaults to ‘int’ in declaration of ‘picture1’ -Wimplicit-int
../src/main.c:53:1: error: conflicting types for ‘picture1’
../src/main.c:52:12: note: previous declaration of ‘picture1’ was here
const char picture1480*272*3 attribute ((section(“.sdram_data”)));

When I declare the variable as followed I don’t get an error but it’s also not working.

attribute ((section(“.sdram_data”)))
const char picture1[] =
{
0x00, 0xFF, 0xFF;
0x00, 0xFF, 0xFF;
0x00, 0xFF, 0xFF;
...
};

I hope anybody of you can help me.

Hello !

First thank you your post helped me in the process.
I did it on an STM32f4x9I eval board.
You may have found your answer but I add my remarks if it can help others.

The problem for me is the way you declare youre picture :

  • picture1480*272*3 ==> ‘*’ cannot be used, use “x”.
  • “const char picture1[]” : why load const data into RAM ?, it stays in Flash. Anyway even if you want to do so your linker may detect const data and let it into flash.




You post have some things to clarify :
= ALIGN(8); why do you align on 8 bytes, 4 is sufficient.
attribute : the gcc linker use the attribute keyword.