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.

Problem when flashing TMDSICE3359 with CCS 6

Other Parts Discussed in Thread: TMDSICE3359, SYSBIOS, AM3359

Hello,

I'm working with TMDSICE3359 platform. I use CCS v6.1.1.00022 running over Windows 7.

I have built, flashed, etc different projects several times on the platform without any problem, my own projects and the examples that comes with SYSBIOS SDK (am335x_sysbios_ind_sdk_1.1.0.8).

But after unplug the card and plugged again (aprox. lest than a minute between both action) the system doesn't work correctly. The power on led is ON, the LCD doesn't show any message, I can connect with CCS but when I try to flash a program to SPI (program isdk_spi_flasher.out), the step for loading .bin to memory doesn't work. So I can not flash a program and I receive an "Invalid file size" message.

AM335x ISDK Flasher Version - 1.0.7

Enter the board type [0-ICE, 1-IDK ]
0
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)
0x20000
Load .bin file to 0x80100000 and Enter 0 to continue
0
Invalid file size : 1862299392, Exit

Please, any help, suggestion or comment for solving this is more than welcome.

Best regards,

Mario

  • Hi,

    I will ask the ISDK team to look at this.
  • Hi Mario

    Your steps look correct.

    The only other problems that are typically encountered is when the bin file is not correctly loaded into memory.

    Does the error occur when the board is powered off for a longer period of time?

    David

  • Hi Biser,

    Thanks. Any feedback will be more than welcome.
    In the meanwhile I have tried different options:

    1- I tried to flash the SPI by debugging the source code of the flashing tool (...tools\flashing_tools\SPI_Flash\CCS_Based). After executing the lines 159-160 (I think this is the step for loading the memory with the binary code (*_SPI.bin ))

    printf("Load .bin file to 0x80100000 and Enter 0 to continue\n");
    scanf("%x", &fileSize);

    I receive this message:

    "CortxA8: Trouble Writing Memory Block at 0x80100000 on Page 0 of Length 0x7ff0: (Error -1065 @ 0x3D5A) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.14.5) "

    2- I've tried to flash the binary to NOR memory (after connecting J10 pins) using the tool "isdk_nor_flasher.out" and I get this message:

    CortxA8: File Loader: Verification failed: Values at address 0x0000000080838108 do not match Please verify target memory and memory map.
    CortxA8: GEL: File: D:\ti\am335x_sysbios_ind_sdk_1.1.0.8\sdk\tools\flashing_tools\NOR_Flash\pre_built\isdk_nor_flasher.out: a data verification error occurred, file load failed.


    3- After this error message I have executed some GEL scripts.

    - AM335x System Initialization -> AM3359_ICE_Initialization. Apparently does not have failures.

    CortxA8: Output: IMPORTANT: Make sure to do a RESET CPU(HW) on the ARM target before running the GEL script for initialization
    CortxA8: Output: **** AM3359_ICE Initialization is in progress ..........
    CortxA8: Output: **** AM335x ALL PLL Config for OPP == OPP100 is in progress .........
    CortxA8: Output: Input Clock Read from SYSBOOT[15:14]: 24MHz
    CortxA8: Output: **** Going to Bypass...
    CortxA8: Output: **** Bypassed, changing values...
    CortxA8: Output: **** Locking ARM PLL
    CortxA8: Output: **** Core Bypassed
    CortxA8: Output: **** Now locking Core...
    CortxA8: Output: **** Core locked
    CortxA8: Output: **** DDR DPLL Bypassed
    CortxA8: Output: **** DDR DPLL Locked
    CortxA8: Output: **** PER DPLL Bypassed
    CortxA8: Output: **** PER DPLL Locked
    CortxA8: Output: **** DISP PLL Config is in progress ..........
    CortxA8: Output: **** DISP PLL Config is DONE ..........
    CortxA8: Output: **** AM335x ALL ADPLL Config for OPP == OPP100 is Done .........
    CortxA8: Output: **** AM335x DDR3 EMIF and PHY configuration is in progress...
    CortxA8: Output: EMIF PRCM is in progress .......
    CortxA8: Output: EMIF PRCM Done
    CortxA8: Output: DDR PHY Configuration in progress
    CortxA8: Output: Waiting for VTP Ready .......
    CortxA8: Output: VTP is Ready!
    CortxA8: Output: DDR PHY CMD0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD1 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD2 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA1 Register configuration is in progress .......
    CortxA8: Output: Setting IO control registers.......
    CortxA8: Output: EMIF Timing register configuration is in progress .......
    CortxA8: Output: EMIF Timing register configuration is done .......
    CortxA8: Output: PHY is READY!!
    CortxA8: Output: DDR PHY Configuration done
    CortxA8: Output: **** AM3359_ICE Initialization is Done ******************

    CortxA8: Output: IMPORTANT: Make sure to do a RESET CPU(HW) on the ARM target before running the Initialization script again


    - AM335x DDR Tests -> DDR_Data TransferCheck. Here you can see the report of the script (I added "..." to shorten the message)

    CortxA8: GEL Output: Try Accessing DDR memory....Write data
    CortxA8: GEL Output: Data written at :: 0x80000000
    CortxA8: GEL Output: Data written at :: 0x80000004
    CortxA8: GEL Output: Data written at :: 0x80000008
    CortxA8: GEL Output: Data written at :: 0x8000000C
    ...
    CortxA8: GEL Output: Data written at :: 0x800003D8
    CortxA8: GEL Output: Data written at :: 0x800003DC
    CortxA8: GEL Output: Data written at :: 0x800003E0
    CortxA8: GEL Output: Data written at :: 0x800003E4
    CortxA8: GEL Output: No of Failed locations are :: 0x00000001
    CortxA8: GEL Output: No of Failed locations are :: 0x00000002
    CortxA8: GEL Output: No of Failed locations are :: 0x00000003
    CortxA8: GEL Output: No of Failed locations are :: 0x00000004
    ...
    CortxA8: GEL Output: No of Failed locations are :: 0x000000F7
    CortxA8: GEL Output: No of Failed locations are :: 0x000000F8
    CortxA8: GEL Output: No of Failed locations are :: 0x000000F9
    CortxA8: GEL Output: No of Failed locations are :: 0x000000FA
    CortxA8: GEL Output: Data Integrity check Failed

    May be those error messages can help for finding a solution or a clue.

    BR,
    Mario
  • Hi David,

    Thanks for the feedback.
    The error occur after the board was powered off for a very short period, aprox. less than 1 minute.

    Raul
  • Hi David and Biser,

    According to the messages I put in a previous comment, do you think is possible to find a clue about the cause of error during the loading memory process?

    Do you think that the memory could be damaged or "corrupted"?

    Is there a procedure for a "factory reset"?

    Please, any help, comment or idea is welcome. Actually I don't know what another action to carry out except buy another TMDSICE3359.

    BR,

    Mario

  • Hi Mario

    I can duplicate what you are seeing for the legacy AM335x ISDK 1.1.0.8 and 1.1.010 in CCS 6.1.x.
    This error does not occur for the ISDK 2.1.1.2 which supports both AM335x ICEv2 and AM437x IDK.

    Let me investigate a little more.

    David
  • Hi Mario

    I was able to successfully store and run an SPI Flash application ISDK 1.1.0.10 and CCS 6.1.2..

    1. Remove power from the AM335x ICE v2 for 15 seconds.
    2. Follow the updated instructions in section Flashing Binaries to SPI Flash on ICE V1/V2 Using CCS in the online version of

    I find it practical when connecting to and AM335x or AM437x EVM to

    1. Select System Reset under Reset.jpg
    2. Select Suspend Suspend.jpg
    3. Load the GEL file and execute initialization script.
    4. Once the initialization is completed, Select Run->Load ->Load Program. (Browse to the executable and click OK)

    If there is a valid application in SPI or NOR flash(in their corresponding boot mode), on "System Reset" the application loads right away. This might cause issues on the application you load via JTAG. To avoid this, put a hardware breakpoint at 0x402f0400(in case of MMSCD boot mode) or 0x30000000(in case of qSPI boot mode) and then do a "System Reset". You can then continue with Step 4 after this step.

    David

  • Hi David,

    Thanks for the feedback!

    I have tried everything but it did not work.

    I've updated CCS to 6.1.2 and AM335x SYSBIOS SDK to version 1.1.0.10.

    I've followed all the steps as is suggested in the new version of the wiki but it did not work. I'm having the same error with the ISDK flashing tool.

    My concern is that the memory loading tool doesn't work.

    Is that possible to load the .bin file to a different memory location than 0x80100000?

    BR,
    Mario
  • Mario

    One of the key additions to the instruction update in the link shown above was to add the press pause Suspend.jpg to suspend program execution before starting the memory load. Then after the memory load has finished, to select resume Runreset.jpg before entering a 0 to load the flash memory. Without this sequence the memory was not updated.

    A good way to check the update is (after pressing pause) display the memory in the memory browser by entering 0x80100000 in the address window and press enter. the memory browser will show the current contents.  You can set the value of a memory location by entering a value and press return. The memory will then show the value that was entered.   Later when the *.bin file is loaded, the locations that change will show their values in red font.

    David

  • Thanks David,

    I followed all the steps you have suggested. The flashing tool executes without error message but I don't see any reaction on the board.

    I have flashed two .bin programs:
    1- prebuilt bootloader for SPI "boot_SPI.bin" at "...\am335x_sysbios_ind_sdk_prebuilt_01_01_00_10\bootloaders\ICEv2.1\SPI"
    2- prebuilt example uart_echo "uart_echo_SPI.bin" at "...\am335x_sysbios_ind_sdk_prebuilt_01_01_00_10\applications\uart_echo\SPI"

    For both cases you can see the output from the flashing tool:
    1- bootloader
    AM335x ISDK Flasher Version - 1.0.7
    Enter the board type [0-ICE, 1-IDK ]
    0
    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

    2- uart_echo
    AM335x ISDK Flasher Version - 1.0.7
    Enter the board type [0-ICE, 1-IDK ]
    0
    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)
    0x20000
    Load .bin file to 0x80100000 and Enter 0 to continue
    0
    Flash erase offset = 131072 , length = 0
    Writing...
    Verifying...
    Flashing Done

    An observation from both cases: "length = 0"

    After restarting the board I don't see any reaction, the lcd screen doesn't show anything and I try also to read the serial port with a serial terminal application without success.

    My concern is, if the flashing tool does not give any error why the board does not seem to be booting from SPI memory. Currently it is configured to boot from SPI.

    BR,
    Mario
  • Mario

    Sorry I did not see this earlier.
    It is necessary to use the prebuilt bootloader " isdk_spi_flasher.out"
    This is included in the SDK at
    {IA_SDK_HOME}\tools\flashing_tools\SPI_Flash\pre_built\CCS_based\isdk_spi_flasher.out

    The executable was from the prebuild examples
    ...\am335x_sysbios_ind_sdk_1.1.0.8\am335x_sysbios_ind_sdk_prebuilt_01_01_00_08\"Example"\SPI

    David
  • Hi David,

    I have a similar issue:
    - I am trying to flash a *.bin file and I always get the error message "invalid file size".

    I am using the prebuild "isdk_spi_flasher.out" as you suggested.

    My procedure is the following:

    [CortxA8] 
    AM335x ISDK Flasher Version - 1.0.7
    Enter the board type [0-ICE, 1-IDK ]
    0
    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)
    0x20000
    Load .bin file to 0x80100000 and Enter 0 to continue
    0
    Invalid file size  : -442503148, Exit

    My doubt is that something goes wrong when loading the application into the memory, but I don't know where the problem could possibly be. Please find the application file I am trying to flash in the attachment. I am loading it into the memory at the indicated address 0x80100000 as a "TI raw data" file type.

    Do you have any hints what could be wrong?

    u-boot.zip