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.

Port flash setting from flash.cmm to CCS5.x

Other Parts Discussed in Thread: UNIFLASH, TMS570LS3137

Hello,


I am using CCS5.x with XDS510USB and the board vendor supplied flash.cmm config file for the Lauterbach debugger. I would like to use CCS5.x with XDS510USB environment for application development. How do I port the contents of flash.cmm which is necessary to flash the application to the target board?

;========================================================================
; Setup CPU

SYStem.RESet
SYStem.CPU TMS570LS3137-ZWT
SYStem.JtagClock CTCK 25MHz
SYStem.MemAccess DAP
ETM.OFF
SYStem.Up

;========================================================================
; Flash declaration

FLASH.RESet

; Program flash
FLASH.Create  1. 0x000A0000--0x0017FFFF 0x20000 TARGET Byte 0.  ; Bank 0
FLASH.Create  2. 0x00180000--0x002FFFFF 0x20000 TARGET Byte 1.  ; Bank 1

; use flash algorithm with automatic ECC generation
FLASH.TARGET 0x08000000 0x08001000 0x4000 ~~/demo/arm/flash/byte_be/f021r4.bin

FLASH.CLocK auto

;========================================================================
; Flash programming

DIALOG.YESNO "Program application to flash memory?"
LOCAL &progflash
ENTRY &progflash

IF &progflash 
(
    FLASH.ReProgram 0x000A0000--0x002FFFFF /Erase
    Data.LOAD.auto .\build\main.hex
    FLASH.ReProgram off

    Print "Application flashed..."
)
;========================================================================
; load application symbols
Print "Loading Application symbols..."
Data.LOAD.auto .\build\main.out /noCODE

Print "Application symbols loaded..."

;========================================================================
; breakpoint configuration

; use onchip breakpoints
map.bonchip

;========================================================================
; setup view

; Switch to high level view (only C, no assemler code)
Mode.HLL

; Set format of data values to hex and decimal
setup.var %Decimal %E

;========================================================================
; setup window configuration

DIALOG.YESNO "reset window configuration?"
entry &reswin
if &reswin
(
    TOOLBAR ON
    STATUSBAR ON
    FramePOS 28.125,16.071,,,Maximized
    WinPAGE.RESet
    
    WinPAGE.Create P000
    
    WinCLEAR
    WinPOS 103.63 0.0 52. 29. 0. 0. W001
    Register /Spotlight
    
    WinPOS 0.0 0.0 99. 44. 13. 1. W000
    WinTABS 10. 10. 25. 62.
    Data.List
    
    WinPOS 103.5 33.143 52. 23. 0. 1. W002
    WinTABS 21. 21.
    sYmbol.Browse.Function
 
    WinPOS 160.25 0.0 75. 49. 0. 0. W004
    Var.Watch
 
    WinPOS 160.25 54.571 77. 5. 10. 1. W005
    rt
    
    WinPOS 0.0 49.643 99. 7. 23. 1. W003
    WinTABS 0. 0. 0. 0. 0. 0. 0.
    Break.List
 
    WinPAGE.select P000
)

; Add reset toolbar
menu.REPROGRAM "bsp\toolbar.men"
  
;======================
;===  end of script ===
;======================

ENDDO

Thanks & regards,

Krishna

  • Hi Krishna,

    The *.cmm file is lauterbach's scripting language which is quite different from the scripting interface with CCS. Instead of trying to port it, I would simply look into using tools like uniflash:

    http://processors.wiki.ti.com/index.php/Category:CCS_UniFlash

    Thanks

    ki

  • Ki,

    thanks for quick response! not only I want to flash the application I want to debug the application using CCS. So I may need maintain same memory map for the application as it is in flash.cmm file. Pls let me know what settings I need to do in CCS?

    regards,

    krishna

  • Hi Ki,

    Hope you got a chance to look in to this email. Please let me know the solution to flash and debug the application using CCS5.x. At present the target board vendor only support with Lauterbach back scripts for debug and flash the application. As we don't have Lauterbach and we have XDS510 we need to use CCS5.x with XDS 510 to flash and debug the application I am developing.

    Pls let me know about this ASAP.


    Thanks & regards,

    Krishna

  • Hi Ki,

    Uniflash tool I downloaded, I didn't find XDS 510 interface with this tool... it has CC3x (UART) interface. To flash my application I need to use XDS 510 interface.

    Thanks & regards,

    Krishna

  • Kirshna - since you also want to debug the application, I would stick solely with CCS.

    I know very little (basically nothing) about Lauterbach *.cmm files so I can't really provide much help there but by taking a quick peek at it, it looks like it is configuring two regions for programming, both in internal flash. Internal flash is properly defined in the tms570ls3137.gel file. So starting a debug session for tms570ls3137 using that gel file (which should be used by default) will have set the debugger memory map correctly so you can flash your executable. I assume you are flashing an executable with debug symbols (*.out file) since you said you want to debug it and I can decipher from the *.cmm file that debug symbols and *.out files are referenced. Your executable should already have the information for the programmer to flash to the correct locations. While the debugger memory map will be properly configured by the gel file. 

    Thanks

    ki