This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bin file download at specific address in flash of microcontroller(LPC2148) using ulink2

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?

Parents
  • 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)

Reply
  • 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)

Children