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.

PROCESSOR-SDK-AM437X: UART boot on AM437x IDK

Expert 1700 points
Part Number: PROCESSOR-SDK-AM437X

Hello,

I am running the QSPI_BasicExample_idkAM437x_armExampleProject on a Sitara AM437x IDK. I am using SDK version 6.3.0.106.

We are planning to create a custom board derived from the AM437x IDK and as a first action we would like to implement a UART boot process. I am currently trying to simulate the UART boot on the IDK, which is not natively possible on the IDK due to the SYSBOOT pin selection on the board.

The processor SDK RTOS Software Developer’s Guide indicated a workaround how to put the Sitara on the IDK into UART boot mode (see chapter “4.6.3.1.8.3. Booting Via UART”):

1)      I first write the value 0x19 to the last byte of the memory address 0x44e10040.

2)      Afterwards I press the “Warm Reset” button on the IDK.

Now the Sitara is in UART boot mode since the processor prints out the letter C on the UART.

As a next stage I have to send the SBL (secondary boot loader) to the Sitara via XMODEM protocol. The problem is, that I just find the boot-loaders for the EVM board but not for the IDK:

And I also find no option to build this SBL in the Processor SDK RTOS Software Developer’s Guide:

Nevertheless, I tried to perform the UART download on the IDK with the following EVM SBL:

C:\ti\pdk_am437x_1_0_17\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc\ bootloader_boot_uart_a9host_debug

Afterwards I downloaded a self-compiled example binary:

What I see is:

The application does not seem to run at the end of the download process, but when I flash the application software with JTAG I see:

Is it possible that the SBL is wrong for that IDK? Or why is the application not started?

  • Hi Inno,

    Once you had the SBL and the application binary, what were the exact steps that you took to boot over UART?

    Regards,

    Dillon

  • Hi Dillon,

    I will give you a step by step instruction.

    First of all connect a serial terminal program (I use Tera Term as suggested by TI) with the settings 115200 8-N-1.

    As I wrote above, with the IDK it is not possible to boot over UART except with a nice workaround explained inside the Processor SDK Software Developer's Guide.

    This is what I did:

    Step 1: Connect to the target

     

    Step 2: Open the memory browser


    Step 3: Enter address 0x44E10040 in the memory browser


    Step 4: Modify the last significant byte of that address to be 0x19


    Step 5: Press "Warm Reset" button on the IDK


    Step 6: Now you see the UART boot-loader being active in Tera Term

    Step 7: Send first SBL and afterwards the application image via "Tera Term"

      


    As you know from my other posts, I am currently working on the QSPI NOR Flash example project QSPI_BasicExample_idkAM437x_armExampleProject and therefore I simply downloaded this example, since I have it compiled on my hard disk... 

     

  • Hi Dillon,

    The initial problem that I mentioned in this post is, that I am missing the secondary boot-loader (SBL) binaries for the AM437x Industrial Development Kit (IDK). Specifically the UART boot-loader, but in general I see no folder called "idkAM437x" that holds the SBL.

    I was wondering if there is something else missing to support the IDK. So I decided to search for the MLO file (for supporting a boot process from SD card) inside the whole SDK. But the only MLO file I found was inside a folder of the EVM (also here I am missing a folder "idkAM437x"or "that holds equivalent files):

    Afterwards I read a bit about the process how to prepare the QSPI flash in a way, that booting from QSPI is possible. I understood that you need to use the SD-card and place 3 files on that card called "boot", "app" and "config". Afterwards you need to load and run a certain pre-compiled CCS binary, which programs the QSPI flash via the SD card interface and the 3 files located on that card in a way, that upon a following power-cycle a QSPI boot is being performed. Also here I found only the CCS binaries, which supports the EVM (so again no folder "idkAM437x" or "am43xx-idk"):

      

    It seems that the SDK support for the Industrial Development Kit in terms of tools for booting is totally missing. Can you please look also on your side?

  • Hello Dillon,

    Have you been able to reproduce the UART boot-load problem on the IDK?

    Have you also been able to get some information why there is no specific IDK folder inside the SDK for:
    a) The MLO file location?
    b) The QSPI app flash writer binaries?
    c) The secondary boot-loader binaries (that was my initial post)?

    Thanks,

    Inno

  • Hello Dillon,

    have you or your colleagues been able to reproduce the UART boot-load issue with the instructions I gave you? Did you manage to see the same behavior on your AM437x IDK ?

    Thanks,

    Inno

  • Hi Dillon,

    I am currently unable to proceed with my task. Did you had a chance to reproduce my UART bootloader problem? 

    In the meanwhile I read a bit more about that topic, it seems that the SBL reads the board ID out of an Eeprom and according to this board ID, the SBL should setup the EMIF registers in a way, that the DDR memory is working. So it looks like the SBL inside the folder "am43xx-evm" should support also the IDK. Actually those SBL's should be working for all 3 available AM437x boards (the SK = starter kit, the EVM but also the IDK).

    Can you please let me know the current status, are you following up on this topic? 

    Thanks,

    Inno  

  • Hello Dillon,

    I have some small update.

    I merged the two projects "QSPI_BasicExample_idkAM437x_armExampleProject" and "FATFS_Console_idkAM437x_armExampleProject" together and combined them to a project, which copies a QSPI-SBL and an application image from the SD card to the QSPI flash. The QSPI-SBL is located inside the follwowing folder:

    C:\ti\pdk_am437x_1_0_14\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc\bootloader_boot_qspi_a9host_debug.bin  

    If I copy that QSPI-SBL and my application image at the correct places inside the flash, then booting from QSPI flash is possible. What that means is, that indeed the SBLs inside that folder reads the board ID out of an Eeprom and set-up the DDR memory accordingly. So those SBLs should also work on an IDK board and not just the EVM.

    So now I wonder what could be the issue, following the download process for UART boot-mode but the application does not start.

    Have you been able to reproduce that issue on your IDK?

    Thanks,

    Inno     

  • Hi Inno,

    The approach you mention for placing the AM437x in UART boot mode seems to work. After writing 0x19 to the LSB of 0x44e10040, I observe 'C' repeatedly output on TeraTerm console.

    Downloading the pre-built SBL binary to the IDK using the TeraTerm / XMODEM doesn't work for me. I used the following image:

    <PDK>\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc\bootloader_boot_uart_a9host_release.bin.

    The download finishes, but don't see the SBL output on my UART console. I tried using the debug SBL build, but this doesn't work either.

    I tried downloading the SBL .out file via JTAG. This doesn't work because the CCS loader throws an error indicating memeory 0x402F4000 is unwritable. I changed the SBL linker command file to not use this memory, and rebuilt the bootloader:

                am43xx_boot.lds:
                    /* IRAM :   o = 0x402F4000,  l = 0x2FC00 */    /* 256KB of internal RAM */ /* MMCSD bootloader doesn't load over JTAG */
                    IRAM :   o = 0x40300000,  l = 0x40000      /* 256KB of internal RAM 
    

    With this update I was able to load the SBL to the IDK, and download the GPIO LED blink application (gpio_app_led_blink_a9host_release.bin) to the IDK via TeraTerm / XMODEM. I see both the correct UART output, and the LED blinking on the IDK.

    This experiment confirms the SBL in <PDK>\packages\ti\starterware\binary\bootloader\bin\am43xx-evm\gcc can be used on the IDK. As you pointed out earlier, the SBL reads the board ID out of EEPROM to apply board-specific settings.

    In summary, I can't reproduce the problem you've observed. Instead, I see two separate problems:

    1. Unable to download UART SBL .bin via TeraTerm / XMODEM. SBL seems to crash.
    2. Unable to download UART SBL .out via JTAG without modifying linker command file & rebuilding SBL.

    I'll file bugs in JIRA against the SBL so these issues are addressed in a future release.

    Regards,
    Frank

  • Hello Frank,

    "The approach you mention for placing the AM437x in UART boot mode seems to work."

    For clarification I just would like to mention that it is an approach explained in the TI Processor SDK RTOS Software Developer's Guide (so something official). So this is obviously something, which is allowed to do.

    software-dl.ti.com/.../index_Foundational_Components.html

    I repeated my test with the SDK RTOS 6.3.0.106 and I used the same file that you used. But the first step already works for me:

    Can it be, that you used another SDK RTOS version and that the UART boot-loader binary files may differ?

    And if possible, can you please send me (or better even post) your re-compiled UART boot-loader with the change in the linker command file? I would like to try the process with your UART SBL, just for curiocity.

    BTW, can you imagine when this issue will be resolved as we want to provide for our custom board and our customers a simple UART solution to recover from any error situation.

    Thanks,

    Inno

  • Hi Inno,

    inno said:
    So this is obviously something, which is allowed to do.

    Yes, understood.

    inno said:
    Can it be, that you used another SDK RTOS version and that the UART boot-loader binary files may differ?

    I used the pre-built UART SBL from AM437x PRSDK 6.3.0.106.

    inno said:
    And if possible, can you please send me (or better even post) your re-compiled UART boot-loader with the change in the linker command file?

    Please find attached.

    inno said:
    can you imagine when this issue will be resolved

    I don't know when this will be fixed.

    Regards,
    Frank

    am43xx_boot.lds

    uart_sbl.zip

  • Hi Frank,

    With the SBL files you posted I see the same thing that you already mentioned:

    "The download finishes, but don't see the SBL output on my UART console..."

    I see at least the SBL output on my consolde when using 1:1 the files "bootloader_boot_uart_a9host_debug.bin" or "bootloader_boot_uart_a9host_release.bin" from "ti-processor-sdk-rtos-am437x-evm-06.03.00.106-Windows-x86-Install.exe".

    I am not sure if I am permitted to upload *.bin files on this forum, since I always get an error message. Otherwise I would post an SBL file and you could repeat my test?

    Nevertheless, this UART upload is an important feature for our product and it would be great if we could keep this post open until we have a solution.

    Thanks,

    Inno

  • Hi Inno,

    inno said:
    this UART upload is an important feature for our product and it would be great if we could keep this post open until we have a solution

    I've filed a customer reported bug for this issue which will be reviewed by the software development team. Again, I don't know when a fix for the problem will be released.

    Regards,
    Frank