Trouble shooting build errors
I see the error "ERROR: /home/<user>/ti-processor-sdk-rtos-${SOC}-evm-xx_xx_xx_xx/targetfs//usr/include not found !!!" when building vision_apps
vision_apps needs the PSDK Linux target filesystem to be installed as mentioned in Step 2a: Download and install PSDK Linux (Needed for Linux+RTOS mode or for QNX SPL mode) and Step 4: Download and install additional dependencies This tisdk-adas-image-${SOC}-evm-evm.tar.xz when untarr'ed at ${PSDKR_PATH}/targetfs will contain the Linux file system needed to build in Linux+RTOS mode.
If you havent installed the target filesystem you will see a error like below,
ERROR: /home/<user>/ti-processor-sdk-rtos-${SOC}-evm-xx_xx_xx_xx/targetfs//usr/include not found !!!
makerules/makefile_check_paths.mak:7: recipe for target 'sdk_check_paths' failed
make: *** [sdk_check_paths] Error 1
How do I install GCC tools for ARM MPU ?
Running the script mentioned in Step 4: Download and install additional dependencies downloads and installs the requried GCC tools.
This needs proxy to be setup as mentioned in Step 3: Proxy Setup
After installation you should see GCC compilers at below path
$(HOME)/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu
- Note
- If this step is unsucessful then you will see compile errors when compiling MPU files.
You can also manually download and install these packages by refering to the download links in setup_psdk_rtos.sh.
If you installed these packages at a different path then modify below variables in sdk_builder/tools_path.mak to point to your install folder
GCC_LINUX_ARM_ROOT ?= $(PSDK_TOOLS_PATH)/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu
What does setup_psdk_rtos.sh do and can I skip executing this ?
It is HIGHLY recommended to NOT skip executing setup_psdk_rtos.sh as mentioned in Step 4: Download and install additional dependencies.
However some steps within this are optional, depending on your use-case and can be skipped as mentioned below.
The script setup_psdk_rtos.sh does the below,
Trouble shooting run time errors
I dont see any print on UART terminal ?
- Make sure the processor board is connected tightly on the EVM. A loose connection between processor board and base board will result in SoC boot failing.
- Make sure the correct UART port is used
- Make sure UART settings on PC are correct
- Make sure the boot pin selection is correct
- Make sure the SD card has the boot files
Refer Run vision apps on EVM in Linux+RTOS mode (via SD card boot) for EVM setup. Refer Step 1: Prepare SD card for boot (one time only) for SD card setup.
What is the purpose of different files in bootfs partition ?
File | Purpose --— |
tiboot3.bin | R5F SPL, first stage bootloader, ROM boots this file on MCU R5F (mcu1_0) |
sysfw.itb | DMSC firmware, R5F SPL boots DMSC FW when it starts |
tispl.bin | MPU SPL which will the load uboot |
u-boot.img | MPU uboot |
uenv.txt | additional configuration given to uboot. Largely this specifies the dtbo's to apply when booting the Linux kernel |
uenv.txt.psdkra | dtbo's that PSDK RTOS applies when it boots linux |
- When steps in Step 1: Prepare SD card for boot (one time only) are followed the boot files are copied from ${PSDKR_PATH}/bootfs to SD card bootfs partition.
- When make linux_fs_install_sd is called,
- Default uenv.txt is replaced by vision_apps/apps/basic_demos/app_linux_fs_files/uenv.txt
What are the filesystem changes done by vision apps on top of default PSDK Linux filesystem
- See makefile target linux_fs_install_sd in sdk_builder/makerules/makefile_linux_arm.mak for exact filesystem changes that are done
- In summary
- /lib/firmware/${SOC}-evm-*-fw are changed to point to vision_apps firmwares or executables for C6x, C7x and R5F
- uenv.txt and sysfw.itb are replaced in bootfs partition to use files specific to vision_apps
- uenv.txt applies the dtbo k3-${SOC}-vision-apps.dtbo
- These dtbo adjust the memory map based on vision_apps requirements
- k3-${SOC}-vision-apps.dtbo
- disables display on MPU so that R5F can control display
- disables i2c1 on MPU which is used for HDMI display control by R5F
- disables i2c6 on MPU which is used for CSI2RX sensor control by R5F
- enables DMA Buf contigous memory allocator and reserves a heap for DMA Buf
- reserves memory for shared memory between different CPUs
- Updates etc/security/limits.conf to increase limit of max open files in a process. This is need when using DMA Buf since in DMA Buf every memory alloc is a file handle. And the default file open limit is too small and max number of open DMA Buf alloc's is limited in this case.
- When executed with HS=1 (Necessary when working with HS devices),
- signed versions of the vision_apps firmwares or executables are also installed
- /lib/firmware/${SOC}-evm-*-fw-sec are installed to point to the above
What is DMA heap and why I dont see CMEM or ION anymore ?
- DMA heap is the contiguous memory allocator used in Linux starting PSDK RTOS v7.0.0.
- It replaces ION as the contiguous memory allocator.
- See vision_apps/apps/basic_demos/app_mem for simple application which uses the DMA heap memory allocator.
How do I know the remote cores like C6x, C7x, R5F booted correctly ?
Here we assume you are able to reach the Linux login prompt on the EVM and want to know state of remote cores like C6x, C7x, R5F
How can I confirm the memory carve outs for various CPUs and remote cores are applied correctly by Linux ?
You should see something like below early in the boot. Compare this with your dts/dtsi/dtso file.
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a0000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node vision_apps-r5f-memory@a0100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a1000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a1100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a2000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 31 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a2100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a4000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4100000, size 31 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a4100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a6000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a6000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a6100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a6100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a7000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-dma-memory@a7000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a7100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-r5f-memory@a7100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a8000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-c66-dma-memory@a8000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a8100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-c66-memory@a8100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a9000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-c66-dma-memory@a9000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a9100000, size 15 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-c66-memory@a9100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000aa000000, size 1 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-c71-dma-memory@aa000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000aa100000, size 79 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-c71-memory@aa100000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000b2000000, size 96 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-dma-memory@b2000000, compatible id shared-dma-pool
[ 0.000000] OF: reserved mem: initialized node vision_apps_shared-memories, compatible id dma-heap-carveout
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000d8000000, size 576 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-core-heap-memory-lo@d8000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000880000000, size 1024 MiB
[ 0.000000] OF: reserved mem: initialized node vision-apps-core-heap-memory-hi@880000000, compatible id shared-dma-pool
Why do I see the below error logs ?
If you are using an infotainment daughter card, you may see logs as below.
[ 23.912367] ${SOC}-evm-audio sound@0: ASoC: failed to init link CPB pcm3168a DAC: -517
[ 23.925730] ${SOC}-evm-audio sound@0: devm_snd_soc_register_card() failed: -517
In order to avoid these logs, you can add the k3-${SOC}-common-proc-board-infotainment.dtbo to the "name_overlays" in the uenv.txt file on the BOOT partition as shown below.
name_overlays=k3-${SOC}-common-proc-board-infotainment.dtbo k3-${SOC}-vision-apps.dtbo
Where can I find sample logs for different applications ?
When something does not work as expected, sometimes it helps to see sample working logs and compare against the failing system. Sample logs from a run of vision apps is located here [FOLDER].
- Note
- All logs of all demos may not be present here.