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.

EVMK2H: Booting SYS/BIOS app from memory.

Part Number: EVMK2H
Other Parts Discussed in Thread: SYSBIOS

I have been working on the EVMK2H development board and have been able to sucessfully compile, then load and run the corresponding .out file from the GPIO LED blink example that was provided that utlilzes SYS/BIOS through the debugger. The next task I was hoping to complete was writing the app to NAND or NOR and being able to load the app to either shared memory or DDR3 and execute from boot on power up.

I have tried putting the address that I wanted to execute from (0x80000000) in the linker file before compilation, outptting a .b binary file, then running that through the bToCCS converter, then through ccsAddGpHdr and ccsAddGptdlr. Afterwords, I placed the app into NOR memory by means of the NORwriter. After the app was sucessfully flashed, I would turn off an on the board and nothing would happen.

Where am I going wrong here? Is there a step that I am forgetting? Any help would be greatly appreciated.

Regards.

  • Al,

    Are you trying to boot the application directly using the ROM bootloader? Please note that SYSBIOS runs from DDR memory by default so you need to initialize the DDR PLL and EMIF interface inorder to load and run code from that memory location. In debug environment the GEL file that is used in CCS target configurations sets up the clocks, PSC and DDR interface that allows you to load your application. During boot this needs to be done using code as GEL file and emulation environment is not available. 

    I am guessing that you are using Processor SDK RTOS for your software application development o f the SYSBIOS  app. If not then you should consider using the bootloader from Processor SDK RTOS that is described here:

    http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_BOOT_K2H/E/L

    This provides a secondary bootloader that will initialize the SOC and external memory the same way as the GEL file do and will also load the application. The tool also provides flash writers that will allow you to program the bootloader and the application.

    Hope this helps.

    Regards,

    Rahul

     

  • Hi Rahul, thank you for the quick response. I tried to follow the instructions on the link that you provided and all was going well in running the program_emv script until the flashing of the NOR began. I noticed that there was no line identifying the NOR Writer Utility Version on my screen and there was no indicator of what sectors were being flashed. I ran the command (in cmd while in the processor sdk rtos directory containing program_evm.js) "ccsv7/ccs_base/scripting/bin/dss.bat program_evm.js evmk2h-le nor". All of the GEL initilaization went fine, but after that my output looked similar to this:

    Writer: prebuilt-images/spi_flash_writer.out
    NOR: MLO

    Start Loading nor.bin
    Start programming NOR
    <Date & Time>
    End programming NOR

    After switching boot modes from NO BOOT to ARM SPI and rebooting, I saw no information being printed through the terminal window that I had connected to the serial ports. I used the original files that were included, so I was supposed to see the results of the POST that was executed after the secondary bootloader.

    Did I do something wrong in the setup or execution that I need to correct?

    Thanks,

    Al

  • Al,

    I haven`t used the program_evm.js file so I would need to try this out at my end to confirm to provide more guidance on that approach.

    the approach that I used was to use the spi_flash_writer.out with config with the bootloader and app binary. that is described in this section of the document:
    processors.wiki.ti.com/.../L

    Note that NAND boot is not supported in the SDK yet. The current implementation only supports SPI NOR. Please try it by loading SPI Writer .out and I will try to update the instructions corresponding to program_evm.js when I get them working.

    Regards,
    Rahul
  • Rahul,
    I was able to use the spi_flash_writer.out to flash both the MLO and app (POST) to NOR. However, when I reboot (in ARM SPI mode (0010)), I get no output from my terminal. In my config file I have:
    MLO 0
    app 80000
    From what I could gather, these are the appropriate offsets. I presume that the output from the UART would display on the same port/terminal as when it was flashing. To be safe, I still checked all other available ports with no relevant output on any of them. I do not even see the output from the MLO, so I am led to believe that the MLO isn't being executed. The procedure I am taking is:

    1. Make sure board is in No-Boot mode, and run target configuration in CCS.
    2. Connect to ARM0 and run GEL initialization script.
    3. Connect to DSP0 and load spi_flash_writer.out
    4. Run spi_flash_writer.out and observe progress on terminal window.
    5. Unplug board and change DIP switches to ARM SPI mode.
    6. Plug board back in and observe terminal windows.

    Is this the proper setup/procedure as I feel I must be doing something wrong since I am getting no output?

    Thank you for your time,

    Al
  • AL,

    I have not been able to spend time on reproducing this issue and will try to spend time looking at this next week . It would be good if you can zip upo your binaries and post it on the E2E so I can reproduce and debug with your binaries .

    Regards,
    Rahul
  • Al,

    I was able to reproduce this issue on the K2H EVM and can confirm your observations. I was also able to debug that the SBL code fails in the Board_init  call. Debugging further, we beleive the issue is caused due to the GCC compiler update in the Processor SDK RTOS and were able to fix the issue by making minor modification to the code in SBL_socInit in sbl_soc.c file found in the folder pdk_k2hk_4_0_8\packages\ti\boot\sbl\soc\k2h

    Please update the file to use the following code by adding the call SBL_a15EnableVFP11co() to the code.

    int32_t SBL_socInit()
    {
        Board_initCfg boardCfg;
        boardCfg = BOARD_INIT_PLL | 
            BOARD_INIT_MODULE_CLOCK | 
            BOARD_INIT_DDR |
            BOARD_INIT_PINMUX_CONFIG | 
            BOARD_INIT_UART_STDIO;
    
    #ifndef SECURE_BOOT
        void (*monitorFunction) (void (*)(void), ...);
    
        /* A15 startup calls */
        monitorFunction = (void (*)) 0x1000;
    
        (*monitorFunction)(SBL_setNSMode);
        (*monitorFunction)(SBL_a15EnableNeon);
    #endif
    
        SBL_a15EnableVFP11co();
    
        /* Board Library Init. */
        if (Board_init(boardCfg))
        {
            return -1;
        }
        return 0;
    }

    Please rebuild the MLO file and reflash it to the SPI flash. I have the code working using this fix so please try this at your end and let us know.

    Regards,

    Rahul