Hi,
I have ulink2, Keil uVision4 and My board with LPC2148 microcontroller.
I can download ulink2 .hex file and .axf file using ulink2.
But i want to add CRC in my binary, So I approached like this.
I used command line option In the dialog Project — Options for Target — User to get bin file from AXF file and written a program for CRC calculation and putting(appending) back that crc into that binary( this is CRC appended file). I invoked that program same In the dialog Project — Options for Target — User.
I have boot loader at 0x0000 to 0x1FFFF and after word application binary from 0x2000 to end of flash. if i download CRC appended file using boot loader via USB. Its working fine. CRC check is also passing.
But i want to automate this thing So Now i want to download this bin file using ulink2 to 0x20000 address.
I tried http://www.keil.com/support/man/docs/uv3/uv3_fl_hexdownload.htm method by putting bin file instead of hex file, It is not working and also does not satisfy my requirement. Because I have to create separate project for this.
I am not able to download bin2hex convector from http://www.keil.com/download/docs/113.asp
Is any other link exist?
If you did write a program to compute the CRC, then it would probably have taken you two hours extra to have that same program directly generate a full HEX file.
I already written program for CRC computation and its working fine.
Question is :
How i can download bin file at Specific address of flash using keil and ulink2.
My previous post did indicate a route. Your "already written" program could be extended a bit.
You're still asking the wrong question. While I could perhaps waste a lot of time trying to get the .BIN route working, I know that the .HEX route works, and does easily. Take the route known to work, or waste your own time figuring out what does and doesn't work.
Download the srecord program. srecord.sourceforge.net/ and install it
Locate your binary file and run:
"srec_cat test.bin -binary -offset 0x08008000 -o test.hex -intel"
This will convert the binary file to hex, and make the base address 0x08008000.
Make an empty Keil project for the processor you are using.
Make the name of the executable the name of the hex file.
You can download the hex file now by clicking download in the menus
If you want to load the flash from the "command line" or a before / after action you can use
uv4.exe -f yourproj.uvproj(x)
Thanks Robert McNamara.
I got my answer.
Thanks Westonsupermare Pier and Per Westermark.