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/AM4376: Diagnostic examples on custom board

Part Number: AM4376
Other Parts Discussed in Thread: AMIC110, SYSBIOS

Tool/software: TI-RTOS

Hello,

I would like to run the diagnostic examples on a custom board. Here is what I did so far :

I updated the DDR3 configurations in the GEL files and I managed to run a "hello_world()" on the custom board through JTAG. But an app using RTOS (i.e : rtos_template_app_am437x_a9) doesn't work unless I comment BIOS_start();.

I changed the Pinmux of the idkAM437x board library with our board's configurations using the Pinmux utility as described in the following :

Then I setup the pdk :

C:/ti/pdk_am437x_1_0_14/packages>pdksetupenv.bat "C:/ti/pdk_am437x_1_0_14/packages"

  Then I build the board libraries :

C:/ti/pdk_am437x_1_0_14/packages>pdksetupenv.bat "C:/ti/pdk_am437x_1_0_14/packages"

C:/ti/pdk_am437x_1_0_14/packages>gmake board_lib_clean

C:/ti/pdk_am437x_1_0_14/packages>gmake board lib

  Then I build the bootloader :

C:/ti/pdk_am437x_1_0_14/packages>gmake starterware bootloader

After that I create the diagnostic app SD card loadable files

C:/ti/pdk_am437x_1_0_14/packages/ti/board/diag>gmake idkAM437x_sd

I copied all of the generated binaries to my sd card (which has been made bootable)

Then, the documentation says that I should copy the MLO located in <PDK>/packages/ti/boot/sbl/binary/<BOARD>/mmcsd to my SD card But the boot folder doesn't exist. So I rename bootloader_boot_mmcsd_a9host_debug_ti.bin to MLO and copy it to my SD card.

I insert it in my board, connect teraterm to the board's UART console, power on the board and press the hard reset button but nothing happens.

The Sysboot pins configuration says that the valid booting devices are MMCSD and QSPI.

Am I doing something wrong ? Or did I miss something ?

I use :

CCS 8.3

sdk rtos 5.03.00.07

pdk am437x 1.0.14

Windows 10 OS

Regards,

Gilles

  • Hi,

    First thing, "I updated the DDR3 configurations in the GEL files and I managed to run a "hello_world()" on the custom board through JTAG. But an app using RTOS (i.e : rtos_template_app_am437x_a9) doesn't work unless I comment BIOS_start();."=========> This is a SYSBIOS project, you need BIOS_start() to start a task. What do you mean "I comment BIOS_start()", you meant comment out?

    Then, assuming you can let rtos_template_app_am437x_a9 run properly using CCS/JTAG, do you mean you have UART, SPI, GPIO all test passed?

    Finally, when you run diagnostics from SD card, you saw nothing on the UART. Can you confirm at least UART working in CCS/JTAG? 

    Regards, Eric

  • Hello Eric,

    thank you for your answer,

    What I meant is when I let bios_start() in main.c, the application starts printing some text on the UART terminal and then freezes at some point with the following message on the CCS console :

    CortexA9: JTAG Communication Error: (Error -1045 @ 0x345A) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 8.0.903.2)

    When I remove it, it doesn't  freeze anymore and no error message, but of course, it doesn't go through the tasks (gpio, UART,, SPI, i2c).

    Yes, I confirm that UART is working in CCS/JTAG.

    regards,

    Gilles

  • Hi,

    It is good to know that UART is working using CCS/JTAG approach. So I assume you have the correct PINMUX, PRCM and board library. Then in the AM437x bootloader (MLO) you also has the UART print. If you run the MLO and app, you should be able to see something printf out from MLO to UART console, this happens before the app is running. 

    If nothing is printed by the MLO, you need to load the symbol to it to see where the code is in MMCSD boot case. Or, without MMCSD, you can load the MLO (the SBL oufile) by JTAG/CCS and run, this is easier to debug MLO.

    Regards, Eric

  • Hello,

    Thank you once again for your answer.

    Nothing is printed out to UART console when I run the MLO.

    Therefore, I loaded the MLO by jtag and ran it : are the SBL out files the .out files that are located in pdk_am437x_1_0_14/packages/ti/starterware/binary/bootloader/bin/am43xx-evm/gcc ? (for example bootloader_boot_mmcsd_a9host_debug.out)

    If yes, do you have any hints on where I should look ? I have been digging through the memory Browser but I can't seem to find any usefull information on what is causing this issue.

    Sorry if my questions lead to obvious answers, I am new to this environment.

    regards,

    Gilles

  • Hi,

    pdk_am437x_1_0_14/packages/ti/starterware/binary/bootloader/bin/am43xx-evm/gcc ? (for example bootloader_boot_mmcsd_a9host_debug.out)  =====> Yes, this is the out file you can load via JTAG.

    Then it should go main(). Just step the code, there is CONSOLEUtilsPrintf() you can see if it worked.

    Regards, Eric

  • Hello,

    I tried to do that. But the run never goes through the sbl (which I loaded at 0x402f4000) and therefore, it never reaches the breakpoint. At some point, the run gets stuck in the public ROM (at the address 0x30088).

    Is that a normal behaviour ?

    regards, Gilles

  • No, that means the MLO crashed. After going to main(), are you able to step through the code to see where it crashed?

    Regards, Eric

  • I don't seem to be able to break the code directly (sbl_main.c).

    What I can do is put breakpoints in the disassembly and then go step by step. Once the run arrives in main() (at 0x402f40ec), it just goes one step further (to 0x402f40f0 : main() at sbl_main.c c:88) and the next step goes back to 0x00030010. After that, there are a few more steps in the public ROM before getting stuck at 0x00030088 (which I imagine correspond to sbl_abort() )

    If sbl_main.c is the related file, I guess "BOARDInit(NULL)" should be the what causes the MLO to crash, right ?

    Regards, Gilles

  • Actually I managed to go further into debugging the MLO. I suppose what happened is that I used to build the bootloader by doing :

    C:/ti/pdk_am437x_1_0_14/packages>gmake starterware bootloader

    I think that there is a command in that makefile that deletes all of the previously created .o files before creating the new bootloader files (for each boot configuration, one at the time). Therefore, The .o files needed by the SBL : bootloader_boot_mmcsd_a9host_debug_ti.bin (those in C:/ti/pdk_am437x_1_0_14/packages/ti/starterware/binary/bootloader/obj/am43xx-evm-a9host/debug/gcc/boot_mmcsd/)

    In order to build the bootloader correctly I needed to do :

    C:/ti/pdk_am437x_1_0_14/packages/ti/starterware>gmake bootloader BUILDCFG=boot BOOTMODE=mmcsd PLATFORM=am43xx-evm PROFILE=debug -s KW_BUILD=no

    I still can't get an application to work via a sd card boot but at least I can debug it now.

    Thank you very much for your answers.

    regards, Gilles

  • Hi,

    I thought when you load SBL outfile, it should go main(), then you can step through it as you debug a regular application. If you suspect BOARDInit() crash, then you need to step through this function in ti\starterware\board\board.c.

    Regards, Eric