Write a FlashLoader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Write a FlashLoader

Jump to solution
900 Views
Devyy
Contributor II

Hello everyone,

I'm a beginner in embedded system programmation and I want to create my own flash loader to download and write a programme using UART. I'm using a kinetis mkv58f1m0vlq24.

I dont want to use any libraries function like "flash_memory_write". I'm just trying to improve my skills.


My question is what are the steps to achieve to write in flash memory ?

I read datasheets and it seems to have a flash security but when i'm watching my registers, the security seems to not be active.

What I understood is that before every write in memory, i have to erase the memory area.


Thank you in advance for your answers,

Devyy

0 Kudos
1 Solution
879 Views
ErichStyger
Senior Contributor V

Hi @Devyy ,

you might have a look at https://mcuoneclipse.com/2013/04/28/serial-bootloader-for-the-freedom-board-with-processor-expert/

Basically, you need

a) implement the UART/serial driver

b) define a data protocol and parser (e.g. reading S19 files)

c) program the flash memory. Have a look at the SDK for the flash drivers

d) do all the controlling around: reset handling, reset vector, vector table

 

good luck!

View solution in original post

0 Kudos
2 Replies
880 Views
ErichStyger
Senior Contributor V

Hi @Devyy ,

you might have a look at https://mcuoneclipse.com/2013/04/28/serial-bootloader-for-the-freedom-board-with-processor-expert/

Basically, you need

a) implement the UART/serial driver

b) define a data protocol and parser (e.g. reading S19 files)

c) program the flash memory. Have a look at the SDK for the flash drivers

d) do all the controlling around: reset handling, reset vector, vector table

 

good luck!

0 Kudos
866 Views
Devyy
Contributor II

Hi !

I have read what you sent. It will help me for sure.
Thank you so much !

0 Kudos