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.
Hi Team,
i am trying to run example hello world program which is working on CCS based compilation for SK-AM62 EVM board(ALW package)
Now i am using AM62 variant on custom board having AMC package.
I am using SYCONFIG tool to configure the peripherals By duplicating the config available for AM62(ALW package) and created example.sysconfig for AMC package .
The generated example sysconfig i replaced with old one and using linux system and build as below
ti/mcu_plus_sdk_am62x_08_06_00_18/examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang$ make -s -C examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang/ clean all
I am getting below warnings while building.
I am able to see 2 serial ports on my custom board COM15, COM16
But when i replace the firmware and boot the Board i see linux booting on COM16 and also M4F core up.
[ 3.908003] k3-m4-rproc 5000000.m4fss: assigned reserved memory node m4f-dma-memory@9cb00000
[ 3.929959] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
[ 3.949219] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
[ OK ] Started TEE Supplicant.
Starting telnetd.service...
[ OK ] Started IPv6 Packet Filtering Framework.
[ OK ] Started IPv4 Packet Filtering Framework.
[ OK ] Reached target Network (Pre).
[ 4.008625] remoteproc remoteproc0: 5000000.m4fss is available
Starting Network Service...
[ OK ] Started telnetd.service.
Starting LSB: Expand Rootfs of boot device...
[ 4.062307] remoteproc remoteproc0: powering up 5000000.m4fss
[ 4.070898] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 63104
[ 4.089497] remoteproc0#vdev0buffer: assigned reserved memory node m4f-dma-memory@9cb00000
[ 4.107090] remoteproc0#vdev0buffer: registered virtio0 (type 7)
[ 4.113482] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
[ OK ] Started Network Service.
But on other UART port (COm15) i am failing to see MCU application logs.
CAN you quickly help me to resolve the issue.
Thanks & Regards,
Pawamana Tanjore.
Hello Pawamana,
The default example.syscfg (ALW package) of the hello_world example already suggests a solution for pinmuxing of MCU_UART as shown below.
Now, when you use the same example.syscfg for AMC package, the Syscfg generates a different pinmuxing solution (according to AMC package) than what is being suggested. This creates a conflict between what Syscfg is suggesting than what we are suggesting. Ofcourse, what we are suggesting is wrong here because our suggestion is based on ALW package. So, we would want to keep what Syscfg is suggesting here.
Solution
To solve the issue, simply delete the suggested solution for pinmuxing of MCU_UART in example.syscfg as shown below
This will make sure that we want to keep the pinmuxing solution suggested by Syscfg. So, on building this example after the changes, no warnings or errors should come and the program should also run fine.
Regards,
Prashant
Hi Prashant,
Based on your comments above Please correct my understanding if it's wrong.
IS my understanding correct...?
Thanks & Regards,
Pawamana Tanjore.
Hi Pawamana,
Yes, your understanding is correct except we don't need the first step. That is using syscfg GUI tool is not needed as the peripheral configurations are already done. When the example is built, the syscfg CLI tool automatically generates pinmuxing.
Below are the changes I do on top of the default hello_world example to build the example for AMC package.
diff --git a/examples/hello_world/am62x-sk/m4fss0-0_freertos/example.syscfg b/examples/hello_world/am62x-sk/m4fss0-0_freertos/example.syscfg index 58a43a9..695f57f 100644 --- a/examples/hello_world/am62x-sk/m4fss0-0_freertos/example.syscfg +++ b/examples/hello_world/am62x-sk/m4fss0-0_freertos/example.syscfg @@ -51,7 +51,4 @@ mpu_armv72.size = 18; * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to * re-solve from scratch. - */ -debug_log.uartLog.MCU_UART.$suggestSolution = "MCU_USART0"; -debug_log.uartLog.MCU_UART.RXD.$suggestSolution = "ball.B5"; -debug_log.uartLog.MCU_UART.TXD.$suggestSolution = "ball.A5"; + */ \ No newline at end of file diff --git a/examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile b/examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile index 6785ae3..8f783d3 100644 --- a/examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile +++ b/examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile @@ -233,10 +233,10 @@ $(SYSCFG_GEN_FILES): syscfg syscfg: ../example.syscfg @echo Generating SysConfig files ... - $(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context m4fss0-0 --part Default --package ALW --output generated/ ../example.syscfg + $(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context m4fss0-0 --part Default --package AMC --output generated/ ../example.syscfg syscfg-gui: - $(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM62x --context m4fss0-0 --part Default --package ALW --output generated/ ../example.syscfg + $(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM62x --context m4fss0-0 --part Default --package AMC --output generated/ ../example.syscfg # # Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
Regards,
Prashant
Hi Prashant,
i tried making these changes, but couldnt see any results of "hello world" prints on COMport 15
i will explain my setup. once linux boots up i can see below firmwares under /lib/firmware
root@am62xx-evm:/lib/firmware# ls
am62-main-r5f0_0-fw pdk-ipc
am62-mcu-m4f0_0-fw ti-sysfw
The highlighted mcu-firmware in red, is original MCU firmware(default) available in linux side after boot up
i am replacing above firmware with same file generated after following your suggestion in above thread
after build we get firmware generated in below path which is highlighted in blue below
/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang$ ls
am62-mcu-m4f0_0-fw hello_world.release.appimage hello_world.release.map
hello_world.release.rprc_xip makefile_ccs_bootimage_gen syscfg_c.rov.xs
example.projectspec hello_world.release.appimage.hs_fs
hello_world.release.out linker.cmd makefile_projectspec
generated hello_world.release.appimage_xip hello_world.release.rprc makefile obj
After replacing the firmware i reboot the system and i am not able to see any "hello world "prints on COM 15 which is for MCU UART port.
Please suggest if there are some points i am missing.
Thanks & Regards.
Pawamana tanjore
Hi Pawamana,
The setup looks fine.
Regards,
Prashant
Hi Prashant,
Please find the reply point wise.
Can you please confirm if the build was successful without any errors or warning after making the suggested changes?
Build is successful without any warning or errors.
Also, can you try connecting to M4F core after linux boots and load the .out file of the hello_world example from CCS onto the M4F core. Does it load successfully?
CAn you let us know once on how to Connect to M4F after linux boot
By this you mean opening COM 15 port after linux boots up completely...?
we are using linux envirnment and loading the files in /lib/firmware.
CAn you kindly share details of how to connect CCS , i mean which port because we have only 2 ports and we dont have debuuger (ex: XDS110)
or anything to access CCS on custom Board
so how can we connect the same.
Please share details , unlike EVM we dont have any inbuilt XDS debugger on custom board..?
is our understnading correct.
Thanks & Regards,
Pawamana Tanjore.
Hi Pawamana,
we dont have debuuger
In that case, CCS can't connect to the custom board.
I would like to know if you are building for am62x-sk or am62x-sk-lp?
Regards,
Prashant
Hi Prashant,
The above highlighted firmware is placed in /lib/firmware once linux boots up and reboot the system
i see below logs for M4F core from linux UART logs
Prashant is this expected behaviour ....? Size reduction expected ..!
We are not observing the below log in Linux UART after replacing with Hello-world based built mcu firmware ==> am62-mcu-m4f0_0-fw ....?
Please reply.
Thanks & Regards,
Pawamana Tanjore.
Hi Pawamana,
To allow the Linux to load the M4F firmware, we also need to add the Resource Table in the Hello World example. Please have a look at the below FAQ
Regards,
Prashant
Hi Prashant,
Thanks By using method 1 in above example we are able to see hello world in MCU UART...!
But i have few more queries,
suppose i am using makefile to compile mcan_loopback_interrupt code after running i see NO firmware binary am62-mcu-m4f0_0-fw unlike hello-world example as below
MCAN_LOOPBACK example:
:~/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang$ ls
example.projectspec makefile_ccs_bootimage_gen mcan_loopback_interrupt.release.appimage_xip mcan_loopback_interrupt.release.rprc_xip
generated makefile_projectspec mcan_loopback_interrupt.release.map obj
linker.cmd mcan_loopback_interrupt.release.appimage mcan_loopback_interrupt.release.out syscfg_c.rov.xs
makefile mcan_loopback_interrupt.release.appimage.hs_fs mcan_loopback_interrupt.release.rprc
HELLO world example:
:~/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/hello_world/am62x-sk/m4fss0-0_freertos/ti-arm-clang$ ls
am62-mcu-m4f0_0-fw hello_world.debug.appimage hello_world.debug.map hello_world.debug.rprc_xip makefile_ccs_bootimage_gen syscfg_c.rov.xs
example.projectspec hello_world.debug.appimage.hs_fs hello_world.debug.out linker.cmd makefile_projectspec
generated hello_world.debug.appimage_xip hello_world.debug.rprc makefile
How to verify this on custom hardware with out ccs support..?
can we add some changes in make file to generate the am62-mcu-m4f0_0-fw binary...?
Thanks & Regards,
Pawamana Tanjore.
Hi Prashant, with above mentioned changes can we expect to see similar prints as that of EVM exmapes caase for CAN, I2c
can you reply..? please
Hi Pawamana,
You can do the below changes to generate M4F firmware
Attaching the git diff also
diff --git a/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile b/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile index 0feb2ca..9c58cd4 100644 --- a/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile +++ b/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/makefile @@ -170,6 +170,8 @@ $(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME) @echo . @echo Linking: am62x:m4fss0-0:freertos:ti-arm-clang $@ ... $(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES) + $(RM) am62-mcu-m4f0_0-fw + $(STRIP) -p $@ -o=am62-mcu-m4f0_0-fw @echo Linking: am62x:m4fss0-0:freertos:ti-arm-clang $@ Done !!! @echo .
Regards,
Prashant
Hi Prashant,
we tried with above changes for sample application of mcan_loopback_interrupt example for AMC package.
The size of image getting generated is significantly smaller than normal size and it not able to bringup m4fss-0 core.
we are using makefile linux method.
[ 4.134809] k3-m4-rproc 5000000.m4fss: configured M4 for remoteproc mode
[ 4.164444] k3-m4-rproc 5000000.m4fss: local reset is deasserted for device
[ 4.173323] remoteproc remoteproc0: 5000000.m4fss is available
[ 4.183379] remoteproc remoteproc0: powering up 5000000.m4fss
[ 4.190870] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 4539.
root@am62xx-evm:~# cat /sys/class/remoteproc/remoteproc0/state
inactive.
we aren't seeing below logs and so current state also shows inactive with our build
These are my build logs:
\/ti/mcu_plus_sdk_am62x_08_06_00_18$ make -s -C examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/ all
Generating SysConfig files ...
Running script...
Validating...
Generating Code (example.syscfg)...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_dpl_config.c...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_dpl_config.h...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_config.c...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_config.h...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_open_close.c...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_drivers_open_close.h...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_pinmux_config.c...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_power_clock_config.c...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_config.c...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_config.h...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_open_close.c...
Writing /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/generated/ti_board_open_close.h...
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: ../../../mcan_loopback_interrupt.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: ../main.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: generated/ti_drivers_config.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: generated/ti_drivers_open_close.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: generated/ti_board_config.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: generated/ti_board_open_close.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: generated/ti_dpl_config.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: generated/ti_pinmux_config.c
Compiling: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out: generated/ti_power_clock_config.c
.
Linking: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out ...
Linking: am62x:m4fss0-0:freertos:ti-arm-clang mcan_loopback_interrupt.release.out Done !!!
.
Boot image: am62x:m4fss0-0:freertos:ti-arm-clang /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/mcan_loopback_interrupt.release.appimage ...
Generating certificate for mcan_loopback_interrupt.release.appimage ...
Boot image: am62x:m4fss0-0:freertos:ti-arm-clang /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/mcan_loopback_interrupt.release.appimage Done !!!
.
Boot image: am62x:m4fss0-0:freertos:ti-arm-clang /data/home/ptanjore/ti/mcu_plus_sdk_am62x_08_06_00_18/examples/drivers/mcan/mcan_loopback_interrupt/am62x-sk/m4fss0-0_freertos/ti-arm-clang/mcan_loopback_interrupt.release.appimage.hs_fs Done !!!
Prashant Shivhare please proivde your suggestion to reolve the issue.
Thanks & Regards,
Pawamana Tanjore.
Hi Pawamana,
I am building the mcan_loopback_interrupt example on my side & getting the M4F firmware of size 59008B as shown
Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 4/18/2023 1:39 PM generated d----- 4/18/2023 1:39 PM obj -a---- 4/18/2023 1:39 PM 59008 am62-mcu-m4f0_0-fw -a---- 4/18/2023 1:33 PM 4200 example.projectspec -a---- 4/18/2023 1:36 PM 2498 linker.cmd -a---- 4/18/2023 1:39 PM 9747 makefile -a---- 2/24/2023 7:35 PM 4091 makefile_ccs_bootimage_gen -a---- 2/24/2023 7:35 PM 821 makefile_projectspec -a---- 4/18/2023 1:39 PM 53788 mcan_loopback_interrupt.release.appimage -a---- 4/18/2023 1:39 PM 55411 mcan_loopback_interrupt.release.appimage.hs_fs -a---- 4/18/2023 1:39 PM 52 mcan_loopback_interrupt.release.appimage_xip -a---- 4/18/2023 1:39 PM 101843 mcan_loopback_interrupt.release.map -a---- 4/18/2023 1:39 PM 607684 mcan_loopback_interrupt.release.out -a---- 4/18/2023 1:39 PM 53756 mcan_loopback_interrupt.release.rprc -a---- 4/18/2023 1:39 PM 20 mcan_loopback_interrupt.release.rprc_xip -a---- 2/24/2023 7:35 PM 198 syscfg_c.rov.xs
I have attached the example below. You can checkout the M4F firmware and try booting the same. The example has modifications for AMC package & Linux IPC.
Let me know if the M4F firmware from the above ZIP is booting fine or not.
Regards,
Prashant
Hi Pawamana,
Please let me know the status of this thread. Did you get the example working? If yes & in case of no further questions, I will then close the thread.
Regards,
Prashant
Hi Prashant,
Sorry for the delay in responding. we couldnt test your example
But we able to bringup M4F using makefile method in linux and we have certain quereies on connection/naming of GPIo pins used in code and the one updated in sysconfig .
i will share the details in some time and we want your suggestions on the same.
Thanks for your understanding and help.
BR's
Pawamana
Hi Pawamana,
Sorry for the delay in responding. we couldnt test your example
No problem. Let me know the status at your convenience.
Also, please create new thread for a different topic in order to keep the different contexts in different threads.
Regards,
Prashant
Hi Pawamana,
Have you been able to do your testing? If everything is working fine, I will then close the thread.
Thanks!
Hi Pawamana,
I am closing this thread assuming you have successfully run the required example.
Regards,
Prashant