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.

Custom boot loader on LCDK 6748

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

I'm trying to develop a secondary boot on LCDK 6748. May I use an emulator to do following steps?

1. create a mini project like hello world as application project. Using CCS to build this project to get .out file. Then use hex6x.exe to convert the .out file into hex file. Then using hex2bin.exe to convert hex file into binary file.

2. create a boot project. In general, I need to write the application binary file into flash, then in boot project, I need to copy the application into internal ram and run application. But I want to do in following way. Using fread function to read the application binary file into an allocated internal ram. Then jump to the entry point of the application. Also, I want to debug the procedure with emulator by loading the out file of boot project into the LCDK board.

Is it possible way to do it?

thanks,

Jane

  • Hi Jane,

    I think, the starterware bootloader code would fulfill your requirements.

    Could you please to refer the following TI wiki.

    http://processors.wiki.ti.com/index.php/OMAPL138_StarterWare_Booting_And_Flashing

  • Hi Titusrathinaraj,

    I'll try that. One question, does it work for LCDK c6748? Cause I see the title is "OMAPL138".

    Another question.

    Flashing the Application

    Once you have generated both binary images (i.e. the AIS and bin files described above), you are ready to flash these images to the EVM's SPI flash memory. This can be done using the standard serial flasher utility that's included in the tools folder of the standard StarterWare installation:

    1. Set the boot switches for UART2 boot (5:8 = 0011 on EVM) it seems different with the info in link http://processors.wiki.ti.com/index.php/L138/C6748_Development_Kit_(LCDK) , in the link it lists as below

                 what is the configuration for switches?

    1. User Interface

      Switches (SW1)

      Switches 1-4 on SW1 are used to set the BOOT as follows:

      Switch #UART2NAND 16MMC/SD0
      1 OFF OFF OFF
      2 ON ON OFF
      3 OFF ON OFF
      4 ON ON ON

      Switches 5-8 on SW1 are user switches connected to GPIOs according to the table below. When the switch is ON, the pin is pulled low. When the switch is OFF, the pin is pulled high.

      Switch #Pin
      5 GPIO0[1]
      6 GPIO0[2]
      7 GPIO0[3]
      8 GPIO0[4]

    2. Run SFH from the command line:
      • $> sfh_OMAP-L138.exe -flash [bootloader].ais [application].bin
    3. Power on or reset the EVM

    The SFH tool may take several minutes to complete depending on the size of the application. When SFH completes successfully, your application is ready to boot.

     

     

     

    thanks,

    Jane

     

  • Hi Jane,

    Yes. You can use starterware bootloader for C6748 LCKD board too.

    Install appropriate starterware package (C6748_StarterWare_1_20_04_01).

  • Hi Jing Song,

    A Similar query was already answered at the below thread. Please try out and tell us how it goes for you.

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/349268/1223040.aspx#1223040

     

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Custom bootloaders have been discussed before on this forum. Here is a few that I am familiar with:

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/244700.aspx

    http://e2e.ti.com/support/embedded/tirtos/f/355/t/297312.aspx

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/246851.aspx

    I assume you want a custom bootloader to allow field programming or reprogramming without a change in boot modes. I am bit confused with your use case. The use of "fread" implies that you want to use the "emulation debug" boot mode or JTAG to load your hello app into RAM. As far As I know, the fread() is not available for other media like flash. You would have to write your own version of fread().

    On the LCDK, SW1 numbers are reverse order of bit numbers of the boot mode and the switches are inverted or active low, ie. ~SW1[1]=BOOT[4], ~SW1[2]=BOOT[3], ~SW1[3]=BOOT[2], ~SW1[4]=BOOT[3].

    SW1[8:1] BOOT[7:0]
    00001010 00010100 UART2
    00001110 00010000 NAND16
    00001000 00011100 MMC
    00000000 00011110 Emulation Debug

    So, I think the wiki page looks correct.

  • Hi Titusrathinaraj,

    I'm following the steps in OMAPL138 StarterWare Booting And Flashing. 

    1. using AIS gen to create the bootloader AIS file

    boot mode - set to SPI0 flash

    application file - set to C:\ti\C6748_StarterWare_1_20_04_01\binary\c674x\cgt_ccs\c6748\lcdkC6748\bootloader\Debug\boot.out

    AIS file out - set to boot.ais

     

    2. import the timer project given at ..C:\ti\C6748_StarterWare_1_20_04_01\build\c674x\cgt_ccs\c6748\lcdkC6748\timer" into CCS, build and generate the timerCounter.out.

    3. Using out2rprc to Create the Application Binary out2rprc.exe timerCounter.out timerCounter.bin

    4. On C6748 LCDK board,set the boot switches for UART mode(1:4 = 0101 on C6748 LCDK). Open teraterm and can  get the "BOOTME" message.

    5. By sfh utility, flash the two images, boot.ais and timerCounter.bin using the below command.

    sfh_OMAP-L138.exe -flash boot.ais tmerCount.bin -targetType C6748_LCDK -p COM3

    In this step, it stuck as doing Programing UBL into flash...

    I also tried with emdaTest project, got the same problem. Do you know the reason?

    thanks,

    Jane

  • Hi Jing Song,

    The C6748 LCDK board has only NAND flash in it. It doesnot have SPI. In SFH utility, if the flash type is not mentioned, by default it will consider SPI flash.

    you have to mention the "-flashtype NAND" to make it work.

    Use the command like below and let me know the result.

    >sfh_OMAP-L138.exe -flash boot.ais tmerCount.bin -targetType C6748_LCDK -flashType NAND -p COM3

     Other things from your screenshots:

    1. And also, in the "AIS gen tool" select the BOOT mode field as "NAND flash" 

    2. check whether the name of the binary "tmerCount.bin" is correct. Because, in your fifth step you mentioned the name as "timerCounter.bin". (Spell check of the file name )

     

    Regards,

    Shankari

     

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Thanks Shankari,

    The problem was solved. I also refer to the ais configuration in another post -- http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/235049.aspx?pi301055=1

    My purpose is to develop a my own boot loader. So, I guess I can modify the bootloader code under \C6748_StarterWare_1_20_04_01\bootloader and debug it with emulator, right?

    Jane

     

  • Hi Jing Song,

    I am glad to hear that your problem was solved.

    Yes, you can modify the bootloader and debug through CCS using Emulator.

     

    All the best,

    Shankari.

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------