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.

OMAP-L138: Booting from flash issue

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138, , AM1808, AM1810

Hi iam using a custom board which has OMAPL138 processor,My board is very similar to OMAPL138_LCDK kit,
i have both NAND fash and NOR flash on board,iam using OMAPL138_StarterWare_1_10_04_01 drivers and example
codes for developing my application.Iam unable to flash my application into NAND flash. I have followed the following methods
for flashing the applicaton into NAND.
1.Iam running my application on DSP core,in order to run it first we need to run ARM and then wakeup DSP.
1.I have created AISGEN tool for creating binary image.
2.I have used LCDK_AISGen_Config.cfg(default config file used for omap-lcdk) file,flash(NAND) 8 bit datawidth in AISgen tool.
3.I have tried with our custom configgurations also.
3.Iam using the user boatloader which is given in the following path
OMAPL138_StarterWare_1_10_04_01\build\armv5\cgt_ccs\omapl138\lcdkOMAPL138\bootloader
4. I have made few changes in the bootloader code, i,e.. chipselect,nand buswidth,uart(changed as per my board)and also
the DSPentrypoint to my application entrypoint which is taken from the .map file of my actual application.
5. I have build the project and have passed the .out file to AISgen tool along with the LED blinking code .out which runs on DSP.
6. I have made a single .ais file.
7. Using SFT tool provided by TI i wanted to flash my image into NAND flash.
8. below is the commands which i have used
sfh_OMAP-L138.exe -targettype OMAPL138_LCDK -flashtype NAND -P COM10 -flash_noubl led_boot.ais and also before this

sfh_OMAP-L138.exe -targettype OMAPL138_LCDK -flashtype NAND -P COM10 -erase
9. My process struucks at this point Waiting for SFT on the OMAP-L138...
here are the messages which are seen on command line

NOTE:I have verified my NAND flash functionality by writing and reading into flash through JTAG mode.
-----------------------------------------------------
TI Serial Flasher Host Program for OMAP-L138
(C) 2011, Texas Instruments, Inc.
Ver. 1.67
-----------------------------------------------------


[TYPE] Single boot image
[BOOT IMAGE] led_boot.ais
[TARGET] OMAPL138_LCDK
[DEVICE] NAND
[NAND Block] 1

Attempting to connect to device COM10...
Press any key to end this program at any time.

(AIS Parse): Read magic word 0x41504954.
(AIS Parse): Waiting for BOOTME... (power on or reset target now)
(AIS Parse): BOOTME received!
(AIS Parse): Performing Start-Word Sync...
(AIS Parse): Performing Ping Opcode Sync...
(AIS Parse): Processing command 0: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 13500-Byte section to address 0x80000000.
(AIS Parse): Processing command 1: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 1440-Byte section to address 0x800034BC.
(AIS Parse): Processing command 2: 0x58535906.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Performing jump and close...
(AIS Parse): AIS complete. Jump to address 0x80000000.
(AIS Parse): Waiting for DONE...
(AIS Parse): Boot completed successfully.

Waiting for SFT on the OMAP-L138...

I have found some threads on the TI forum which are similar to my issue and also tried some of them

Methods Followed:

I METHOD:
I have followed this link
processors.wiki.ti.com/.../Rebuilding_the_Flash_and_Boot_Utils_Package

I have downloaded the latest flash and boot utilities package and tried to compile the package through cygwin
but iam unable to compile that package there are errors while building and no .exe is created.
Iam using ccs7.And they mentioned we need to change the tool chain path in makefile.Can u suggest me which path we
need to give exactly ? currently iam giving C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabi for arm
and C:\ti\ccsv7\tools\compiler\ti-cgt-c6000_8.2.3 for DSP.

Following are the errors it is throwing on terminal

make[4]: C:\ti\ccsv7\tools\compiler\ti-cgt-c6000_8.2.3bin\cl6x: Command not found
make[4]: *** [makefile:171: sft.C6748_LCDK_NOR.obj] Error 127
make[4]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/sft/build'
make[3]: *** [makefile:44: all] Error 2
make[3]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/sft'
make[2]: *** [makefile:71: sft] Error 2
make[2]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/sfh'
make[2]: Entering directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl'
make[3]: Entering directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\\arm-none-eabi-gcc -DUBL_SPI_MEM -DOMAPL138 -I../../../Common/include -I../../../../Common/include -I../../../../Common/arch/c6000/include -I../../../../Common/ubl/include -I../../../../Common/ubl/include -I../../../../Common/drivers/include -I../../../../Common/gnu/include -I../../../../Common/ubl/include -I../../../../Common/arch/arm926ejs/include -DAIS_RBL -c -Os -Wall -ffreestanding -DUBL_SPI_MEM -DOMAPL138 -o ubl.OMAPL138_SPI_MEM.obj ../../../../Common/ubl/src/ubl.c
make[3]: C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\arm-none-eabi-gcc: Command not found
make[3]: *** [makefile:176: ubl.OMAPL138_SPI_MEM.obj] Error 127
make[3]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
make[3]: Entering directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\\arm-none-eabi-gcc -DUBL_SPI_MEM -DAM1808 -I../../../Common/include -I../../../../Common/include -I../../../../Common/arch/c6000/include -I../../../../Common/ubl/include -I../../../../Common/ubl/include -I../../../../Common/drivers/include -I../../../../Common/gnu/include -I../../../../Common/ubl/include -I../../../../Common/arch/arm926ejs/include -DAIS_RBL -c -Os -Wall -ffreestanding -DUBL_SPI_MEM -DAM1808 -o ubl.AM1808_SPI_MEM.obj ../../../../Common/ubl/src/ubl.c
make[3]: C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\arm-none-eabi-gcc: Command not found
make[3]: *** [makefile:176: ubl.AM1808_SPI_MEM.obj] Error 127
make[3]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
make[3]: Entering directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\\arm-none-eabi-gcc -DUBL_SPI_MEM -DAM1810 -I../../../Common/include -I../../../../Common/include -I../../../../Common/arch/c6000/include -I../../../../Common/ubl/include -I../../../../Common/ubl/include -I../../../../Common/drivers/include -I../../../../Common/gnu/include -I../../../../Common/ubl/include -I../../../../Common/arch/arm926ejs/include -DAIS_RBL -c -Os -Wall -ffreestanding -DUBL_SPI_MEM -DAM1810 -o ubl.AM1810_SPI_MEM.obj ../../../../Common/ubl/src/ubl.c
make[3]: C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\arm-none-eabi-gcc: Command not found
make[3]: *** [makefile:176: ubl.AM1810_SPI_MEM.obj] Error 127
make[3]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
make[3]: Entering directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\\arm-none-eabi-gcc -DUBL_SPI_MEM -DOMAPL138_LCDK -I../../../Common/include -I../../../../Common/include -I../../../../Common/arch/c6000/include -I../../../../Common/ubl/include -I../../../../Common/ubl/include -I../../../../Common/drivers/include -I../../../../Common/gnu/include -I../../../../Common/ubl/include -I../../../../Common/arch/arm926ejs/include -DAIS_RBL -c -Os -Wall -ffreestanding -DUBL_SPI_MEM -DOMAPL138_LCDK -o ubl.OMAPL138_LCDK_SPI_MEM.obj ../../../../Common/ubl/src/ubl.c
make[3]: C:\ti\ccsv7\tools\compiler\gcc-arm-none-eabi-6-2017-q1-update\arm-none-eabibin\arm-none-eabi-gcc: Command not found
make[3]: *** [makefile:176: ubl.OMAPL138_LCDK_SPI_MEM.obj] Error 127
make[3]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
make[3]: Entering directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
C:\ti\ccsv7\tools\compiler\ti-cgt-c6000_8.2.3bin\\cl6x -c -g -DUBL_SPI_MEM -DC6748 -I=../../../Common/include -I=../../../../Common/include -I=../../../../Common/arch/c6000/include -I=../../../../Common/ubl/include -I=../../../../Common/ubl/include -I=../../../../Common/drivers/include -I=../../../../Common/gnu/include -I=../../../../Common/ubl/include -DAIS_RBL -ms3 -mo -mv6740 --obj_extension=C6748_SPI_MEM.obj ../../../../Common/ubl/src/ubl.c
make[3]: C:\ti\ccsv7\tools\compiler\ti-cgt-c6000_8.2.3bin\cl6x: Command not found
make[3]: *** [makefile:176: ubl.C6748_SPI_MEM.obj] Error 127
make[3]: Leaving directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
make[3]: Entering directory '/cygdrive/C/Users/dharpalli.divya/Downloads/OMAP-L138_FlashAndBootUtils_2_40/OMAP-L138/GNU/ubl/build'
C:\ti\ccsv7\tools\compiler\ti-cgt-c6000_8.2.3bin\\cl6x -c -g -DUBL_SPI_MEM -DC6748_LCDK -I=../../../Common/include -I=../../../../Common/include -I=../../../../Common/arch/c6000/include -I=../../../../Common/ubl/include -I=../../../../Common/ubl/include -I=../../../../Common/drivers/include -I=../../../../Common/gnu/include -I=../../../../Common/ubl/include -DAIS_RBL -ms3 -mo -mv6740 --obj_extension=C6748_LCDK_SPI_MEM.obj ../../../../Common/ubl/src/ubl.c


II METHOD

CCS Method

I tried to flash my application image to NAND flash directly from CCS7.
I have downloaded the source code from below link
sourceforge.net/.../

I tried to import the NANDWriter project into my workspace , but iam unable to
import it.Iam using CCS7 version.How can i import the given example project(ccs4 or ccs5) into my workspace?
Can you please help me out with the procedure and changes to be done to import the project?

III METHOD

BOOTING FROM SERIAL PORT:(UARTHOST)

I tried booting from serial port using UartHostUtillity.exe
Iam using UART1 and my boot switches are set to UART1 mode.Iam able to receive bootme,but here also i cannot see led blinking.

Following are the messages from uarthost utility...

(File IO): Read 38180 bytes from file E:\Divya\led_blink.ais.
(Serial Port): Opening COM10 at 115200 baud...
(AIS Parse): Read magic word 0x41504954.
(AIS Parse): Waiting for BOOTME... (power on or reset target now)
(AIS Parse): BOOTME received!
(AIS Parse): Performing Start-Word Sync...
(AIS Parse): Performing Ping Opcode Sync...
(AIS Parse): Processing command 0: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 1: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 2: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 3: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 4: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 5: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 6: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 7: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 8: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 9: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 10: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 11: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 12: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 13: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 14: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 15: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 16: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 17: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 18: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 19: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 20: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 21: 0x5853590D.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Executing function...
(AIS Parse): Processing command 22: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 148-Byte section to address 0x80000000.
(AIS Parse): Processing command 23: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 25860-Byte section to address 0x80000094.
(AIS Parse): Processing command 24: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 92-Byte section to address 0x80008684.
(AIS Parse): Processing command 25: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 56-Byte section to address 0x800086F8.
(AIS Parse): Processing command 26: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 11264-Byte section to address 0xC0000000.
(AIS Parse): Processing command 27: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 16-Byte section to address 0xC0003E40.
(AIS Parse): Processing command 28: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 48-Byte section to address 0xC0003E60.
(AIS Parse): Processing command 29: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 128-Byte section to address 0xC0004000.
(AIS Parse): Processing command 30: 0x58535906.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Performing jump and close...
(AIS Parse): AIS complete. Jump to address 0x80000000.
(AIS Parse): Waiting for DONE...
(AIS Parse): Boot completed successfully.
(Serial Port): Closing COM10.


Please help me where iam wrong and what need to be changed in order to flash the image.
I would also like to try with the NOR flash, but i couldnt find any driver for NOR flash in the startaware which iam using now.

  • Hi,

    I've notified the RTOS team. They will post their feedback directly here.
    Please share if you use processor SDK RTOS (and which version) or bare-metal code?

    Best Regards,
    Yordan
  • Iam using bare metal code.
  • Divya,

    The Serial flashing tools have been designed as flashing tools for TI evaluation platform and providing in source for customization for custom boards:
    processors.wiki.ti.com/.../Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138

    I understand that the custom board is a new design so can you indicate whether you have tested this board design using some diagnostic code. Before you try to boot, you need to ensure that you are using the correct toolchain and build environment. For all ARM9 platforms we only support TI ARM toolchain for bare-metal and RTOS development so if you are using ARM GCC tool chain with this then you will run into issues as you have observed. You also need to downgrade to CGtools 7.4.x which supports both COfF and ELF binary builds

    Usual the process of bringing up a board requires, user to first ensure that they can setup the device using a GEL file which sets up the clocks, cores and DDR as per application requirement. This is the first step towards working towards porting your application from LCDK to custom board. Can you confirm that you have tried the starterware software and checked out the booting process on LCDK ?

    Once you have this checked out, you can then try to use the CCS based NAND Writer to flash your platform. Check the instructions that I have provided here.
    e2e.ti.com/.../663813

    Once you figure out the DDR and NAND configuration, you can add the setting to the SFH tools and try to port this to your custom board.

    Regards,
    Rahul
  • Hi Rahul,

    Thanks for your reply.We dont have LCDK board . But as you said, i have done all my bord bringup activities. Iam using the GEL file and setting all the parameters. Iam able to run and debug my application using JTAG(XDS100v2 ) on my custom board. The issue is only with booting. Can you help me out with configurations that to be made in AISGEN tool .My board is very similar to LCDK board.The only change is that we are using 8 bit NAND.