Other Parts Discussed in Thread: AM2434
Hi,
I have been unable to find any programming/debugging examples/tutorials for either the TMDS64GPEVM, TMDS243GPEVM or LP-AM243X. Not even blinky!
Will these be coming soon?
Thanks,
Steve
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.
Hello Steve,
Yes, they are coming soon for AM64x. Please see my reply here:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1026885/processor-sdk-am64x-deeper-dive-substantive-training-on-the-pru
Update on that post: I finished the wiki migration this morning. I hope to get all those documents live at https://software-dl.ti.com/processor-sdk-linux/esd/docs/08_00_00_21/linux/Foundational_Components_PRU-ICSS_PRU_ICSSG.html within a day or so.
Publishing documentation for the Getting Started Labs (which are software only, so they can be run on any PRU processor regardless of EVM pinouts) is the next step.
Regards,
Nick
Thank you for this Nick.
However, I am not using Linux (challenging on the AM243x). What I'm looking for is a simple guide to running and debugging code on the PRU directly from CC then extending to event and data transfer with bare-metal R5F code.
A hint on how to set up the switches on the EVMs and Launchpad would be a good start as I can't even get the debugger to connect to the PRU at the moment (the R5Fs are fine).
Thanks,
Steve
Hello Steve,
So far, my focus has been on AM64x enablement. The best resource I would be able to point you to is the AM64x CCS setup and the AM65x code in the Getting Started Labs, as described in my response here:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1002513/processor-sdk-am64x-linux-remoteproc-support-to-boot-start-am64x-pru/3704114#3704114
I am going to pass your thread over to the AM24x owners to see if they have any additional insight into
1) Setting up CCS to debug PRU on AM24x
2) Setting up AM24x EVMs
Regards,
Nick
Hi
1) Setting up CCS to debug PRU on AM24x
If you follow instructions from here, you should be able to connect to ICSSG's cores. Steps suggest to bypass ICSSG cores if not needed, but avoid that for your use case.
2) Setting up AM24x EVMs
In general, follow the steps mentioned in the documentation here : https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_01_00_07/exports/docs/api_guide_am243x/GETTING_STARTED.html.
No special steps are needed for powering on ICSSG.PRUICSS driver provides APIs to use ICSS.
Regards
Dhaval Khandla
Hi Dhaval, I have previously set up the board using the 8.0 SDK. However, if I try to debug PRU code, I get an error: ICSS_G0_PRU_0: GEL: Target must be connected before calling the function. If I try to connect whilst debugging an R5F core (image below) I can get the PRU into a 'connecting: in reset' mode but, if I try to load a file, I get the same error.
Any ideas?
Thanks
Steve
Hi
I tried following the same steps, that is loading the EtherCAT slave application on R5F and connecting to ICSS_G0_PRU0 core. I was able to connect successfully.
I see that you are trying after soft reset of EVM from CCS. I would suggest that you do a power reset and try.
Regards
Dhaval Khandla
Hi Dhaval - no luck, I'm afraid. I even re-flashed the bootloader from the 8.01 SDK (turns out it's the same version).
Any other ideas on how to debug a bare-metal PRU?
Thanks, Steve
Hi Steve,
I am trying to understand PRU unit myself. I am not at a debugging state yet. But on an AM64x device, when you connect to the DMSC-M3 core, the initialization gel script set power domains and change the state of all cores including PRU_ICSSGs. PRU debug probe state changed from (connecting: In Reset) to (Suspended). Probably some boot/startup code should include this step during development cycle...
Hope it helps,
Joe
DMSC_Cortex_M3_0: GEL Output: This GEL is currently only supported for use from the Cortex-M3 inside the DMSC.
....
DMSC_Cortex_M3_0: GEL Output: Powering up PD_PULSAR_1.
DMSC_Cortex_M3_0: GEL Output: Powering up LPSC_PULSAR_1_R5_0
DMSC_Cortex_M3_0: GEL Output: No change needed.
DMSC_Cortex_M3_0: GEL Output: Powering up LPSC_PULSAR_1_R5_1
DMSC_Cortex_M3_0: GEL Output: No change needed.
DMSC_Cortex_M3_0: GEL Output: Powering up LPSC_PULSAR_PBIST_1
DMSC_Cortex_M3_0: GEL Output: Power domain and module state changed successfully.
DMSC_Cortex_M3_0: GEL Output: Powering up PD_PULSAR_1 done.
DMSC_Cortex_M3_0: GEL Output: Powering up PD_ICSSG_0.
DMSC_Cortex_M3_0: GEL Output: Powering up LPSC_ICSSG_0
DMSC_Cortex_M3_0: GEL Output: Power domain and module state changed successfully.
DMSC_Cortex_M3_0: GEL Output: Powering up PD_ICSSG_0 done.
DMSC_Cortex_M3_0: GEL Output: Powering up PD_ICSSG_1.
DMSC_Cortex_M3_0: GEL Output: Powering up LPSC_ICSSG_1
DMSC_Cortex_M3_0: GEL Output: Power domain and module state changed successfully.
DMSC_Cortex_M3_0: GEL Output: Powering up PD_ICSSG_1 done.
DMSC_Cortex_M3_0: GEL Output: Powering up PD_CPSW.
DMSC_Cortex_M3_0: GEL Output: Powering up LPSC_CPSW3G
DMSC_Cortex_M3_0: GEL Output: No change needed.
DMSC_Cortex_M3_0: GEL Output: Powering up PD_CPSW done.
DMSC_Cortex_M3_0: GEL Output: Powering up all MAIN domain peripherals done.
...
Steve
Above mentioned prints will be seen if SOC initialization is done using CCS. Can you check if you are able to connect to PRU-ICSS cores if you use that method?
Link to the relevant section in documentation : https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_01_00_07/exports/docs/api_guide_am243x/EVM_SETUP_PAGE.html#EVM_SOC_INIT_NOBOOT_MODE
Regards
Dhaval Khandla
Still not working - but a clue:?
Someone suggested I run the load_dmsc.js script.
This happened first:
js:> loadJSFile "C:\ti\mcu_plus_sdk_AM243x_08_01_00_07\tools\ccs_load\am64x_AM243x\load_dmsc.js"
Could not start server: DebugServer.1: Cannot read System Setup data from XML file C:\Users\xxxxxxxx\workspace_v10\benchmark_demo_am243x-lp_r5fss0-0_nortos_ti-arm-clang\targetConfigs\AM2434_ALX.ccxml
Error parsing file:
Fatal Error at (0, 0): An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id=C:\Users\xxxxxxxx\workspace_v10\benchmark_demo_am243x-lp_r5fss0-0_nortos_ti-arm-clang\targetConfigs\AM2434_ALX.ccxml (C:\ti\mcu_plus_sdk_AM243x_08_01_00_07\tools\ccs_load\am64x_AM243x\load_dmsc.js#134)
js:>
So I then imported the demo project but got this error:
js:> loadJSFile "C:\ti\mcu_plus_sdk_AM243x_08_01_00_07\tools\ccs_load\am64x_AM243x\load_dmsc.js"
Connecting to DMSC_Cortex_M3_0!
[ERROR] GEL files are not loaded to Cortex-M3 !!! Please choose the right target configuration or load GELs manually from C:\ti\ccs1040\ccs\ccs_base\emulation\gel\AM64x\AM64x.gel and try again...
js:>
However, the debugging console started and I was able to connect to the R5 but still no luck with the PRU:
I suspect it's something trivial but, when you don't know, you really don't know.
Steve
Progress. The debug probe settings in the demo project was set to AM2434_ALX. Setting it to Launchpad means I can now attach to the PRU using the load_dmsc script.
For future readers, we document creating the target config (including selecting the board or device) here:
Regards,
Nick
Specifically, it looks like the default configuration suggests bypassing the ICSSGs (which you do NOT want to do if you are developing on PRU).
Regards,
Nick
Yes, I noticed that in the setup instructions - all configurations I was using do not have the PRU bypassed though.
Steve
I'm stumped. I just want to compile and debug a simple 'hello world' on a PRU on an AM64/AM234 EVM or Launchpad. Is it really this hard?
Steve
Is the status same as earlier?
Did you switch to SOC initialization using CCS script and even with that, when you connect to ICSS cores, it shows "In Reset"?
Can you try one more thing? Can you load and run the EtherCAT example on R5F core, and then try to connect to ICSS cores?
Regards
Dhaval Khandla
I'm now in 'no boot' mode - this has helped and I'm now able to step through some code. I'm not sure which of the 20 steps I took was the key so I'm working backwards to the point where it no longer works.
FYI, the Hello World PRU example fails with an out of memory error but simple loops appear to work. Need to understand how the .text area is mapped.
Steve
Hello Steve,
Glad to hear you're able to start moving forward. Please point me to which Hello World PRU example you are using that is not working. A good starting point would be the solutions folder for AM65x in the Getting Started Labs in the PRU Software Support Package here:
Regards,
Nick
Future readers, I just added an FAQ for how to connect CCS to PRU-ICSSG for AM64x & AM24x devices here: