Debugging application with a non 0x00000000 starting address moved for use with Flashloader

Using the IAR compiler, and I've moved my application code up to 0x00100000 so that I can have the bootloader down at 0x00000000. The application doesn't have any Flashloader code in it, that's all self contained in the bootloader. The problem I'm running into is being able to now debug the application code. I'm assuming that I need to tell IAR where I've moved that to (the Flashloader documentation makes mention about having this setup), but I haven't been able to figure how to to get this information into IAR. As is I'm getting an error "__vector_table symbol not found. e_entry value: 0x0010E080 does not match reset vector value: 0x00013BD0 Initial SP_main value:0x1FFE1000 uncertain. "

How do I setup IAR to allow debugging when I've moved my application starting address to support a bootloader?

 

Thanks

  • Of course after not finding the information I ask, then find what I'm looking for. The IAR documentation here www.iar.com/.../ was what I was missing, specifically the --drv_vector_table_base= flag in Debugger Extra Options, up and running now.
  • In reply to Mike:

    Okay this only kind of worked. This lets me fire up the debugger, however it does start the debugging session in the bootloader. The bootloader doesn't recognize the downloader code that was just flashed via jtag, so it reloads a valid downloader image from the memory device. Which means the downloader code I'm debugging is now whatever code I have in the BCH image, not what I'm attempting to load via the debugger.
  • In reply to Mike:

    Hi Mike,

    If set your active project to the actual application (not the bootloader) and select Project > Debug without Downloading, does it work for you? Of course it assumes that project symbols match symbols actually flashed into MCU.

    Regards,
    adboc
  • In reply to adboc:

    The active project is already set to the application, not the bootloader. I can select Debug without Downloading and that does work, but unless I'm missing something that means I need to use the bootloader to get that image on the the board. I'm trying to figure out if there's a way to debug an setup that has a bootloader, without the bootloader overwriting the image I've loaded via jtag. The IAR documentation I followed to set this up went through setting up the bootloader and application, but still starts the debugger at address zero so starting in the bootloader. Is it possible to just start at the offset address for the application when debugging and bypass the bootloader altogether?

    Thanks,
    Mike
  • In reply to Mike:

    The issue I was running into was that the bootloader was checking for the CRC in the application code header, and since what we loaded in flash was from the IDE there wasn't a CRC in the header. By taking a look at the CRC in the BCH file when it gets created, I was able to add that CRC into the header that's compiled into the application code, and then debug the application directly without having to load a copy via a thumb drive.