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.

TMDXICE3359 boot application from SPI flash

Other Parts Discussed in Thread: SYSBIOS, SYSBIOSSDK-IND-SITARA

Hello all,

I have a TMDXICE 3359 hardware , CCS 5.1.1.00031 and SYSBIOS Industrial SDK

My first try is using the I2C_LED example from SDK , modify the LED rotation speed and LOAD / RUN the I2C_LED.OUT.   no problem , works

First problem , no BIN file was generates. reinstall CSS with CORTEX M MCU support solves this problem.

Now i want to put the new I2C_LED.BIN in SPI Memory and boot from SPI.

Getting Started guide says : write bootloader and application to SPI and reboot the device

                                        start SPI_flashing_tool  and enter the filename to flash when promted.

But when i LOAD / RUN  SPI_flashing_tool.out  no promt appears ?

And where can i found the bootloader.bin

 

 

 

  • Rolf,

    did your board start blinking when you switched it on the first time? It should have... Boards should be shipped with boot loader and test application in SPI flash.

    You only need to overwrite the application. The flasher tool output should show up in one of the console views of CCS. Maybe it is hidden somehow?

    Alternatively you could copy your bin file (not the SPI.bin) to uSDcard (rename it to 'app'). Insert the card and reset. This should boot your app. The default boot loader checks for 'app' in uSD first and boots it if found.

    Regards.

  • Hello Frank

    my board do not blink after switch on , i think i have cleared the SPI flash with one of my trys.

    So i need to put a new bootloader and my app in the SPI flash. But where can i found the bootloader ?

    I can not found the flasher tool output in any CCS console. any idea ?

     

  • Assuming you are using the on-board emulation using the USB cable...

    Make sure your program is really running. We still see issues that the programs do not start the first time after loading. They should got to main() and stop there instead it keeps showing 'Running' state. Now if you stop it ends somewhere in ROM space.

    Make sure you do:

    • connect target
    • Run/Reset/CPU reset HW
    • Run EVM init script
    • load program

    If it doesn't go to main first time, try a reload or or restart operation from CCS. Once you see it stop at main you can run and should see the flasher output. If not you need to go and single step to see where the tool fails.

    Hope this helps.

  • I believe you already have downloaded pre-built binaries. pre-built binaries includes boot loader for IDK and ICE. In case if you do not have it, you can get it from the following link.

    http://www.ti.com/tool/sysbiossdk-ind-sitara

    One point to add to frank's,

    Once the program is loaded, it will be in running state. Just "Suspend" (Run->suspend) and then do a "re-start" (Run->Restart). It will bring the control to main. Once the control comes to main, resume (Run->resume) it and you will see instructions in console (View->Console).

  • Hello Frank

    following your instructions i get the following:

    after starting SPI_flashing_tool i do RESTART  and  RESUME

    Console: Enter File Name   C:\I2C_LED.BIN

    Console: Enter Offset in Bytes ( in Hex )    20000  ( or is it 0x20000 ) ?

    Console: Load .BIN file to 0x80100000 and enter 0 to continue

                      TOOLS / Load Memory    Enter my Filename and 0x80100000 ( or only 80100000 ) in Adress Field and 32 bits in Type size field then finish

                      wait for loading the programm

    Console: 0 Enter

    some messages from the Flashprogrammer appear last are veryfy & Success

    but after power off & on nothing happens only one green LED is on

    maybe i have destroyed the bootloader in some way

    can you tell my where i found the bootloader.BIN ?

     

     

  • Hello Shahid AC

    i can not found any *.BIN file in SDK ?

    any other idea ?

  • Binaries are provided in a separate download. See the web page for the SDK once more...

    There is a zip that also includes the bootloaders.

    Regards.

  • rolf horstmann said:

    some messages from the Flashprogrammer appear last are veryfy & Success

    So it seems something was flashed... either you need to flash the boot loader too or you wrote the wrong data. Maybe you try to flash a binary from the pre-build package first to check if the process works at all. There is still a chance something is wrong in your build.

    You may also try to debug the boot process and see where it fails. This is advanced CCS use...

    Regards.

  • thanks for the support

    with the prebuild BOOT and APP it works.

     

     

  • Can someone explain how to generate the binary files with the post_build.bat ?

    Particulary param one and two.

    Thanks

  • Hello Micheal Rinker,

    Please go through  this link for post build script details..

    http://processors.wiki.ti.com/index.php/AM335x_SYSBIOS_Industrial_SDK_01.00.00.02_User_Guide#Generating_Executable_Binary_-_Post_Build_Script

    Please let me know if you need more information.

    Regards,

    Shahid

  • I have this manual. But I think my first two parameters are wrong, maybee you can help me.

    C:\ti\ccsv5\eclipse  [1]

    C:\ti\ccsv5\tools\compiler\tms470 [2]

    C:\ti\am335x_sysbios_ind_sdk_1.0.0.2\sdk\starterware\starterware-starterware-src\binary\armv7a\cgttms470_ccs\am335x\evmAM335x\bootloader [3]

    boot [4]

    C:\ti\am335x_sysbios_ind_sdk_1.0.0.2\sdk\starterware\starterware-starterware-src\tools\ti_image\cgttms470_ccs\ti_image.exe [5]

    0 [6]

    0 [7]

    Bootloader [8]

    When I run the batch, I get an error because one binary file was not found.

  • your first param has to be

    C:\ti\ccsv5

    not   -  C:\ti\ccsv5\eclipse

    Regards,

    Shahid

  • I hope you can see it, but the script occurs an error. The path to the .out is correct.

    Maybee you can help me, I will even try to flash the prebuilt files.

  • The image is too small to see it... May be you can copy and paste the error you get there - including the command you give.. I will have a look into it..

  • The command:

    post_build.bin "C:\ti\ccsv5" "C:\ti\ccsv5\tools\compiler\tms470" "C:\ti\am335x_sysbios_ind_sdk_1.0.0.2\sdk\starterware\starterware-starterware-src\binary\armv7a\cgttms470_ccs\am335x\evmAM335x\bootloader" "boot" "C:\ti\am335x_sysbios_ind_sdk_1.0.0.2\sdk\starterware\starterware-starterware-src\tools\ti_image\cgttms470_ccs\ti_image.exe" "0" "0" "Bootloader"

    The script can not find a .bin file, i think it is temporary, because i has always an other name like this: appl_24648_21875_17451.bin

    When the script is runnung, there is a line set tmpbin=C:\appl_24648_21875_17451.bin

  • I am having the same issue, although I am trying to generate a bootloader binary to be stored in SPI Flash. Is something wrong with my post-build command? Here is the output of my console:

     

    'Finished building target: ecat_appl.out'

    ' '

    C:/TI/ccsv5/utils/bin/gmake --no-print-directory post-build

    "../../../../tools/post_build/post_build.bat" "C:/TI/ccsv5" "C:/TI/ccsv5/tools/compiler/tms470" "C:\TI\am335x_sysbios_ind_sdk_1.0.0.2\sdk\protocols\ethercat\ecat_appl\Debug" "ecat_appl" "C:\TI\am335x_sysbios_ind_sdk_1.0.0.2\sdk\starterware\starterware-starterware-src\tools\ti_image\cgttms470_ccs\ti_image.exe" "1" "0" "ecat_appl_SPI.bin"

    Binary file does not exist in path

    Could Not Find C:\appl_28005_1872_14729.bin

    finished

  • ok.. so the issue is your CCS installation doesn't have tiobj2bin.bat  , in the expected location.

    post_build.bat internally calls other batch files and exes to convert the .out file to .bin file. In your case, the above mentioned batch file must be missing..

    Can you check whether you have tiobj2bin.bat and mkhex4bin.exe in ccsv5\utils\tiobj2bin  folder? if not present  there, can you search for these files in your ccsv5 folder?  if you can find those files in your ccs installation folder,  please copy them to ccsv5\utils\tiobj2bin and try again.

    Regards,

    Shahid

  • Hello Jonathan

    i had the same problem, the CCSV5/UTILS/TIOBJ2BIN folder is missing.

    reinstall CCS and add the CORTEX M MCU support  this solved the problem in my system

  • Actually, the folder C:\TI\ccsv5\utils\tiobj2bin does exist, and I can see the two files in there: mkhex4bin.exe and tiobj2bin.bat

    Is there something else that could be causing this issue?

  • I have even these folders and the files and even the descreibed problem. 

  • I'm having the same problem, and I've tracked it down to something to do with Windows 7 and not being able to create a file at the root directory (C:\) when UAC is turned on (even if you're an administrator on the computer).  post_build.bat tries to make a file via the statement set bintmp="C:\appl_%random%_%random%_%random%.bin" (at the root of C:\ drive).  Windows 7 won't allow this and for some reason no error is generated: the .BIN file just isn't created.  Even if you run the tiobj2bin command manually via a command prompt, it appears to execute without error, but the .BIN file is not created.  If you change the "bintmp" location to be somewhere else (like the CWD or C:\temp or something like that), then all is good.  So it seems to be a Windows anomaly?  I know this "condition" exists in Vista and Windows 7, but I don't know if it occurs in Windows XP?

    It would appear to be advisable for TI to change post_build.bat to use a different bintmp location?

  • As Darrin Hansen pointed out, this seems to be an issue on Windows Vista and 7.

    For now, as a workaround, you may create a temporary folder some where and update the post-build script to use that folder for temporary binary file. Please ensure that the full path for the temporary folder doesn't contain any spaces.

    for eg :-  create a folder named temp_isdk_post_build  in C:  and update the post_build.bat statement set bintmp="C:\appl_%random%_%random%_%random%.bin" to set bintmp="C:\temp_isdk_post_build\appl_%random%_%random%_%random%.bin"

    postbuild.bat can be found in $(SDK_INSTALL_PATH)\tools\post_build directory.

    This will be fixed in next sdk release.

    Thanks,

    Shahid

  • Hello,

    I've a similar problem: with a ICE, the first time I switch on the board the led correctly blinks.

    I've tried to download the UartEcho prebuilt app. I follow the instructions found in "Industrial SDK Getting Started Guide" in the "Flashing Binaries to SPI Flash on ICE Using CCS" section. It seems to download the bin file correctly because at the end of operations Verify...Success appears. But the UART doesn't works.

    I then tried to download the i2c_led example again but nothing blinks. I then tried to download the SPI bootloader (always prebuilt files by now) and the i2c_led.bin app again but nothing blinks.

    These are the steps I execute:

    Enter the file name (full path without spaces)

    Enter the offset (0x0 for the boot_SPI.bin file and 0x20000 for the i2c_led_SPI.bin)

    Press 0 to confirm

    All is ok until verify...success

    Disconnect the debugger

    Turn on and on the board

    but I see only the red led on

    I'm using Windows 7 32 bit, CCS 5.1.1.00031, SysBios SDK 01.00.00.03

    What I'm wrong? Is there a way to see if the correct booloader and app is flashed correctly in SPI?

    Thanks in advance.

  • Hello LucaM,

    I think you missed to load the binary file to memory before entering '0' to confirm.  Please go through the below link to know how to load file to memory.

    http://processors.wiki.ti.com/index.php/AM335x_SYSBIOS_Industrial_SDK_Getting_Started_Guide#Running_Application_from_SPI_Flash

    Here are the instructions to load binary to memory.

              Load binary file to Memory - Using LoadMemory

                  Open Memory window in CCS ('View->Memory Browser)
                  Select "
    Tools->'
    Load Memory".
                  Browse and select the .bin file to be loaded and Click 'Next'. (File should be named as *.bin)
                  Enter 0x80100000 in "Start Address' field.
                  Select '32 bits' for 'Type-size' field

                  Keep the swap tick box un-checked.

                  click 'Finish'

    Regards,

    Shahid

  • Hi,

    I'am stupid...Problem  solved.

    Wish you  have a fun day

    Regards,

    Jupiter.