This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Transfer a file form computer onto a ST flash memroy

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

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

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

Children