Hi,
I have recently been involved in making flash loader for iMXRT1176 which uses hyperflash (MIMXRT1176-GEORGE_S26HL512T) over FLEXSPI peripheral.
Unfortunately, the default FlexSPI NOR ROM API seems not to support this version of hyperflash (similar version is present on RT1050-EVKB but it is an older one, CYPRESS S26KS512SDPBHI020) along with my configuration. Despite the fact that pinout used for my hyperflash is identical to the one suggested in the ROM API, but that is issue I handled by implementing my own low level driver for hyperflash and I just don't use the ROM API for FLEXSPI as it does not work.
Now to the point.
I'm trying to figure out this whole jlink related mechanism that takes a bunch of bytes that in a whole is a final application that was previously compiled for the microcontroller which in turn is to be executed from non-volatile memory after power up of the board.
1.) I already know that Jlink is able to download application image to any non-volatile memory (from which code can be executed) only if there is a proper xml device configuration like one below:
<DataBase>
<Device>
<ChipInfo Vendor="NXP" Name="LPC1756" />
<FlashBankInfo Name="NOR Flash" BaseAddr="0xA0000000">
<LoaderInfo Name="SPI flash loader" MaxSize="0x01000000" Loader="flash_loader.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
</FlashBankInfo>
</Device>
</DataBase>
and on top of that there must exist proper flash_loader.elf that is to be passed into Loader field in the xml device configuration above. This flash_loader.elf must have a proper memory sections defined there code, data and deviceDescription will be placed, like described here:
SEGGER Flash Loader - SEGGER Wiki
2.) When one executes image load command via jlink, it loads flash_loader.elf to RAM of the uC and from there it can execute the functions as defined in the OPEN CMSIS FLASH LOADER standard
Algorithm Functions (open-cmsis-pack.github.io)
Now what I lack in understanding is the following.
How does the Jlink or IDE using Jlink pass the chunks of data to the Flash Program function from the CMSIS loader standard above, without any intermediate interface?
flash_loader.elf does not have any main file, so there is no like starting space for code, it must be enforsed somehow to pass the data into the specific functions from API that require it.
I know that MCUXpresso uses something called Mailbox and messages that pass on commands and data, which are defined in a project called LPCXFlashDriverLib where
Solved! Go to Solution.
I've just found out on the keil website the following link
Programming External Flash with STM32 Devices (keil.com)
It contains the whole procedure of creating the flash loader for STM32, but it does not really matter for the topic in question.
The essential part that basically explains the procedure was shown on the image below:
For more details, see the link above.
Best regards,
Michal
I've just found out on the keil website the following link
Programming External Flash with STM32 Devices (keil.com)
It contains the whole procedure of creating the flash loader for STM32, but it does not really matter for the topic in question.
The essential part that basically explains the procedure was shown on the image below:
For more details, see the link above.
Best regards,
Michal
Hi @mimlo ,
I am sorry but as keil and iar are 3rd party tools we don't have such details as you asked, please kindly check with keil and iar for further support.
https://www.iar.com/knowledge/support/request-technical-support
Thanks for your patience and understanding!
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------