cancel
Showing results for 
Search instead for 
Did you mean: 

how to build right loader for fmc norflash

jr_engr_mbed
Senior

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

Screenshot (1416).png

Screenshot (1418).png

  

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

@jr_engr_mbed 

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.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SofLit
ST Employee

@jr_engr_mbed 

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.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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.

 

Screenshot (1426).png

  

Screenshot (1424).png

 

The memory browser now reflects this change. Does this indicate that the image data is being retrieved correctly?

 

 

Screenshot (1430).png

Screenshot (1433).png

  the data goes like 0x63075fc0...so,this is fine for next step? 

 

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 ..

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..