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-AM335X: TFTP bootloader

Part Number: PROCESSOR-SDK-AM335X

Tool/software: TI-RTOS

Hi,

We develop in TI-RTOS and use the MLO/App boot procedure on icev2 board for testing.

We are developing a product with a custom board similar to the icev2 and we need an ethernet bootloader to update the firmware (the app) through tftp.

The current implementation of the starterware bootloader does not have ethernet. It would be possible to add a tftp functionality? What steps do you recommend?

As the u-boot bootloader has the tftp functionality, it would be possible to use an u-boot (with its 2-stage MLO + u-boot.img) to load a TI-RTOS app binary and run it?

In that case, I have found that the u-boot needs the ports to be in cpsw mode, which is RMII. Our RTOS app works with the PRU in MII mode. Can the u-boot support that configuration? Which steps would be required?

Jordi

  • The RTOS team have been notified. They will respond here.
  • We currently don`t have any plans to add TFTP support to starterware bootloader so uboot is the best reference code that can be used for this implementation. What we do plan to support is a unflash like host flashing tool that is described here:
    processors.wiki.ti.com/.../Sitara_Uniflash_Quick_Start_Guide

    Is there a preference to use CPSW for updating the boot image ? You don`t have to do the image update from the secondary bootloader, if you have network stack running at application level then you could read the image in the application and flash the boot media and then force a reboot of the chip to run the new image.

    Regards,
    Rahul
  • Hi Rahul,

    Thanks for your info.

    We have been testing with the u-boot and we can use tftp and other tools it has. But we are not able to run any RTOS app: when starting an app the processor gets freezed.

    I give you the details:

    • The u-boot is from the linux sdk rt 04.03.00.05. installed in a linux host pc and following the guide.
    • We are testing it in an icev2 board and a bbb.
    • We are testing several apps: ethercat slave, led blink...

    u-boot output:

    U-Boot SPL 2017.01 (Jul 05 2018 - 11:28:54)
    
    Trying to boot from MMC1
    
    reading uboot.env
    
    ** Unable to read "uboot.env" from mmc0:1 **
    
    Using default environment
    
    reading u-boot.img
    
    reading u-boot.img
    
    reading u-boot.img
    
    reading u-boot.img
    
    U-Boot 2017.01 (Jul 05 2018 - 11:28:54 +0200)
    
    CPU  : AM335X-GP rev 2.1
    
    Model: TI AM3359 ICE-V2
    
    DRAM:  256 MiB
    
    ETH0, PRU
    
    ETH1, PRU
    
    NAND:  0 MiB
    
    MMC:   OMAP SD/MMC: 0
    
    reading uboot.env
    
    ** Unable to read "uboot.env" from mmc0:1 **
    
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    
    Net:   cpsw, usb_ether
    
    Hit any key to stop autoboot:  0
    
    =>

    If using the .bin file, we load the file (in this case from the sd card) to the desired address and then we run it:

    setenv loadaddr 0x80000000;

    fatload mmc 0 ${loadaddr} some_example_app.bin;

    go ${loadaddr};

    ## Starting application at 0x80000000 ...

    And nothing happens. After 30s aprox the board reboots due to the watchdog.

    We have also tried to convert the .bin file to a u-boot image through the mkimage tool, and then run the app with the bootm command, but happens exactly the same.

    We are blocked at this point, could you give us some advice?

    Jordi

  • Jordi,

    U-boot is the bootloader for linux kernel and uses memory maps, kernel start mechanisms that are not consistent with the RTOS development environment. My recommendation earlier was to refer to the tFTP code in uboot and move it to the secondary bootloader used in the RTOS environment or to create the TFTP loading from your application instead of relying on the bootloader. Both the efforts require new development effort and is not as straight forward as using existing uboot to load and run RTOS applications.

    To load the RTOS application, we recommend that you use the framework setup in the light weight bootloader that we provide in the Processor SDK RTOS (which has a set memory map, MMU and cache settings and contains startup code required before loading RTOS app ). Mixing the RTOS and Linux boot environments is not a straight forward task and we currently can`t support this mixed boot environment.

    Regards,
    Rahul