Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
koala
Level 4
Level 4
10 likes given 50 replies posted 5 likes given

I am using ADS-limited to debug KIT_A2G_TC357TA_3V3_TRB board. 

Debugging core 0 seems fine, but core 1 and core 2 cannot relate to source code in debug mode as shown in the picture:

koala_0-1688379199777.png

0 Likes
1 Solution
koala
Level 4
Level 4
10 likes given 50 replies posted 5 likes given

I figured it out. It's linker optimization. Since both functions are exactly the same, linker removed the duplication. After turning off linker optimization, it works:

koala_0-1688614264257.png

 

View solution in original post

5 Replies
Anupama_A
Moderator
Moderator
Moderator
50 solutions authored 10 likes received 250 sign-ins

Hi @koala , 

 

Could you please refer to this thread ? Please let us know if it helps. 

 

Best regards, 

Anupama

0 Likes
koala
Level 4
Level 4
10 likes given 50 replies posted 5 likes given

It did not help.

At first, I couldn't find debugger manual of ADS on Infineon website (only compiler manual can be found), then knowing ADS is using Tasking debugger, I got the manual from Tasking website that contain the "Multi-core Hardware Debugging" section mentioned in said thread. However, it is only one page and mostly on suspend and resume operation, as shown in following picture. It doesn't mention source code association problem.

koala_0-1688522554378.png

 

0 Likes
koala
Level 4
Level 4
10 likes given 50 replies posted 5 likes given

I set a breakpoint at first line of core0_main, when it triggers, core2 is executing function __Core2_start, and debugger is able to relate to the source code, but not for core1_main(), as shown in following 3 picture:

koala_1-1688523666757.png

koala_2-1688523714482.png

koala_3-1688523767408.png

After running for a while, it seems both core2 and core1 are executing the same function: core1_main(), and only assembly code can be seen, no source code:

koala_4-1688524470630.png

koala_5-1688525617258.png

And I followed startup code, and found that core2_main() is indeed called:

koala_0-1688552764882.png

However, after I step in, no source code, and debugger show core1_main() is executing as in the earlier pictures.

 

0 Likes
koala
Level 4
Level 4
10 likes given 50 replies posted 5 likes given

In Expression window, both core1_main() and core2_main() are pointed to the same address 0x803003f0!!  I did not change any configurations, just imported example codes and compile. And this happens to all the examples codes I imported to ADS-limited. Any idea why this happens?

koala_0-1688612558096.png

 

0 Likes
koala
Level 4
Level 4
10 likes given 50 replies posted 5 likes given

I figured it out. It's linker optimization. Since both functions are exactly the same, linker removed the duplication. After turning off linker optimization, it works:

koala_0-1688614264257.png