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.

RTOS/PROCESSOR-SDK-AM57X: Booting SYSBIOS app with U-boot

Part Number: PROCESSOR-SDK-AM57X
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

I need to boot and SYSBIOS application instead of linux zImage from uboot. I have compiled and debugged my app from CCS and app.out is generated. So, next step I desire is boot my app from eMMC, using uboot already flashed in eMMC. Is this possible?

Any idea is welcome.

  • You will need to modify U-boot to do this. I will ask the RTOS team to comment too. They will respond here.
  • This is currently not supported in Processor SDK RTOS for AM57xx devices. you can refer to the code in secondary bootloader( SBL) in the Processor SDK RTOS and integrate that in the Uboot to load and run the DSP from uboot. If you are using IPC which means your DSP is not independently running from the ARM/Linux code then you may need to implement a early boot late attach feature that is described here:
    processors.wiki.ti.com/.../Early_Boot_and_Late_Attach

    Regards,
    Rahul
  • Thanks Rahul for your help.

    My app is running on DSP1. All other cores are stopped. The idea is to have a mechanism to load the first application in Fab in a virgin eMMC using SD as first boot device. Once u-boot has been installed onto eMMC, use that u-boot to also flash the final application on eMMC. I think that use u-boot to do this mission is possible, but it appears I cannot generate the correct file to use by u-boot. I have read some about RAM position of 'c_int00' entry point that should be at 0x80000000, but I am not able to put it on that location.

    I have included in my app.cfg the following:

    Program.sectMap[".init {boot*(.text)}"] = new Program.SectionSpec();
    Program.sectMap[".init {boot*(.text)}"].loadAddress = 0x80000000;

    When generating the app, .map file shows:

    ******************************************************************************
    TMS320C6x Linker PC v8.1.3
    ******************************************************************************
    >> Linked Fri Apr 21 07:49:15 2017

    OUTPUT FILE NAME: <app.out>
    ENTRY POINT SYMBOL: "_c_int00" address: 80000120


    MEMORY CONFIGURATION

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    L2SRAM 00800000 00040000 00000000 00040000 RW X
    OCMC_RAM1 40300000 00080000 00032ab0 0004d550 RW X
    OCMC_RAM2 40400000 00100000 00000860 000ff7a0 RW X
    OCMC_RAM3 40500000 00100000 00000000 00100000 RW X
    EXT_RAM 80000000 80000000 0019c5de 7fe63a22 RWIX

    As you can see, c_int00 appears at 0x80000120. 

    Once I have app.out, I generate a .ub file following the instructions:

    // Using objcopy in the ARM bare-metal tools generate a binary
     // out file from the elf executable
     $ ~/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-objcopy -I elf32-little -O binary <mySysBiosApp executable/out file> sysbios.bin
     // Create a SYS/BIOS uimage. The kernel_start_addr is the starting
     // address of the application. This can be obtained from the
     // application's map file.
     // Example: If our test was placing the entire app in EXT RAM at
     // address 0x80000000, the kernel_start_addr would be 0x80000000.
     //
     // The kernel_entry_point_addr is the address of the first
     // function that runs when the SYS/BIOS kernel gets control.
     // The name of this function is _c_int00 and it's address
     // can be obtained from the map file.
     $ $uboot/tools/mkimage -A arm -T kernel -C none -a <kernel_start_addr> -e <kernel_entry_point_addr> -d sysbios.bin sysbios.ub
     // Create uEnv.txt file to set u-boot environment. We will set
     // uenvcmd environment variable to load the kernel from MMC into
     // memory and then boot the kernel from memory.
     //
     // Example uEnv.txt contents:
     // uenvcmd=echo "Booting SYS/BIOS kernel from SD card...";setenv loadaddr 0x81000000;fatload mmc 0 ${loadaddr} sysbios.ub;bootm ${loadaddr}
     //
     // The above uenvcmd command will work for a sys/bios app that is linked
     // to address 0x80000000.

    This information is at processors.wiki.ti.com/.../BIOS_with_GCC_(CortexA)

    I have change the uEnv.txt to: 

     uenvcmd=echo "Booting SYS/BIOS kernel from eMMC...";setenv loadaddr 0x81000000;fatload mmc 1:1 ${loadaddr} sysbios.ub;bootm ${loadaddr}

    Also, I have tried to change 'loadaddr' to 0x8000000 and tried 'bootm'. No success at all.

    I have certain success if I generate a 'MLO' and 'app' directly using 'tiimage' and 'AM57ximageGen.sh' tools available at directory 'C:\ti\pdk_am57xx_1_0_5\packages\ti\boot\sbl\tools' . With these tools, I can put MLO and app in
    the SD and app runs OK. But when I put these 'MLO' and 'app' on eMMC, it doesn't work. Maybe that tiimageGen doesn't work fine with eMMC? If this last point is solved, this could be fine for me.

    Final idea is generate a SYSBIOS application with a FTP server in order to have a ethernet remote mechanism to update applications on target HW.

    Regards.