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

Customized bootloader to program HEX file

I am trying to write a customized boot loader application on LPC2478. The bootloader application reads the hex file stored in a memory device and programs the on chip flash memory using IAP routines. the test application resides at location 0x60000. After the chip programming is complete the bootloader is supposed to jump to 0x6000 using "(*((void(*)(void))0x60000))();"

The problem i am facing is

1>. Even though the bootloader successfully programs the flash 0x6000 onward, which i have read using flash magic, the application refuses to start.

2>. I have no clue of what to do with record types "01" and "05" which i have encountered in my hex files.

3>. If i program the same hex file that i programmed using my bootloader using flash magic [both bootloader and hex file resides at this time] , the application runs successfully.

4>. I tried to read the entire chip memory [0x0000 to 0x7DFFF containing boot loader and test application both] using flash magic and saved to a file then re-programmed using flash magic, and the same test application runs.


A>. kindly someone let me know what is to be done when record type 01 and 05 is encountered.

B>. Is there some sacred data that is to be written on chip after which the bootloader operation would be considered complete so that an application runs.

Parents
  • Depends on chip, but normally yes.

    ULINK2 is a JTAG interface. The normal way for programming chips with ULINK2 is to copy the data into RAM and download a small code block into RAM. Then call that code block and have it perform the programming. Potentially by calling IAP routines available in the chip or potentially by directly accessing the flash.

    FlashMagic normally sends the data to a bootloader already available in the chip, and that boot loader erases and programs flash sectors.

    Both alternatives results in "random noise" at different areas of the RAM, that may affect a program that doesn't correctly initialize all variables.

    FlashMagic normally transmits the speed of any connected crystal, to allow the boot loader to use this crystal for controlling the serial port and any timing for the flash programming.

    It's hard to say what hardware the ULINK2 may potentially touch.

Reply
  • Depends on chip, but normally yes.

    ULINK2 is a JTAG interface. The normal way for programming chips with ULINK2 is to copy the data into RAM and download a small code block into RAM. Then call that code block and have it perform the programming. Potentially by calling IAP routines available in the chip or potentially by directly accessing the flash.

    FlashMagic normally sends the data to a bootloader already available in the chip, and that boot loader erases and programs flash sectors.

    Both alternatives results in "random noise" at different areas of the RAM, that may affect a program that doesn't correctly initialize all variables.

    FlashMagic normally transmits the speed of any connected crystal, to allow the boot loader to use this crystal for controlling the serial port and any timing for the flash programming.

    It's hard to say what hardware the ULINK2 may potentially touch.

Children
No data