Other Parts Discussed in Thread: SYSCONFIG
Moin from Hamburg,
I am trying to get the "hello_world" example from the MCU+ SDK (MCU+ SDK for AM62A – RTOS, No-RTOS - Version: 09.00.00.19) to work on the C75x DSP but am having not much success.
From what I can tell after spending a day in the debugger, it seems that the DSP either crashes or receives an interrupt it can't handle during the transition from secure mode to non-secure mode.
What I have tried:
1. Flashing the binary from CCS, following the instructions in "CCS Launch, Load and Run" from the Documentation (Wait for Linux to boot, connect to DSP, reset, load program)
--> This does NOT work. The core shows "running" in the debugger forever, and when I click "pause", the program counter is spinning on address 0x99A00000 (C7X_VECTOR_BASE from the linker file)
2. Replacing the firmware that is booted by Linux with the example
--> This does NOT work. The DSP seems to crash
3. Changing the entry point from _c_int00_secure to _c_int00
--> This allows me to load the program in CCS (after booting the DSP with /lib/firmware/vision_apps_eaik/vx_app_rtos_linux_c7x_1.out, resetting it and flashing the example).
--> However, the behavior when attempting to load this as firmware is the same as (2). The DSP crashes.
4. Loading the example (compiled with debug symbols) and disabling the Auto-Run in CCS.
--> This allows me to load the binary and dumps me at the entry point (_c_int00_secure on line 51 of $(MCU_PLUS_SDK_PATH)/source/kernel/nortos/dpl/c75/boot_c75.c). After many attempts and a lot of single-stepping, I narrowed my problem down to the call to MmuP_enable() in line 475 of $(MCU_PLUS_SDK_PATH)/source/kernel/nortos/dpl/c75/MmuP_c75.c I can set a breakpoint there and successfully reach it. However, when I then hit "resume", the behavior described in (1) occurs (PC spinning at 0x99A00000).
However, now it gets interesting. When I single step into and through the function, I can successfully complete it. In fact, I can do this repeatedly (the function is called in a loop) and by doing this, I can complete the entire MMU initialization and afterwards the program successfully switches to the main() function and executes the example without issue.
Do you have any ideas why I am only able to complete the MMU initialization by single-stepping through it?
Any help would be appreciated.
Thanks,
Moritz