Hi 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, thanks,
CPU re-write mode MC16
Nov 15, 2004
2 Replies
check out the Renesas website / M16C Application Notes. There is an appnote about the M16C CPU rewrite mode.
grtnx /jan
Siva Palaninathan schrieb in im Newsbeitrag: cn8tes$rub$ snipped-for-privacy@driftwood.ccs.carleton.ca...
re-program
want
In message , Siva Palaninathan writes
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 on.
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.
Cheers
Keith Wootten
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required