Development Tools
  problem in banked code upgrade using command prompt based FlashUtilCL.exe

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   problem in banked code upgrade using command prompt based FlashUtilCL.exe
sdave
New Member
posted December 14, 2006 09:58 AM     Click Here to See the Profile for sdave     Edit/Delete Message
I wanted to upgrade the code space using FlashUtilCL.exe with DOS command prompt utility and JTAG.

I have used code banking. please let us know the step by step by instruction to dump the code in device f130.

I have followed the below steps but i could not get success in it.
1) converted mycode.omf into mycode.hex using OH51.exe
2) FlashUtilCL.exe Download mycode.hex 1 0 0

IP: Logged

Tsuneo
Member
posted December 14, 2006 01:08 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
I suppose you are working on Keil.

"1) converted mycode.omf into mycode.hex using OH51.exe"

Which linker do you use?
BL51 - OC51
LX51 - OHX51

- OH51 hex converter doesn't support banked code.
- Separate HEX file is generated for each bank

"Using OC51" for BL51 from Keil
"Code Banking" for LX51 from Keil

"2) FlashUtilCL.exe Download mycode.hex 1 0 0"

FlashUtilCL.exe Download mycode.b00 1 0 0
FlashUtilCL.exe Download -B1 mycode.b01 1 0 0
FlashUtilCL.exe Download -B2 mycode.b02 1 0 0
FlashUtilCL.exe Download -B3 mycode.b03 1 0 0

Tsuneo

IP: Logged

Tsuneo
Member
posted December 15, 2006 08:44 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Continued from another topic of the same title,
"problem in banked code upgrade using command prompt based FlashUtilCL.exe"


"with OC51 it has generated mycode.b01, mycode.02. mycode.b03 files for B1,2,3, but i didnt find mycode.b00."

Umm..
- OC51 generates separated object files for each bank. These output files must be converted to HEX file by OH51
- The each object file generated by OC51 includes "common code", that is, BANK 0. Another split procedure is required; It is done by an utility, like SRecord.

SRecord - win32
http://sourceforge.net/project/showfiles.php?group_id=72866

Then, the procedure is revised as follows.

1) OC51 - Convert original banked-omf file into separated-object files of each bank

> OC51 mycode.omf

mycode.B01, mycode.B02, mycode.B03 are generated.
- When the original banked-object file doesn't have corresponding bank, separated-object file isn't generated for the bank.

2) OH51 - Convert each separated-object file to HEX file

> OH51 mycode.B01 HEX (mycode_B01.hex)

3) Srecord - Split "common" part and banked part

For Bank 0,
> srec_cat mycode_B01.hex -intel -crop 0x0000 0x8000 -o mycode_B00.hex -intel

For other banks,
> srec_cat mycode_B01.hex -intel -crop 0x8000 0x0000 -o mycode_B01.hex -intel

4) FlashUtilCl - Write them to the FLASH

> FlashUtilCL.exe Download mycode_B00.hex 1 0 0
> FlashUtilCL.exe Download -B1 mycode_B01.hex 1 0 0
...

Tsuneo

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b