Why doesn't a downloaded image persist in a runnable state after debugging?

I'm using HEW 4.09.00.007, debugging with E8A emulator against an R8C/38E chip. The debug build results in an *.abs file. I also have a release build generating a *.bin file.

When I connect to the target and download the .bin file, I'm able to click "run" in HEW and everything is fine. But if I close HEW / disconnect emulator / power cycle the chip, it does not run the bin I just downloaded.

However, if I use the FDT programmer software to flash the same .bin file, and then power cycle the chip, it does run.

I've done an experiment in which I programmed the .bin from HEW, then went to FDT and read the bin back off the chip. What I see is that that bin file matches exactly up until a series of addresses starting at 0xBFE4 (relative to top of flash at 0x4000, so the abs address would be 0xFFE4). There are a series of 4-byte values that differ, and then the last part of the file (from 0xC000 to 0xC0B9, or 0x10000 to 0x100B9 absolute) are the same again.

Looking at the memory map, this appears to a vector table, and I believe that this vector table is being modified to allow E8A + HEW debugging.

So my question is how can I configure HEW to not tweak this table when I'm programming on a release build from HEW? A debug build i can live with whatever HEW wants. My intermediate approach has been to switch over to FDT and program it there, but it's frustrating to have to use yet another tool, especially when I have a revert/update the firmware running on the E8A every time I switch between FDT and HEW. It feels like there should be an option in HEW to just program the image without debugging support, but I haven't found that yet.

  • Hello,

    this is just a question of starting E8a in the correct operating mode.

    You must NOT start the E8a debugger in the mode "Erase Flash and Connect". This is the debugging mode.

    You have to use the mode "Program Flash". In this mode HEW will only program your application code but no debugger firmware.

    Rgds

    Frank

  • In reply to FrankL:

    Thanks Frank!! This was exactly what I was looking for.

    {For future readers, this option is normally available in a popup dialog that appears when you click Debug > Connect. However, the dialog has an option to hide in the future, in which case it can be re-accessed by first connecting to the emulator (Debug > Connect), then going to the options (Setup > Emulator > Emulator Settings). The emulator settings option is only shown in the menus after a connect.}