Part Number: TMDS64EVM
Other Parts Discussed in Thread: AM6442, , UNIFLASH
Hello
I am using the TMDS64EVM(PROC101D) based on the AM6442.
MCU_SDK version: 11.01.00.17
PROCESSOR_SDK version: 10.01.10.04
/opt/ti/mcu_plus_sdk_am64x_11_01_00_17/examples/drivers/gpio/gpio_input_interrupt/am64x-evm/r5fss0-0_nortos/ti-arm-clang
I am attempting to run the MCU GPIO interrupt example following the path above.
I referred to the forum inquiry below.
The current status is as follows:
It uses MCU_GPIO0, and the example runs on the MAIN_0_R5_1 core.
The executable file built via CCS was run, and the hardware interrupt service routine functions correctly for the input pulse signal.
sbl_ospi is used. Below is the default_sbl_ospi.cfg code related to sbl_ospi.
--flash-writer=sbl_prebuilt/am64x-evm/sbl_uart_uniflash.release.hs_fs.tiimage
--operation=flash-phy-tuning-data
--file=/opt/ti/mcu_plus_sdk_am64x_11_01_00_17/examples/drivers/boot/sbl_ospi/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_ospi.release.hs_fs.tiimage --operation=flash --flash-offset=0x0
My primary target is as follows.
Based on this, I intend to run the example on a Linux system installed on an SD card.
Therefore, I used sbl_sd instead of sbl_ospi.
I modified sbl_sd's main.c to resemble sbl_ospi's main.c and edited default_sbl_ospi.cfg.
The modifications are as follows.
--file=/opt/ti/mcu_plus_sdk_am64x_11_01_00_17/examples/drivers/boot/sbl_ospi/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_ospi.release.hs_fs.tiimage --operation=flash --flash-offset=0x0
The above code was modified as follows.
--file=/opt/ti/mcu_plus_sdk_am64x_11_01_00_17/examples/drivers/boot/sbl_sd/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_sd.release.hs_fs.tiimage --operation=flash --flash-offset=0x0
Afterwards, I completed the flash using uart_uniflash. The relevant code is listed below.
python3 uart_uniflash.py -p /dev/ttyUSB0 --cfg=/opt/ti/mcu_plus_sdk_am64x_11_01_00_17/tools/boot/sbl_prebuilt/am64x-evm/default_sbl_ospi.cfg
The EVM boots normally.
Subsequently, I moved the GPIO-related executable file to /lib/firmware on the SD card.
Its name is gpio_input_interrupt_am64x-evm_r5fss0-0_nortos_ti-arm-clang.out.
I referenced the resource table and device tree from the URL below.
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1432302/am6442-remoteproc-failed-bad-phdr-da
Since it must run on the MAIN_0_R5_1 core, I changed r5f0_0_sram in the above URL to r5f0_1_sram. (Only the name was changed.)
Afterwards, I used putty to perform the following steps:
==> /sys/class/remoteproc/remoteproc1/name <==
78000000.r5f
echo stop > /sys/class/remoteproc/remoteproc1/state
[ 111.075905] platform 78000000.r5f: k3_r5_rproc_stop: timeout waiting for rproc completion event
[ 111.076063] remoteproc remoteproc1: stopped remote processor 78000000.r5f
echo gpio_input_interrupt_am64x-evm_r5fss0-0_nortos_ti-arm-clang.out > /sys/class/remoteproc/remoteproc1/firmware
echo start > /sys/class/remoteproc/remoteproc1/state
[ 154.577348] remoteproc remoteproc1: powering up 78000000.r5f
[ 154.586241] remoteproc remoteproc1: Booting fw image gpio_input_interrupt_am64x-evm_r5fss0-0_nortos_ti-arm-clang.out, size 403936
[ 154.587397] remoteproc remoteproc1: bad phdr da 0x70080000 mem 0xe680
[ 154.587416] remoteproc remoteproc1: Failed to load program segments: -22
-sh: echo: write error: Invalid argument
[ 154.588192] remoteproc remoteproc1: Boot failed: -22
Reviewing the logs confirms the boot failure.
I suspect a memory allocation error in the resource table, but despite extensive forum searches, manual checks, and code modifications, I still haven't resolved it.
To recap, my current goal is to run a GPIO example that functions correctly via CCS on an SD card-based Linux system.
I desperately need help.
Thank you.