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.

DRA829J: Setting PSDK 9.02.00 environment

Part Number: DRA829J

Tool/software:

Hello TI team,

I'm currently exploring the setup for psdk 9.02.00. I only want to have the necessary to start the development for mcu1_0, mcu1_1, mcu2_0, mcu2_1, mcu3_0, mcu3_1, c66xdsp_1, c66xdsp_2, c7x_1. Linux development and dependencies are not required for now. My plan is to create a psdk setup that can be used for all the dev team, that implies to create a repository with the needed changes in the psdk so everyone can follow the same steps for the setup. I have some doubts regarding this setup, below are the steps and observations that I have:

  1. I downloaded and extracted psdk ti-processor-sdk-rtos-j721e-evm-09_02_00_05
  2. I executed the script (/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/sdk_builder/scripts) setup_psdk_rtos.sh with the options: --firmware_only --skip_pc_emulation --skip_atf_optee
  3. After the installation I observed that these compilers were installed in home/ti: ti-cgt-armllvm_3.2.1.LTS, ti-cgt-c6000_8.3.7, ti-cgt-c7000_4.1.0.LTS
  4. I executed the compilation for mcu3_0 from path ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build:    make -s all BOARD=j721e_evm CORE=mcu3_0
  5. When executed the last command, I got some error regarding the gcc compiler, so I manually downloaded and installed the gcc package in /home/ti: gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf
  6. I had to update the Rules.make file to use a new path for the tools: TOOLS_INSTALL_PATH ?= $(HOME)/ti
  7. I had to also install mono with sudo apt install mono-devel

With all the steps above, I was able to build mcu3_0 and mcu3_1. However, I faced some compilation issues, sometimes some coredumps and sometimes some clang issues. 

CLANG issue: 

/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7dfcd4629d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7dfcd4629e40]
/home/ep2000/ti/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang[0xa1b0f5]
tiarmclang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
TI Arm Clang Compiler 3.2.1.LTS
Target: arm-ti-none-eabi
Thread model: posix
InstalledDir: /home/ep2000/ti/ti-cgt-armllvm_3.2.1.LTS/bin
tiarmclang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
tiarmclang: note: diagnostic msg: /tmp/tasks-2986d4.c
tiarmclang: note: diagnostic msg: /tmp/tasks-2986d4.sh
tiarmclang: note: diagnostic msg:

********************
make[2]: *** [/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/rules_ti_cgt_arm.mk:199: /home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/ti/kernel/obj/j721e/mcu3_1/release/tasks.oer5f] Error 1
make[1]: *** [/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makefile:325: freertos] Error 2

Core dump: 

# SBL App image /home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/board_ddr_thermal_test_app_freertos/bin/j721e_evm/board_ddr_thermal_test_app_freertos_mcu3_1_release.appimage and /home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/board_ddr_thermal_test_app_freertos/bin/j721e_evm/board_ddr_thermal_test_app_freertos_mcu3_1_release_BE.appimage created.
#
make[1]: *** [/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makefile:110: board_baremetal_ddr_thermal_test_app_has_dep] Segmentation fault (core dumped)
make: *** [makefile:132: all_apps] Error 2

The errors above are random, I can sometimes compile without any problem but sometimes those errors show up. When any of these errors happen, I have to re-run the compilation multiple times in order to fix it. 

Summarizing, I have these questions:

  • Are the steps I followed for psdk setup correct?
  • Is expected to have clang issues and core dumps during the compilation? 

Additional info: I'm using virtual machine (vmware) with ubuntu 22.04

Regards,

José Daniel

  • Hi José,

    Thank you for posting your question on the forum. We have assigned your question to the appropriate engineer. Do note they are currently unavailable and please expect a delay in response. 

    Best,

    Asha

  • Hi José,

    Can you test building the specific examples you require instead of building all? For example, make -s GPIO_LedBlink_TestApp_freertos  BOARD=j721e_evm core=mcu3_0. Then we may be able to see the specific examples that fail to build.
    Thanks,
    Neehar

  • Hello Neehar,

    If I try to run the example you mentioned I get an error as seems to be a dependency with mcu1_0:

    ep2000@ep2000-vm:~/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build$ make -s GPIO_LedBlink_TestApp_freertos BOARD=j721e_evm core=mcu3_0
    make[2]: *** No rule to make target '/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/drv/udma/lib/j721e/mcu1_0/release/udma.aer5f', needed by '/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/GPIO_LedBlink_TestApp_freertos/bin/j721e_evm/GPIO_LedBlink_TestApp_freertos_mcu1_0_release.xer5f'. Stop.
    make[1]: *** [/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/common.mk:348: mcu1_0] Error 2
    make: *** [makefile:325: GPIO_LedBlink_TestApp_freertos] Error 2

    Now, I don't think that my compilation issues are related to missing components/dependencies; seems more like a problem with my virtual machine environment. Whenever I see a clang or coredump issue during the compilation, this disappears if I just re-run the compilation. That's the reason I want to check with you if there are some limitations with the use of the SDK in a virtual machine. My VM has the following settings: 16 GB RAM, 6 processors, 50 GB hard disk.

    Going back to my main question, the steps I described (1 to 7) are correct in order to develop for the R5 cores?

    My plan is to run some examples for 1_0, 2_1, 3_0 and 3_1 using FreeRTOS.

    Regards,

    José Ambrocio

  • Hi José,

    You should not have any limitations building and using the SDK on a virtual machine.

    Can you try running "make -s pdk_libs BOARD=j721e_evm CORE=mcu3_0"?

    ep2000@ep2000-vm:~/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build$ make -s GPIO_LedBlink_TestApp_freertos BOARD=j721e_evm core=mcu3_0

    Additionally, make sure to capitalize CORE as it is case sensitive.

    Thanks,

    Neehar

  • Hello Neehar,

    I executed the command you shared but the first time I got this error:

    /home/ep2000/ti/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x2d0)[0x2122530]
    /home/ep2000/ti/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang(_Z10clang_mainiPPc+0x2f5c)[0xa1e32c]
    /lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7c6f28429d90]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7c6f28429e40]
    /home/ep2000/ti/ti-cgt-armllvm_3.2.1.LTS/bin/tiarmclang[0xa1b0f5]
    tiarmclang: error: clang frontend command failed with exit code 139 (use -v to see invocation)
    TI Arm Clang Compiler 3.2.1.LTS
    Target: arm-ti-none-eabi
    Thread model: posix
    InstalledDir: /home/ep2000/ti/ti-cgt-armllvm_3.2.1.LTS/bin
    tiarmclang: note: diagnostic msg:
    ********************

    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    tiarmclang: note: diagnostic msg: /tmp/ds90ub926-2471ae.c
    tiarmclang: note: diagnostic msg: /tmp/ds90ub926-2471ae.sh
    tiarmclang: note: diagnostic msg:

    ********************
    make[2]: *** [/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/rules_ti_cgt_arm.mk:200: /home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/binary/ti/board/board/obj/j721e_evm/r5f/release/ds90ub926.oer5f] Error 1
    make[1]: *** [/home/ep2000/Documents/PSDK_09_02_00/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/pdk_jacinto_09_02_00_30/packages/ti/build/makefile:325: board] Error 2
    make: *** [makefile:108: board_has_dep] Error 2

    Then, I excuted the compilation a second time and worked.

    Can you please answer this question? 

    Going back to my main question, the steps I described (1 to 7) are correct in order to develop for the R5 cores?

    My plan is to run some examples for 1_0, 2_1, 3_0 and 3_1 using FreeRTOS

    Regards,

    José Ambrocio

  • Hi José,
    Sorry for the delay in response.

    I executed the script (/ti-processor-sdk-rtos-j721e-evm-09_02_00_05/sdk_builder/scripts) setup_psdk_rtos.sh with the options: --firmware_only --skip_pc_emulation --skip_atf_optee

    Is there a reason you use these specific flags/options?

    Thanks,

    Neehar

  • Hi Neehar, 

    I picked those options because I wanted to install only dependencies needed for MCU cores (1_0, 1_1, 2_0, 2_1, 3_0, 3_1). I did read the setup_psdk_rtos.sh and just selected the options already mentioned. That's the reason I asked you about this, I dont need Linux dependencies. So, are these opstions correct or should I pick diffent ones? 

    Regards,

    José Ambrocio

  • Hi,

    Can you test running the setup_psdk_rtos.sh script without those options? Although you do not need the Linux dependencies, they will not affect performance or take much space. Try building once the full script has ran.

    Thanks,

    Neehar

  • My compilation is working even if I do use the options I mentioned. I did a clean installation in a new VM and I was able to see a correct behavior. My only question is that if the way I'm setting the psdk is enough to have a good env for MCU development (mcu and main domain cores).

  • Hi José,

    Yes, your environment you have set up will be enough for MCU development.

    Thanks,

    Neehar