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.

CCS/AM3358: RTOS bootloader

Part Number: AM3358
Other Parts Discussed in Thread: OMAPL138

Tool/software: Code Composer Studio

Hi. 

In the startware , there are no more about BootLoader or How to Boot after power on? 

In my exprience, there is a AisGen tool for OMAPL138 Arm9!   And In Am335X, what it is ?

If I can't use the same method, What should I do? 

Thx.

  • Frank

    Thanks for your reply. I have tried like this:

    1. Using CCS load nand_flash_writer_AM335x.out in "C:\ti\pdk_am335x_1_0_16\packages\ti\starterware\tools\flash_writer\".

    2. Select SBL file ,the path is "C:\ti\pdk_am335x_1_0_16\packages\ti\starterware\binary\bootloader\bin\am335x-evm\gcc\bootloader_boot_nand_a8host_debug_ti.bin"

    3.Select BCH 8bit. Then wait until nandwriter give "NAND flashing successful" tips 

    4. tiimage my application . 

    tiimage.exe 0x80000000 NONE AM335x_arm.bin AM335x_arm_ti.bin

    5. Reload nand_flash_writer_AM335x.out, and select the file AM335x_arm_ti.bin.

    6.  Flash offset I enter into 0x80000. And scheme type also is BCH 8 bit.

    7. Waiting console tip finished.

    But the result is my application isn't work. My application is a network program , I can ping from computer to board when I use emulator mode. However I disconnect CCS connection , power on , It doesn't get my expect.

    Choose your operation
    Enter 1 ---> To Flash an Image
    Enter 2 ---> To ERASE the whole NAND
    Enter 3 ---> To EXIT
    1
    Enter image file path
    C:\ti\pdk_am335x_1_0_16\packages\ti\starterware\binary\bootloader\bin\am335x-evm\gcc\bootloader_boot_nand_a8host_debug_ti.bin
    Enter offset to be flashed (in hex):
    0
    Choose the ECC scheme from given options :
    Enter 1 ---> BCH 8 bit
    Enter 2 ---> HAM
    Enter 3 ---> T0 EXIT
    Please enter ECC scheme type :
    1
    Starting AM335X NAND writer

    The NAND Flash is ONFI compatible

    ----------------------
    NAND FLASH DETAILS
    ----------------------
    Device ID : 0xda
    Manufacture ID : 0x2c
    Page Size : 2048 Bytes
    Spare Size : 64 Bytes
    Pages_Per_Block : 64
    Number_of_Blocks : 2048
    Device_width : 1 Byte
    DeviceSize : 256 MB

    Setting the ECC scheme
    Set the BCH 8 bit ECC scheme .... done
    Preparing to Flash image ....
    Opening image ... done.
    Erasing Required Blocks [start = 0, count = 1]...Done
    Flashing image ...
    Number of blocks needed for header and data: 0x1
    Attempting to start write in block number 0x0.
    Writing image data to Block 0 Page0x0
    Writing image data to Block 0 Page0x1
    Writing image data to Block 0 Page0x2
    Writing image data to Block 0 Page0x3
    Writing image data to Block 0 Page0x4
    Writing image data to Block 0 Page0x5
    Writing image data to Block 0 Page0x6
    Writing image data to Block 0 Page0x7
    Writing image data to Block 0 Page0x8
    Writing image data to Block 0 Page0x9
    Writing image data to Block 0 Page0xa
    Writing image data to Block 0 Page0xb
    Writing image data to Block 0 Page0xc
    Writing image data to Block 0 Page0xd
    Writing image data to Block 0 Page0xe
    Writing image data to Block 0 Page0xf
    Writing image data to Block 0 Page0x10
    Writing image data to Block 0 Page0x11
    Writing image data to Block 0 Page0x12
    Writing image data to Block 0 Page0x13
    Writing image data to Block 0 Page0x14
    Writing image data to Block 0 Page0x15
    Writing image data to Block 0 Page0x16
    Writing image data to Block 0 Page0x17
    Writing image data to Block 0 Page0x18
    Writing image data to Block 0 Page0x19
    Writing image data to Block 0 Page0x1a
    Writing image data to Block 0 Page0x1b
    Writing image data to Block 0 Page0x1c
    Writing image data to Block 0 Page0x1d
    Writing image data to Block 0 Page0x1e
    Writing image data to Block 0 Page0x1f
    Writing image data to Block 0 Page0x20
    Writing image data to Block 0 Page0x21
    Writing image data to Block 0 Page0x22
    Writing image data to Block 0 Page0x23
    Writing image data to Block 0 Page0x24
    Writing dummy data to Block 0 Page0x25
    Writing dummy data to Block 0 Page0x26
    Writing dummy data to Block 0 Page0x27
    Writing dummy data to Block 0 Page0x28
    Writing dummy data to Block 0 Page0x29
    Writing dummy data to Block 0 Page0x2a
    Writing dummy data to Block 0 Page0x2b
    Writing dummy data to Block 0 Page0x2c
    Writing dummy data to Block 0 Page0x2d
    Writing dummy data to Block 0 Page0x2e
    Writing dummy data to Block 0 Page0x2f
    Writing dummy data to Block 0 Page0x30
    Writing dummy data to Block 0 Page0x31
    Writing dummy data to Block 0 Page0x32
    Writing dummy data to Block 0 Page0x33
    Writing dummy data to Block 0 Page0x34
    Writing dummy data to Block 0 Page0x35
    Writing dummy data to Block 0 Page0x36
    Writing dummy data to Block 0 Page0x37
    Writing dummy data to Block 0 Page0x38
    Writing dummy data to Block 0 Page0x39
    Writing dummy data to Block 0 Page0x3a
    Writing dummy data to Block 0 Page0x3b
    Writing dummy data to Block 0 Page0x3c
    Writing dummy data to Block 0 Page0x3d
    Writing dummy data to Block 0 Page0x3e
    Writing dummy data to Block 0 Page0x3f
    Application is successfully flashed


    NAND flashing successful!

  • Hi Gao,

    Are you using a TI hardware platform? Note the only TI platform which supports NAND is the AM335x GP EVM. Please see http://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/rtos/index_Foundational_Components.html#boot-modes-supported.

    The following documentation contains useful tips on bootloader debugging: http://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/rtos/index_Foundational_Components.html#bootloader-debugging

    Regards,
    Frank

  • Hi Frank.

    I am using custom board. I know maybe I need make some changes in SBL. So, I recreate a project , and copy sbl file to my project. 

    But the project Building happen a error.  The project is using CCS empty project , CCS add two files in the project: Am335x.lds and startup_ARMCA8.S.

    I must modify project attribute : Use floating point hardware(-mfloat -abi) to hard, otherwise threre are so many error about lib files. such as:

    makefile:160: recipe for target 'spl.out' failed
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(startup.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(startup.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(am335x_chipdb.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(am335x_chipdb.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(hw_am335x_chipdb.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(hw_am335x_chipdb.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(hw_am335x_chipdb_baseaddr.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(hw_am335x_chipdb_baseaddr.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(hw_am335x_chipdb_interrupt.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(hw_am335x_chipdb_interrupt.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(cache_arm.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(cache_arm.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(am335x_prcm.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(am335x_prcm.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(cpu.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(cpu.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(intc.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/soc/lib/am335x-evm/a8/release/gcc\libsoc.a(intc.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/board/lib/am335x-evm/a8/release/gcc\libboard.a(pinmux.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/board/lib/am335x-evm/a8/release/gcc\libboard.a(pinmux.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/board/lib/am335x-evm/a8/release/gcc\libboard.a(board.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/board/lib/am335x-evm/a8/release/gcc\libboard.a(board.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/board/lib/am335x-evm/a8/release/gcc\libboard.a(dcard.o) uses VFP register arguments, spl.out does not
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/board/lib/am335x-evm/a8/release/gcc\libboard.a(dcard.o)
    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: C:/ti/pdk_am335x_1_0_16/packages/ti/starterware/binary/board/lib/am335x-evm/a8/release/gcc\libboard.a(platform.o) uses VFP register arguments, spl.out does not

    ....

    So I add -hard to the attrbute. But emit the following 3 point symbol undefined , can you give me some suggestion?

    c:/ti/ccs930/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/hard/crt0.o: In function `_start':
    (.text+0xf8): undefined reference to `__stack'
    (.text+0x104): undefined reference to `__bss_start__'
    (.text+0x108): undefined reference to `__bss_end__'
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [spl.out] Error 1
    makefile:156: recipe for target 'all' failed
    gmake: *** [all] Error 2

    **** Build Finished ****

  • Hi Gao,

    Bootloader build is documented here: http://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/rtos/index_Foundational_Components.html#building-the-bootloader. I suggest understanding the existing SBL build process so you can develop a build process for your needs.

    Regards,
    Frank

  • Hi Frank.

    Thanks. You are  help me alot, very thanks. My custom board has boot, everythings are ok.

  • Hi Gao,

    I'm glad to hear boot is working on your board! I'll close this e2e thread.

    Regards,
    Frank