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.

the puzzle for remote updating dsp program through RS232

problem description:

i want to update the dsp program through RS232 not JTAG for maintenance purpose. following some papers suggestion, i can updating program successfully now. However, there has one question makes me uncertainty. so i want some one can give me some suggestion.

i use "hex2000 contro.out -a  -map RemoteUpdate. map -o RemoteUpdate. hex -boot  -sci8" command to convert the .out file to .hex file in boot table format. then using a program writing in vc to resolve it and send each program section to dsp.  the dsp has a program receiving it and then writing it to the destination flash space. when all sections transfered,  reboot the dsp to finish the updating process.

from the map file created by hex2000, it seems like this

OUTPUT TRANSLATION MAP
--------------------------------------------------------------------------------
00000000..003fffff  Page=0  Memory Width=16  ROM Width=16
--------------------------------------------------------------------------------
   OUTPUT FILES: sci.txt [b0..b15]

   CONTENTS: 00000000..000009a6   BOOT TABLE
                        Flash28_API : dest=00320000  size=00000560  width=00000002
                       .cinit : dest=003381fb  size=00000042  width=00000002
                       .text : dest=00338000  size=000001fb  width=00000002
                        codestart : dest=0033fff6  size=00000002  width=00000002
                        ramfuncs : dest=00320560  size=00000169  width=00000002
                        csmpasswds : dest=0033fff8  size=00000008  width=00000002
                        csm_rsvd : dest=0033ff80  size=00000076  width=00000002

--------------------------------------------------------------------------------
00000000..003fffff  Page=1  Memory Width=16  ROM Width=16  "*DEFAULT PAGE 1*"
--------------------------------------------------------------------------------
   NO CONTENTS

question:

In map file , it only lists the program sections in page 0. and the hex file has  the corresponding  blocks which hold the byte stream for each program section.

both in map file and hex file , i can' t see any information about data sections in page 1.for example, the information including in cmd file

.bss   :> l1saram, page = 1

.stack :>m1saram,page = 1

don't show in this map and hex file at all !!

so how dsp to initialize the ram and make .bss section location in l1saram ? because i don't tell dsp how to do this, i only download the program sections into the flash.

sorry for my poor english writing,[:)] 

  • Hello -

    Have you gone through the application note titled "TMS320F281x Boot ROM Serial Flash Programming"? In my opinion this is one of the best application notes which describes step by step flash programming over SCI. If nothing else this will offer you lot of clues and ideas. Good luck

    http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=spraaq2 

  • Lei,

    .stack and .ebss are uninitialized sections, there is no need to load anything into these memory areas. Therefore the hex2000 utility is working correctly, when it just extracts the initialized sections from the *.out file into the *.hex file.

    If your project contains global variables and you have initialized them (e.g. int x = 3;), then 'x' will be a part of .ebss and the initial number '3' goes into section .cinit. Now, when you start your code, the first function, which is executed is the c-startup function "_c_int00" . This function will copy all initial values from .cinit to .ebss (assuming your project has been compiled with option "run time AutoInitialization(-cr).

    No need to worry, hex2000 is doing the right thing.

    Regards.

    PS:  I guess you know that you first have to load the flash based sections into RAM, then call the FLASH-API functions to reprogram the FLASH from withing your application, before you can execute the new code.