1 Reply Latest reply on Dec 13, 2011 5:56 AM by anand.srinivasan.asokan

    Custom boot firmware, elf2img and interrupt vector table

    david.schneider

      In debugging our custom boot firmware with the latest SDK, I found that the latest version of elf2img uses the program header data instead of the section data to generate the image.

         

      This causes it to generate an img file that includes writes to address 0x00 through 0xFF, which is reserved for the interrupt vector table and is automatically populated in the firmware initialization.

         

      This would be fine, except when using a custom boot firmware, the boot firmware doesn't avoid writing to 0x00 through 0xFF, and so when the command to write to that section comes in, it proceeds to clobber the vector table with bad addresses.  It then promptly crashes andfails.

         

      Either generating an image that avoids writing to 0x00-0xFF or modifying the USB boot code to avoid writing to those addresses fixes the issue, but I'm surprised that this issue has not been hit in your testing.