This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello!
I'm working with AM273x Evaluation Module connected with AWR2243BOOST board, and running the Visualizer Demo application. Also working with a fork of the demo project.
The problem I struggle with is very unreliable debugging. This doesn't happen when running the app from ROM (flashed with uniflash).
1. Around two out of five debug runs result in the execution of the program landing early (even before landing `main()`) in `HwiP_undefined_handler`, or `HwiP_data_abort_handler`/`HwiP_data_abort_handler_const`. This is random, and happens also in other applications, both single-core apps (e.g. running only from R5F0; I have tried running UDP client and TCP client from the MCU PLUS SDK) and multicore (e.g. R5F0 + C66, as in the Visualizer Demo). This is very cumbersome, because when debugging large programs, I need to re-load the program multiple times, and one program loading takes a lot of time already. Why is debugging so unstable? I would really appreciate some support of making it more reliable.
2. Grouping while debugging multicore apps doesn't work as intended. According to this guide , I'm trying to create a "Permanent Group" to start the cores at the same time. The problem is that hitting "Resume" on the group:
Leads to C66 not being run. The "Debug" view claims it's run:
But it's not, as when I "Pause" it, then it's still at main() entry:
It would be OK for me to run the cores separately, one after another, but in such a case the Visualizer Demo app gets out of sync, resulting in a crash.
I think you may be running into the same problem I have on AM2634.
After program load, one of the cores, in my case only R5_2, can randomly be in thumb mode. This gives an UNDEF exception followed by DABT. AM2634: Cortex_R5_2 Is Sometimes In Thumb Mode After DevBoot. Causes UNDEF Exception. - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums
2. Grouping while debugging multicore apps doesn't work as intended
I can reproduce the issue. It seems specific to the C66x.
I filed a bug for this. Tracking link: https://sir.ext.ti.com/jira/browse/EXT_EP-11832
For #1, this will need to be investigated by the device experts. I will bring this thread to their attention.
Thanks
ki
Hi Kacper,
There are two possible causes of the issue:1:
1. The initialization of the SOC
2. The MPU settings for R5F cores
Questions regarding to 1:
How do you initialize the AM273x SOC? GEL file or the SBL_NULL?
What is the MPU settings for your application?
Best regards,
Ming
I use GEL file. But when and how could I use the SBL_NULL? I can't find any documentation about it.
MPU config:
Hi Kacper,
Please refer to the following URL: AM273x MCU+ SDK: Additional Details
Section SOC Initialization using the Binary Flashed in QSPI memory for using SBL_NULL to initialize the SOC.
Best regards,
Ming
Kacper Kowalski Regarding issue 1, can you disable Auto Run such that the PC starts at 0x0:
Then check the CPSW.T field. If it is == 1, just before the UNDEF exception occurs then you and I have the same issue.
There are two possible causes of the issue:1:
1. The initialization of the SOC
2. The MPU settings for R5F cores
If Kacper's issue 1 is the same as my issue (TBC) described in (+) AM2634: Cortex_R5_2 Is Sometimes In Thumb Mode After DevBoot. Causes UNDEF Exception. - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums
then issue 1 occurs:
Since Kacper's problem does not happen in QSPI mode, the cause must be confined to the behaviour of the GEL scripts.
Hi Kier,
Agree with your analysis. I think it is the SOC initialization issue. That is why I recommended using SBL_NULL to initialize the SOC.
Best regards,
Ming
I haven't been using SBL_NULL for debugging. I would never flash SBL_NULL after running an app from flash. Let me use SBL_NULL with debugging from RAM for a while, and I will come back to report if this resolved my issues with unstable debugging.
Using SBL_NULL didn't resolve all my issues. I haven't got `HwiP_undefined_handler` since I have started using `SBL_NULL`, but breakpoints won't be hit., program load will also randomly fail on start, etc...
Hi Kacper,
Do those issue happen on all cores or only on one core?
Does it reach to the main()?
Where do you set the breakpoints (which cannot be reached)?
When the program loading fails, what error it displays?
Best regards,
Ming