I'm evaluating Ozone 3.20e with an STM32F205ZG chip and a v9.1 J-Link. I flashed the device earlier using JFlash, and am trying to start the debugger using the "Attach & Halt" command. I get the following error dialog:
===================
The target stopped in HardFault exception state.
Reason: A fault with configurable priority has been escalated to a HardFault exception at 0x00000000.
For more information about analyzing faults on Cortex-M, refer to:
wiki.segger.com/Cortex-M_Fault.
===================
I expect an error of that sort because the device doesn't have a bootloader flashed (the image is firmware that expects to be launched by a bootloader).
But when I issue a "Reset & Halt" command, I expect that the SP and PC registers will be set up from the firmware file's ELF symbol information. It looks like the debugger attempts to set those registers properly using the Target.SetReg() function but those calls return an "Invalid parameter" error:
Display All
The addresses look correct, and the disassembly at address 0x807ce38 is correct. So I assume the invalid parameters are the register names "SP" and "PC". I didn't write any Ozone script for this project - it must be a script that came with Ozone. Should those register names (which look normal tome) be something else?
Any idea what is going wrong?
===================
The target stopped in HardFault exception state.
Reason: A fault with configurable priority has been escalated to a HardFault exception at 0x00000000.
For more information about analyzing faults on Cortex-M, refer to:
wiki.segger.com/Cortex-M_Fault.
===================
I expect an error of that sort because the device doesn't have a bootloader flashed (the image is firmware that expects to be launched by a bootloader).
But when I issue a "Reset & Halt" command, I expect that the SP and PC registers will be set up from the firmware file's ELF symbol information. It looks like the debugger attempts to set those registers properly using the Target.SetReg() function but those calls return an "Invalid parameter" error:
Source Code
- Debug.SetResetMode (RM_RESET_HALT);
- Debug.Reset();
- Reset: Halt core after reset via DEMCR.VC_CORERESET.
- Reset: Reset device via AIRCR.SYSRESETREQ.
- Elf.GetBaseAddr(); // returns 0x8041800
- Target.ReadU32 (0x08041800); // returns 0x20003400
- Target.SetReg ("SP", 0x20003400);
- Target.SetReg ("SP", 0x20003400): Invalid parameter: SP
- Elf.GetEntryPointPC(); // returns 0x807CE38
- Target.SetReg ("PC", 0x807CE38);
- Target.SetReg ("PC", 0x807CE38): Invalid parameter: PC
The addresses look correct, and the disassembly at address 0x807ce38 is correct. So I assume the invalid parameters are the register names "SP" and "PC". I didn't write any Ozone script for this project - it must be a script that came with Ozone. Should those register names (which look normal tome) be something else?
Any idea what is going wrong?