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: DRA829J

Part Number: DRA829J

Tool/software:

As part of the migration from PSDK7 to PSDK9 for mcu and main domain, I started by generating the examples contained in the psdk, compilation is working properly. These are the conditions of my current device and the test I want to run with the new psdk9:

  • Current SW in my device is using psdk 7. MCU1_0 core is using TI RTOS. MAIN2_1, MAIN3_0 and MAIN3_1 are using autosar.
  • For the migration to psdk9, the idea is to use FreeRTOS for all cores: MCU1_0, MAIN2_1, MAIN3_0, MAIN3_1. Here an small question: Is TI-RTOS still supported? if yes, which one is recommened TI-RTOS or FreeRTOS and why?
  • I started with some basic build using the FreeRTOS example for MAIN3_0, I generated the file with extension .xer5f and I tried to load it in my device by updating the symbolic link j7-main-r5f1_0-fw to point to the new image. However, once I reboot the device, I still see the OLD image being executed, I can tell that because the OLD image is sending logs over the UART port. After some 15 seconds, the device reboots and this happens everytime. Once I restore the symbolic link to the old image, the reboots stop.
  • OLD image is generated in Windows environment with .elf extension. New one is generated in Linux and creates a file with .xer5f extension.

What could be wrong with this new image? is the file format incorrect? should Linux also be updated to psdk9 along with the MCU3_0 core?

I would really appreciate your help in this topic.

Regards,

José Daniel

  • Hi,

    Is TI-RTOS still supported? if yes, which one is recommened TI-RTOS or FreeRTOS and why?

    No, TI RTOS is not more supported.

    I started with some basic build using the FreeRTOS example for MAIN3_0,

    May I Know which example you are running on MAIN3_0? is it the same as older application on psdk7 instead of autosar using Freertos?
    You can run ipc_echo test example for MAIN3_0 and use that binary.

    • I still see the OLD image being executed, I can tell that because the OLD image is sending logs over the UART port. After some 15 seconds, the device reboots and this happens everytime. Once I restore the symbolic link to the old image, the reboots stop.
    • OLD image is generated in Windows environment with .elf extension. New one is generated in Linux and creates a file with .xer5f extension.

    Can you please share us the A72 Linux log to see is Firmware is loaded by softlink or not.
    Also, please share the log of below command in A72 terminal.
    # ls -l /lib/firmware

    Also, confirm the file is exist in the path softlinked above.

    Can you also check is there any memory overlap issue is seen?

    May I know which boot flow you are using?

    Best Regards,
    Sudheer

  • I'm using FreeRtos example: freertos_test_task_switch_mcu3_0_release_strip.xer5f generated when I use this target:  make -s freertos_test_task_switch BOARD=j721e_evm CORE=mcu3_0. The original application with PSDK7 is a customized application used to process CAN data. The example I'm trying to run is freeRtos only. 

    I generated the example you mentioned (IPC) using this command: make -s ipc_echo_test_freertos  BOARD=j721e_evm CORE=mcu3_0

    I replaced the symlink to point to the new binary. This time there is no reset but I still see the old image being executed.

    Attached are the images and the Linux logs.

     1805.Linux_Log.txt

    Regarding boot flow, we are using tispl which has mcu0 and u-boot to load other binaries.

    Regards,

    Jose Daniel

  • Hi,


    The soft link command, might need full file path like below.

    # ln-sf  /lib/firmware/ipc_echo_test_freertos_mcu3_0_release_strip.xer5f j7-main-r5f1_0-fw

    Can you please check with above command once. If not working please provide full path for "j7-main-r5f1_0-fw" also as below and check once.
    /lib/firmware/j7-main-r5f1_0-fw

    Best Regards,
    Sudheer

  • I tried but I got the same result. Please note that I'm doing all these changes in primary partition (sda1). 

    Regards,

    José Daniel

  • Hi, 

    You suppose to do it in /media/<user>/rootfs when sd card inserted in pc. 

    Or you can do once after booting of board. 

    Best Regards, 

    Sudheer

  • I dont get it, I'm not using SD card, I'm using UFS.

    Regards,

    José Ambrocio

  • Hi,

    Can you confirm, are you doing soft link after booting Board.

    Is the softlink is still same after power cycle of Board? If not you are not making change in file system.

    Once after A72 Linux bootup you can change soft link but, it will not affect immediately as boot is already completed.

    # ln-sf  /lib/firmware/ipc_echo_test_freertos_mcu3_0_release_strip.xer5f j7-main-r5f1_0-fw

    You have to use this command for softlink from root.
    After above command use #sync

    Also, refer to below Link.
    https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/latest/exports/docs/linux/Foundational_Components_IPC_J721E.html#booting-remote-cores-from-linux-console-user-space

    If you want to force perform fimrware loading, you can using remoteproc commands once after Linux boots up.
    using #remoteproc <ID> start/stop command refer to above link.


    Best Regards,
    Sudheer

  • Softlink persist after reboots. After stopping other cores and manually run the MCU3_0 I was able to see some logs from the core, that's a good sign. The problem now is that the MCU3_0 logs are being sent to the port used by Linux logs. I'm using this initialization in MCU3_0:

    boardCfg = BOARD_INIT_PINMUX_CONFIG  | BOARD_INIT_UART_STDIO;

    status = Board_init(boardCfg);

    UART_printf("MCU3_0 Starting core...");

    The uart initialization above doesn't have a parameter to change the UART port. Where can I see the UART instances and the PIN numbers to properly route the logs?

    In my original device using sdk7, one UART port was being used to send logs from MCU2_1, MCU3_0 and MCU3_1 cores. One dedicated UART port for Linux logs and also one dedicated UART for MCU1_0. I want to have the same for new psdk9.

    Regards,

    José Daniel

  • HI,

    boardCfg = BOARD_INIT_PINMUX_CONFIG  | BOARD_INIT_UART_STDIO;

    status = Board_init(boardCfg);

    Board support will configures the default UART0 Instance as per Domain (Main /MCU) the core is running.

    As your are using MCU3_0 core, it will configures Main UART0 which is using for A72.

    In my original device using sdk7, one UART port was being used to send logs from MCU2_1, MCU3_0 and MCU3_1 cores. One dedicated UART port for Linux logs and also one dedicated UART for MCU1_0. I want to have the same for new psdk9.

    You have to modify global UART configuration in MCU3_0 application in order to use other UART instance.
    Please make similar change in SDK9, what you have followed in SDK7.

    Please refer to MCU2_0 Ethfw uses Main UART2 for debug logs. Similar changes you have to make in MCU3_0.



    Above is called before invoking Board_init(boardCfg);


    Similar to above you have to modify in MCU3_0 application.

    Best Regards,
    Sudheer