Difference between revisions of "Ozone detects wrong application entry point"

From SEGGER Wiki
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
When autogenerating a project with Ozone V3.20 or later you will find the following line twice in the Ozone .jdebug project file:
+
When autogenerating a project with Ozone V3.20 or later you will find the following line once or twice in the Ozone .jdebug project file:
 
<pre>
 
<pre>
 
PC = Elf.GetEntryPointPC();
 
PC = Elf.GetEntryPointPC();
Line 13: Line 13:
 
Now everything should be working as expected.
 
Now everything should be working as expected.
   
Should this also fail check if the VectorTableAddr detected by Ozone is at the expected address. If not either the debug information in the elf file is missing/incorrect or you are debugging a multi image setup. To solve the precedent error simply set the VectorTableAddr to the expected value. For the latter issue see the following Wiki article:
+
Should this also fail check if the VectorTableAddr detected by Ozone is at the expected address. If not either the debug information in the elf file is missing/incorrect or you are debugging a multi image setup. To solve the precedent error simply set the VectorTableAddr to the expected value.
  +
For the latter issue see: [[Debug on a Target with Bootloader]]
https://wiki.segger.com/Debug_on_a_Target_with_Bootloader
 

Latest revision as of 11:52, 7 July 2022

When autogenerating a project with Ozone V3.20 or later you will find the following line once or twice in the Ozone .jdebug project file:

PC = Elf.GetEntryPointPC();    

This function will return the entry point of the elf file. However for some toolchains (e.g. IAR and Keil) this entry point address will not be the actual address from where the target application starts but rather the point where the C runtime library starts executing. Depending on your target application this might lead to issues as he SystemInit might be skipped that way. While this behaviour of the third party toolchains is technically not wrong it makes not much sense for most embedded target devices.

Anyhow should you run into this issue it can simply be fixed by replacing the line mentioned above with the following instead:

PC = Target.ReadU32(VectorTableAddr + 4);  

Now everything should be working as expected.

Should this also fail check if the VectorTableAddr detected by Ozone is at the expected address. If not either the debug information in the elf file is missing/incorrect or you are debugging a multi image setup. To solve the precedent error simply set the VectorTableAddr to the expected value. For the latter issue see: Debug on a Target with Bootloader