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.

TMDSICE3359: PRU-ICSS Profibus on RTOS Application

Part Number: TMDSICE3359
Other Parts Discussed in Thread: PROFIBUS, , AM3359

Hello,

after much effort I've eventually managed to get the basic Software for Profibus running in Debug- mode on the TI TMDSICE3359 Eval-board and also managed to configure the Profibus communication appropriately for our purposes. However, after flashing a release version and also having this running I discovered that after a reboot the system does not restart. I am using the recommended version of SDK 4.3.0. 

1) I assume that this is due to an initialisation problem. Up to now I've always worked with microcontrollers working directly from flash- memory but I believe the TI AM3359 ist fundamentally different and always works from RAM due to speed requirements; am I right?

2) During compilation the last step always registers "Error opening input image file!" although the "profibus_slave_AM335x_arm.out" file exists where it should be. I checked the syntax for pdkAppImageCreate.bat and it all seems to be ok. Trying to run this batch file in a windows command line gives the same result. What is wrong here?

3) Could this missing image file be the cause of my reboot problems?

Thanks in advance.

  • I've just discovered, that the file "profibus_slave_AM335x_arm.bin" is in fact written by pdkAppImageCreate.bat despite the misleading error message. It would seem that the booting problem has nothing to do with this so-called "error". Then I think I need a bootloader; could somebody confirm this please? If so, should this be done using AM335X_StarterWare_02_00_01_01?

  • Apparently the starterware with SDK 4.3.0 is newer than Starterware_02_00_01_01, so I tried building the bootloader in C:\ti\pdk_am335x_1_0_10\packages\ti\starterware. Howerver I get the following error:

    C:\ti\pdk_am335x_1_0_10\packages\ti\starterware>gmake bootloader BUILDCFG=boot BOOTMODE=mcspi PLATFORM=am335x-evm PROFILE=release -s KW_BUILD=no
    process_begin: CreateProcess(NULL, /mkdir -p C:/ti/pdk_am335x_1_0_10/packages/ti/starterware/binary/bootloader/obj/am335x-evm/a8host/release/gcc/boot_mcspi, ...) failed.
    make (e=2): Das System kann die angegebene Datei nicht finden.
    gmake[1]: *** [C:/ti/pdk_am335x_1_0_10/packages/ti/starterware/binary/bootloader/obj/am335x-evm/a8host/release/gcc/boot_mcspi] Error 2
    gmake: *** [bootloader] Error 2

    In my SDK the  directories C:\ti\pdk_am335x_1_0_10\packages\ti\starterware\binary\bootloader\obj... do not exist.

    Must I use the newest SDK- Version although for the Profibus project the V4.3.0 is recommended?

  • Hi Trevor Brown,

    I am able to reproduce this issue at my end. Can you run the below commands as a workaround for building the bootloader for mcspi.

    cd C:\ti\pdk_am335x_1_0_10\packages
    pdksetupenv.bat

    make starterware_boot

    Note: This will build bootloader for other boot modes (uart, mmcsd, nand, mcspi and qspi) as well.

    Thanks,
    Naresh Kumar A

  • Hi Naresh,

    thanks very much for your reply.  With "make starterware_boot" I got another error:

    C:\ti\pdk_am335x_1_0_10\packages>make starterware_boot
    Der Befehl "make" ist entweder falsch geschrieben oder
    konnte nicht gefunden werden.

    ("make" couldn't be found)

    so I tried "gmake" instead and A LOT happened! In the end the missing directories (C:\ti\pdk_am335x_1_0_10\packages\ti\starterware\binary\bootloader\obj...) now exist.

    So now I retried building the desired bootloader version, whereupon a further error message appeared:

    C:\ti\pdk_am335x_1_0_10\packages\ti\starterware>gmake bootloader BUILDCFG=boot BOOTMODE=mcspi PLATFORM=am335x-evm PROFILE=release -s KW_BUILD=no
    # Making am335x-evm:a8host:release:device...
    # Making am335x-evm:a8host:release:board...
    # Making am335x-evm:a8host:release:utils...
    # Making am335x-evm:a8host:release:soc...
    # Making am335x-evm:a8host:release:dal...
    gmake[1]: *** No rule to make target `/arm-none-eabi/lib/hard', needed by `C:/ti/pdk_am335x_1_0_10/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mcspi_a8host_release.out'. Stop.
    gmake: *** [bootloader] Error 2

    However, I found the following files in C:\ti\pdk_am335x_1_0_10\packages\ti\starterware\binary\bootloader\bin\am335x-evm\gcc:

    bootloader_boot_mcspi_a8host_release.bin,

    bootloader_boot_mcspi_a8host_release.out,

    bootloader_boot_mcspi_a8host_release.out.map

    and bootloader_boot_mcspi_a8host_release_ti.bin 

    which have been newly compiled and seem appropriate for my purposes. I believe I must use the last file "bootloader_boot_mcspi_a8host_release_ti.bin"; could you confirm this please?

    Regards, Trevor

  • Hi Naresh,

    since the "recompilation" mentioned above my project will no longer build!! At the end I get this:

    Building target: "profibus_slave_AM335x_arm.out"
    Invoking: GNU Linker
    "C:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc-6.3.1.exe" -mtune=cortex-a8 -marm -Dam3359 -DSOC_AM335x -O2 -g -gstrict-dwarf -Wall -MMD -MP -mfloat-abi=hard -Wl,-Map,"profibus_slave_AM335x_arm.map" -nostartfiles -static -Wl,--gc-sections -L"C:/ti/PRU-ICSS-Profibus_Slave_01.00.02.01/third_party/protocols/profibus_slave/stack_lib/am335x/a8" -L"C:/ti/pdk_am335x_1_0_10/packages/ti/drv/uart/lib/am335x/a8/release" -L"C:/ti/pdk_am335x_1_0_10/packages/ti/drv/pruss/lib/am335x/a8/release" -L"C:/ti/pdk_am335x_1_0_10/packages/ti/osal/lib/tirtos/am335x/a8/release" -L"C:/ti/pdk_am335x_1_0_10/packages/ti/starterware/binary/dal/lib/am335x-evm/a8/release/gcc" -L"C:/ti/bios_6_52_00_12/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard" -Wl,--defsym,STACKSIZE=0x1C000 -Wl,--defsym,HEAPSIZE=0x400 --specs=nano.specs -o"profibus_slave_AM335x_arm.out" "./I2C_soc.o" "./UART_soc.o" "./pruicss_soc.o" "./AM335x/AM335x_bsp.o" "./APP/main.o" "./APP/profi_bsp.o" "./APP/profi_edma.o" "./APP/profi_hw_utils.o" "./APP/profi_misc.o" "./APP/profi_timer.o" "./board_am335x/board_i2cLed.o" -Wl,-T"../AM335x.lds" -Wl,-T"configPkg/linker.cmd" -Wl,--start-group -lm -lprofibus_slave_stack_AM335x_arm -lsupc++ -lrdimon -lgcc -lnosys -lstdc++ -ldal -lc -Wl,--end-group
    makefile:167: recipe for target 'profibus_slave_AM335x_arm.out' failed
    c:/ti/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -ldal
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [profibus_slave_AM335x_arm.out] Error 1
    gmake: *** [all] Error 2
    makefile:163: recipe for target 'all' failed

    **** Build Finished ****

    There must be some incompatibility introduced since recompilation: ("cannot find -ldal"). A directory \dal however exists at: C:\ti\pdk_am335x_1_0_10\packages\ti\starterware\dal

    What now?

  • Another question which may be relevant here:

    Does the sdk-rtos-am335x-evm-04.03.00.05 ONLY work with the older version 7.4.00015of CCS? I have version 11.1.0.00011 installed....

  • Hi Trevor Brown,

    It seems some of the libraries are still missing in the pdk staterware folder.
    Can you compile the entire starterware using "gmake starterware"

    Thanks,
    Naresh Kumar A

  • Hi Naresh,

    thanks, that solved my compiling problems with the app.

    However, compiling the specific bootloader still doesn't work:

    C:\ti\pdk_am335x_1_0_10\packages\ti\starterware>gmake bootloader BUILDCFG=boot BOOTMODE=mcspi PLATFORM=am335x-evm PROFILE=release -s KW_BUILD=no
    # Making am335x-evm:a8host:release:device...
    # Making am335x-evm:a8host:release:board...
    # Making am335x-evm:a8host:release:utils...
    # Making am335x-evm:a8host:release:soc...
    # Making am335x-evm:a8host:release:dal...
    gmake[1]: *** No rule to make target `/arm-none-eabi/lib/hard', needed by `C:/ti/pdk_am335x_1_0_10/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mcspi_a8host_release.out'. Stop.
    gmake: *** [bootloader] Error 2

    So I thought I'd try loading the file that is already present: 

    C:\ti\pdk_am335x_1_0_10\packages\ti\starterware\binary\bootloader\bin\am335x-evm\gcc\bootloader_boot_mcspi_a8host_release_ti.bin

    CCS shows in the console:

    [CortxA8]
    AM335x ISDK Flasher Version - 2.0.1 for ICEv2
    SPI id selected - 0
    Manufacturer ID read is 0xef.
    Device ID read is 0x16.
    Enter Operation [1 - Flash ] [2 - Erase] :
    2
    Enter the offset [in Hex]
    0
    Enter size to be erased in Kilo bytes
    64
    Flash erase offset = 0 , length = 65536
    Erase complete. Exiting

    AM335x ISDK Flasher Version - 2.0.1 for ICEv2
    SPI id selected - 0
    Manufacturer ID read is 0xef.
    Device ID read is 0x16.
    Enter Operation [1 - Flash ] [2 - Erase] :
    1
    Enter the binary type [0-Bootloader, 1-Other ]
    0
    Enter the Offset in bytes (In HEX. eg:- bootloader :0x0 app : 0x20000)
    0x0
    Load .bin file to 0x80100000 and Enter 0 to continue
    0
    Flash erase offset = 0 , length = 0
    Writing...
    Verifying...
    Flashing Done

    Here the length is given as 0 so I don't know whether the bootloader is really loaded or not!! 

    After loading the (default) bootloader and app files using CCS and the SPI-Flash loader (isdk_spi_flasher.out) the board will still not boot properly as a standalone system. Must I not define that main() from the app resides at a specific address to which the bootloader jumps? (0x800020b8)

    Regards, Trevor

  • Hi,

    still having massive problems trying to get this system working!

    Instead of trying to use the already prepared Bootloader I tried making my own _ti.bin file from the raw .bin with tiimage.exe using:

    C:\ti\pdk_am335x_1_0_10\packages\ti\starterware\tools\ti_image\tiimage.exe 0x402f0000 NONE bootloader_boot_mcspi_a8host_release.bin bootloader_TCB_ti.bin (so not to overwrite the existing file).

    The tiimage syntax I got from: https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/rtos/index_Foundational_Components.html#tools-and-binary-formats

    Whilst loading this bootloader using isdk flasher I get:

    [CortxA8]
    AM335x ISDK Flasher Version - 2.0.1 for ICEv2
    SPI id selected - 0
    Manufacturer ID read is 0xef.
    Device ID read is 0x16.
    Enter Operation [1 - Flash ] [2 - Erase] :
    1
    Enter the binary type [0-Bootloader, 1-Other ]
    0
    Enter the Offset in bytes (In HEX. eg:- bootloader :0x0 app : 0x20000)
    0x0
    Load .bin file to 0x80100000 and Enter 0 to continue
    0
    Invalid file size : -1275068416, Exit

    Why do I get an invalid size?

    Using binary type 1 (Other) I get:

    AM335x ISDK Flasher Version - 2.0.1 for ICEv2
    SPI id selected - 0
    Manufacturer ID read is 0xef.
    Device ID read is 0x16.
    Enter Operation [1 - Flash ] [2 - Erase] :
    1
    Enter the binary type [0-Bootloader, 1-Other ]
    1
    Enter the Offset in bytes (In HEX. eg:- bootloader :0x0 app : 0x20000)
    0x0
    Load .bin file to 0x80100000 and Enter 0 to continue
    0
    Flash erase offset = 0 , length = 4096
    Writing...
    Verifying...
    Flashing Done

    What does the "binary type" define when the offset must be appropriately set? 

    Why should the length be any different?

  • OK, my problems have evolved such, that the original title is no longer suitable. I'll resolve this and start anew.