Re: remote firmware update: how to instruct the compiler?

Dear Jan,

thanks for your explanation,

Enrico, > as I could see from your recent postings you are using a Mitsubishi M16.

yes, indeed.

Our TASKING toolchain has an example as how to implement a flash programming > routine wih dta coming from the serial port. > > The most important thing to know: > The compiler has nothing to do with allocation. That is the linker part.

ok.

You will have to locate the flash programming and hex file reading routine > into a ROM area (typically one of the separately programmable flash segments > of the M16C. > > Then you need a copy routine to copy the content of the bootloader > segment/section to RAM and finally jump to the start address of the > bootloader and run. > The copy routine can be kept VERY simple by using the SMOVF instruction of > the M16C.

ok.

Also if you do not use any runtime routine of the user application you will > per se have no external references outside the procedures now resideing in > RAM. > > If you want to have a copy of the example let me know and I can send it to > your email address. > > If you use the NC30 toolchain you will have to adapt a couple of things but > in general you can use these routines as a base for your won development. > > with kind regards > > /jan

Let's get into the details:

if I want to run a program written in RAM instead of flash, I'm gonna have to change the start-up file in order to instruct the linker to produce hex code that has an absolute start address located in RAM instead of flash, right?

Otherwise, all jump instructions will jump to a wrong addressess. kind regards Enrico

--
***********************************************************
* Enrico Migliore - Co-founder and Senior Software Engineer
 Click to see the full signature
Reply to
Enrico Migliore
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.