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.

Code Composer Studio Flash Programming Plug-in for LCDK138 Nand Flash

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

All:

Given that the LCDK138 (and other platforms) have external Nand Flash on the board, I request an enhancement to Code Composer Studio to support programming the NAND Flash from the CCS environment. (There is an existing Command-Line based NAND Flash programmer - this would be an enhancement to that.)

  • Todd,

    For OMAPL138 LCDK, there is a NAND flash writer, a CCS based project available to flash the binaries into the NAND memory.

    It is enclosed in the "OMAP-L138_FlashAndBootUtils_2.40" located at ~\OMAP-L138\CCS\NANDWriter.

    One can import and run this project using CCS environment.

    Please reply if you are looking something else.

  • Thanks, Shankari.
    I found the files at sourceforge.net/.../
    I will look further at loading and running.
  • The files I pulled down include a .pjt file for both DSP and ARM. Do I need to create a project for both devices in order to load the Nand Flash?
    Also, by importing the .pjt it looks like I have to manually add the nandwriter.c and nandwriter.h - there are include paths that also need to be specified in order to build. I will make assumptions on what those paths are, and hopefully, I will be able to get a clean build. It looks like I need to manually add at least 4 to 5 separate include paths.
  • I manually added the include paths, but now I am getting linker errors. Do you know what additional source files need to be added to the project? Right now it is just nandwriter.c and obviously from the errors, there are additional files needed.
  • Dear Todd,

    The files I pulled down include a .pjt file for both DSP and ARM. Do I need to create a project for both devices in order to load the Nand Flash?
    Also, by importing the .pjt it looks like I have to manually add the nandwriter.c and nandwriter.h - there are include paths that also need to be specified in order to build. I will make assumptions on what those paths are, and hopefully, I will be able to get a clean build. It looks like I need to manually add at least 4 to 5 separate include paths.

    These projects were based on CCSv3 so you have to import as legacy CCSv3.3 option.

    You don't want to change anything but just import and rebuild, its sufficient.
    Please try that and let us know.
  • When I used the option "Select Legacy CCS Project" and pointed at either the ARM or DSP project, the "Discovered legacy projects" window is empty. I am pointing at "C:\flashAndBoot\OMAP-L138_FlashAndBootUtils_2_40\OMAP-L138\CCS\NANDWriter\NANDWriter_ARM.pjt" when I use the "Select a project file" option.
    As a result, nothing is pulled into the resulting project. Is there something that I am doing wrong?
  • Okay, I selected "select a search directory" instead of "select a project file" (which seemed intuitively obvious), and it looks like I am getting a little further. I still have 11 compiler errors to resolve. Do I need OMAPL138.cmd AND NANDWriter_DSP.cmd or just one of them?
  • Can you please choose "Select search-directory" option while importing ?
  • I had to manually add "D:\ti\ccsv6\tools\compiler\c6000_7.4.14\lib\rts64plus.lib" and go back to compiler version 7.4.14 and compile as "legacy coff" go get a clean build. I am not sure of endianness - can you tell me whether it should be big or little? I am able to load the resulting NANDWriter_DSP file onto my LCDK138 board and so far it runs. If I try to use version 8.x, it complains that it cannot find the rts64plus.lib file - because it now has an elf extension on the file. Do you know if I need to stay at level 7.x to get this to work?

    I will need to do some research on what I will be loading in order to Boot.

     

  • I would like to suggest to use the 7.x compiler version with little endian since its very old project.
    Please make sure that you have modified the code for NAND bus width according to your custom NAND if any.
  • All:

    My understanding is that the external NAND flash can be written from either ARM or from the DSP, so one of these projects should be able to update the NAND flash with an image for the ARM and an image for the DSP.

    If I have an ARM image and a DSP image to put into NAND flash, do I run the NAND_Writer project two times, one for each image?

    I am able to get an error-free compile on the NANDWriter_ARM project as well as the NANDWriter_DSP project. I do get 5 warnings on the ARM code. They are

    1. #179-D function "LOCAL_getOPP" was declared but never referenced.

    2. Build variable 'C6000_CSL_CG_ROOT' cannot be resolved.

    3. Build variable 'XDAIS_CG_ROOT' cannot be resolved.

    4. Invalid project path: Include path not found(\include).

    5. Invalid project path: Include path not found(\packages\ti\xdais).

    I will look into seeing what I can do to clean up these warnings, but has anyone from the TI team looked at these?

  • Dear Todd,

    I've not got any build warnings for ARM/DSP NANDWriter project except "1. #179-D function "LOCAL_getOPP" was declared but never referenced." .

    Able to run and got prompt to upload the file or erasing option ?

    **** Build of configuration Debug for project NANDWriter_ARM ****
    
    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all 
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/src/async_mem.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="async_mem.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/src/async_mem.c"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/src/async_mem.c'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/arch/arm926ejs/boot.asm'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="boot.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/arch/arm926ejs/boot.asm"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/arch/arm926ejs/boot.asm'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/src/debug.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="debug.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/src/debug.c"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/src/debug.c'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="device.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device.c"
    "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device.c", line 95: warning #179-D: function "LOCAL_getOPP" was declared but never referenced
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device.c'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device_async_mem.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="device_async_mem.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device_async_mem.c"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device_async_mem.c'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device_nand.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="device_nand.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device_nand.c"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/src/device_nand.c'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/src/nand.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="nand.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/src/nand.c"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/src/nand.c'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/src/util.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="util.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/src/util.c"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/src/util.c'
    ' '
    'Building file: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/src/nandwriter.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="C:/ti/xdais_7_21_01_07/packages/ti/xdais" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/ccs/include" --include_path="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/Common/drivers/include" -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" --preproc_with_compile --preproc_dependency="src/nandwriter.pp"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/src/nandwriter.c"
    'Finished building: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/src/nandwriter.c'
    ' '
    'Building target: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/NANDWriter_ARM/../../../../OMAP-L138/CCS/NANDWriter/Debug/NANDWriter_ARM.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e --abi=eabi -me -g --define="_DEBUG" --define="SKIP_LOW_LEVEL_INIT" --display_error_number --diag_wrap=off --obj_directory="C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug" -z -m"C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/NANDWriter_ARM.map" -i"C:/ti/ccsv5/tools/compiler/arm_5.1.1/lib" -i"C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" -i"C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/NANDWriter_ARM" -i"C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter" --reread_libs --priority --warn_sections --display_error_number --diag_wrap=off --xml_link_info="NANDWriter_ARM_linkInfo.xml" --ram_model -o "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/NANDWriter_ARM/../../../../OMAP-L138/CCS/NANDWriter/Debug/NANDWriter_ARM.out"  "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/NANDWriter_ARM.cmd" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/nandwriter.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/util.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/nand.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/device_nand.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/device_async_mem.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/device.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/debug.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/boot.obj" "C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/Debug/async_mem.obj" -l"rtsv5_T_le_eabi.lib" 
    <Linking>
    'Finished building target: C:/ti/OMAP-L138_FlashAndBootUtils_2.40/OMAP-L138/CCS/NANDWriter/NANDWriter_ARM/../../../../OMAP-L138/CCS/NANDWriter/Debug/NANDWriter_ARM.out'
    ' '
    
    **** Build Finished ****
    

  • Hi Todd,

    ( Long back ) I have personally used this NAND writer many times and it worked flawlessly. ( CCS version used is 5.5 and the Flash tool version is OMAPL138_FlashAndBootUtilis_2.40 )

    As far as I know, it should work straight away when we import into CCS using the "legacy option".

    If there are any errors like "invalid project path", it can be re-solved by going to CCS properties -->path variables and resolving the appropriate locations of the packages needed for the project.
  • Shankari:
    I have been able to successfully download an ARM project with CCS-NandWriter. Essentially it is ARMproj + AIS --> ARM.ais - this will run fine.
    However, I would also like to have NandWriter update the Nand Flash with a DSP project, also known as application.
    If I use AisGen to create a combined AIS+ARM+DSP, I am able to load it with NandWriter, but at the point where the ARM loads the DSP from NAND, I have problems. (Unable to read from NAND.)
    Do you know if the present NandWriter can also add application code (for the DSP) and successfully load and run.
  • All:

    Present UART flashwriter code will take two input files - one is ARM+AIS (binary) and the other is the DSP (binary), otherwise known as "application code" or "image."

    The present NandWriter software for CCS (3.3) will program the ARM+AIS binary, but will not program the DSP binary into NAND flash. Although it looks like this task may be "quickly and easily done," I would like to see this particular "enhancement" done by the TI factory team. The "Image offset" applied by the UART bootloader is "6*NAND_BLOCKSIZE_128KB."

    Presently, there are 2 questions posed by the NandWriter routine:

    1. Do you want to global erase NAND flash?

    2. Enter the binary AIS file name to flash (enter 'none' to skip) :

    I would like a 3rd question:

    3. Enter the binary DSP ('Image') file name to flash (enter 'none' to skip) :

     

    This brings me back to my original request of adding a NAND Flash programming plug-in for Code Composer Studio.

     

  • Hi Todd Anderson,

    Yes you can do it. If you want to provide two input files to writer code then you have to provide the application entry point of application image like below TI wiki.
    processors.wiki.ti.com/.../OMAPL138_StarterWare_Booting_And_Flashing

    You have to modify the NANDwriter code to get two input files with entry point. Also you can refer SPIwriter code which is already taking two input files (ARM UBL and DSP app).

    C:\ti\OMAP-L138_FlashAndBootUtils_2.40\OMAP-L138\CCS\SPIWriter\src\spiwriter.c