CPU re-write mode MC16

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I am using IAR embedded work bench and trying to program(remotly)
MC16, Mitsubishi) in CPU re-write mode. In CPU re-write mode, MC16
has only 20K available RAM but the OS is about 100K so I can not re-program
the MC16 by copying the entire image to RAM. I wanted to know if I can
program MC16 by block by block. IN other words, can I put my code in
specific memory block in this way, I can re-program the specific block I want
instead of re-writing the entire OS, image
Any help would be appreciated,

Re: CPU re-write mode MC16
check out the Renesas website / M16C Application Notes.
There is an appnote about the M16C CPU rewrite mode.


cn8tes$rub$ snipped-for-privacy@driftwood.ccs.carleton.ca...
Quoted text here. Click to load it
Quoted text here. Click to load it

Re: CPU re-write mode MC16
Quoted text here. Click to load it

The application note reu05b0007_m16cap.pdf is probably the best guide.

You need to run your programming code (Loader) from an area of Flash
which you're not re-programming.  The loader should first copy the Flash
writing routines in the data sheet into RAM - only about 160 bytes IIRC.
The Loader then fetches the 100K binary image 256 bytes at a time and
writes this to a RAM buffer.  The loader then calls the previously
copied RAM routine to write this 256 bytes into program Flash, and so

You can't run from Flash while writing Flash, but you can of course run
from Flash while getting things ready and call RAM code for the actual
writing.  The RAM code is quite simple as it uses inbuilt routines.

Keith Wootten

Site Timeline