2024-09-09 06:21 AM - last edited on 2024-09-09 06:26 AM by SofLit
From the beginning, I have been using EWARM to build the external loader. However, when following the provided steps for the QSPI flash type, I couldn't fully adapt to them. So, I imported a GitHub file, changed only the dev_inf.c, and generated the ST-LDR file, but it resulted in partial data showing as 0xFFFFFFFF.
Now, I need to properly generate the loader. Should I continue using EWARM, or should I switch to generating it in CubeIDE? If it's in CubeIDE, where can I find the linker file for it?
How to implement and use your own external flash l... - STMicroelectronics Community
Solved! Go to Solution.
2024-09-09 06:36 AM
In the previous post you said you succeeded to build a loader for your NOR Flash.
Now I'm confused..
Let's summarize:
1- You need first to start by a simple project where you initialize the FMC for this NOR flash and do some simple read/write tests to validate the configuration and the timings.
2- Then you need to inspire from to build your loader How to implement and use your own external flash l... - STMicroelectronics Community.
3- Validate your loader with CubeProgrammer by reading and writing data.
4- You can use this loader in CubeIDE.
To build and generate an external loader is not limited to EWARM IDE. So if you generated well your loader with EWARM it should work on CubeProgrammer and CubeIDE.
2024-09-09 06:26 AM
The tools used to built the External Loader shouldn't be particularly material. I'm using GNU/GCC + MAKE and that works fine. A lot of ST's loaders are built with EWARM/IAR
The memory looks similar from the BSP vs Loader perspective, I don't have a good way to side by side these, or the patience.
2024-09-09 06:36 AM
In the previous post you said you succeeded to build a loader for your NOR Flash.
Now I'm confused..
Let's summarize:
1- You need first to start by a simple project where you initialize the FMC for this NOR flash and do some simple read/write tests to validate the configuration and the timings.
2- Then you need to inspire from to build your loader How to implement and use your own external flash l... - STMicroelectronics Community.
3- Validate your loader with CubeProgrammer by reading and writing data.
4- You can use this loader in CubeIDE.
To build and generate an external loader is not limited to EWARM IDE. So if you generated well your loader with EWARM it should work on CubeProgrammer and CubeIDE.
2024-09-09 10:38 AM
Previously, I suspected the loader due to the issue I shared in the last post. However, now I get full data when using the testing code in TouchGFX without assigning image data in the linker. I can see the same data as when I tested the FMC code separately. This only occurred after including the image data in the linker.
The memory browser now reflects this change. Does this indicate that the image data is being retrieved correctly?
the data goes like 0x63075fc0...so,this is fine for next step?
2024-09-09 12:19 PM
If you uploaded data (I think the image) to the NOR Flash using the cube programmer and you read it with a simple program after configuring the FMC and you find the same data as you upladed with CubeProgrammer, that means: the loader is working correctly as well as the reading from with NOR Flash.
If this is your status, no more to investigate from the loader side ..
2024-09-09 12:23 PM
Make some code it CRC or HASH the NOR content from the MCU, and compare that with the data on the PC, generated by the Linker.
Perhaps use objcopy or objdump to generate binary files for the different memory regions, and run the integrity check over them.
Perhaps add linker symbols, via the linker script, so you can determine the size of the image in the external memory, and pass those parameters to the MCU side integrity check.