I want to transfer the KEIL generated .hex file from computer's memory via UART onto the internal flash memory of the STM32F4. Can anyone give me a heads up of where to get started? and what are the important things which needs to be taken care of.
Please note: my UART is working great in both polling and interrupt mode.
thanks, Sam
Oh OK!
So when you say binary image does that mean I have to first convert my keil generated .hex file into a .bin file and then transfer it to the flash memory. If yes, then what will be the way to do the conversion.
Of course, I want to get the rudimentary knowledge about this but can you please suggest some good sources from where I can read and implement it successfully.
Thanks, Sam
Don't CS courses these days cover Assemblers, Compilers, Linkers and Loaders?
http://www.keil.com/support/docs/1584/ en.wikipedia.org/.../Intel_HEX
The Intel HEX format it pretty simple form of representing addresses and memory content, the sort of thing that could be encoded in 8-bit assembler for micro-processors in the late 70s.
You could write your loader to process this data, and to write it into the STM32's FLASH. Start by understanding the data format, and the data it describes, and then review the reference manual and examples to understand how to write to the FLASH. Look at the IAP examples ST provides, these use binary data, and Y-MODEM to send it to the processor.
The IAP examples also show how to pass control to other code. At the most basic level you can jump to different code, for the Cortex-M3/M4 you'll want to relocate the Vector Table, and make sure you build the code for the memory location you want to place it. I'd recommend reading the Cortex-Mx Technical Reference Manuals, others by Joseph Yiu, and generally those about Micro-Processor and Micro-Controller architectures.
Hello Sir,
Thank you for your help, I am not from CS. I am an electrical engineer specialized in RTL, wanting to learn embedded systems. So all these terms are new to me.
Thanks for the help
Hi Sam,
Were you successful in transferring a file from PC to STM32 flash? I am trying to do the same using IAP USART protocol and having trouble in configuring the user application that is used to load at a particular address. If you have implemented this, can you share the procedure for configuring the user application that is received using YMODEM.
Thank you, Harsha