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.

Porting C6713 project (ROM boot) to DSP/BIOS

I have been trying to port an existing project to DSP/BIOS, and I am having difficulty getting the link to work properly.  The old/existing project uses a secondary boot loader to copy the program from FLASH to IRAM.  It has memory regions set up for the interrupt vectors (0 - 0x1ff), the boot loader (0x200 - 0x3ff), and the rest of IRAM (0x400+).  We program the FLASH by loading the firmware through the JTAG (file->load program), and running its built-in FLASH programmer.  This fimware-based programmer parses the HEX file and programs the FLASH.  That works fine.

The DSP/BIOS version should be identical, except for using the BIOS for task management.  I have gotten the DSP/BIOS version running without a boot loader, loading it with the JTAG emulator.  Now I'm trying to link in a boot loader, and can't get it to work properly.  I have tried following the steps indicated in spra999, but that prevents the JTAG file->load program from working.  I tried moving the internal BIOS sections from FLASH to IRAM (0x400+), but I get errors placing the boot loader code.  Apparently, an 0x40 byte .vers section is being placed at address 0.  I can't seem to relocated that using my user CMD file (which does include the generated one).  What am I doing wrong here?

Also, it's unclear what to do with the .hwi_vec section.  Spra999 doesn't say anything needs to be done with it.  However, if I don't do anything with it, it ends up being placed at some random location.  Does DSP/BIOS move ISTP to point to the hwi_vec section?

  • There is a Rev A of that same doc that discusses the hwi_vec placement.  Please see the latest revision.

    It should have a load address in FLASH_REST and a run address in RAM.  Yes, this is the interrupt vector table and BIOS will reconfigure ISTP to point to it.  It will have entries that are configured at build time (i.e. through the BIOS config GUI) which is why it needs a load address in flash.

  • That's what I figured.  It just wasn't clear that the BIOS would take care of ISTP for me.  What about the .vers section?  It gets placed at address 0, which conflicts with the boot loader.

    The more I think about it, the more it looks like I cannot use the file->load program menu option with a COFF file generated with this method.  Previously, I didn't care about load addresses, since I simply copied 256K (minus 1K) from FLASH to RAM at startup.  I built the COFF file with my CMD file placing everything into IRAM.  It doesn't look like the DSP/BIOS generated CMD file supports this.

  • The .vers section is of type "copy section" if you look in the map file generated by the linker.  That means that although it's present in the out file it's not something that's actually been allocated in the memory map nor is it loaded to the target.  BIOS is just using a simple linker trick to be able to embed information on the version of BIOS you're using into the out file.  It doesn't take up any space on the target.

  • Looking at the map file and the HEX file, the version information appears to be taking up space.  The map file indicates that .vers takes up 0x40 bytes at address 0.  My boot loader code gets placed at 0x200, but it needs to be at 0.  The map file indicates a run address of 0, but the code gets placed at address 0x200 in the HEX file.  There does not appear to be anything in the HEX file at address 0.

    Maybe this load address/run address mismatch has me scratching my head.  Is there any way to tell the linker to place the boot code at load address and run address 0?

  • The fact that your boot code has a run address of 0 is proof that .vers is not actually taking up space at address 0x0.  Otherwise those 2 items would be in direct conflict.

    Normally one does something simple like this in the linker command file:

    SECTIONS
    {

       bootloader > FLASH_BOOT

    }

    The above syntax means that both the load and run address are the same and that it should be allocated in the FLASH_BOOT memory.  If you added an extra "LOAD=..." statement then you'll end up with separate load/run addresses.

    If this doesn't answer your question please post some snippets from your code and linker command file that shows me how you're allocating things.  Then I can give you more specific advice.

    Brad

  • Changing:

    bootloader : LOAD=BOOT_RAM, RUN=BOOT_RAM

    to:

    bootloader > BOOT_RAM

    seems to have fixed things.  Without changing any of the code, the boot loader (which was at 0x200) gets put to 0 now.  Thank you for the help.

  • Hello

    I'm sorry I think I left this post in other link I didn't want to post twice.

    I'm new in work with DSP ti.  I've been trying  to work in a boot loader with project  DSP/BIOS  and  I can't get it  works  I've followed  the steps indicated in spra999,may 2006  and I even tried to download the application but the link is broken http://www.-s.ti.com/sc/psheets/spra999a1/spraa999a1.zip.

    when I defined the memory segments I get some problems:

    warning: load address of uninitialized section .hwi ignored

    error: can't allocate .IRAM$heap (sz: 00008000 page: 0) in IRAM (avail:
                00006938)

    when I put a new linker command file whit these lines

    -l  playcfg.cmd

    SECTIONS

        .boot_load : LOAD=FLASH_BOOT, RUN =BOOT_RAM

    }

     warning: load address of uninitialized section .hwi ignored
     warning: load address of uninitialized section .boot_load ignored
       error: can't allocate .IRAM$heap (sz: 00008000 page: 0) in IRAM (avail:
                00006938)

    and the secondary bootloader  have I to write a .s62 file ?

    I'm a litle bit confused, can you post a simple project with DSP/BIOS whit all this to guide me ? I've saw many forums but I can't do it correctly.

    especially this http://wiki.davincidsp.com/index.php/Flashing_the_C6713_EVM

    I'd really good aprecciate your help

     

    Vanessa  Gamero

     

  • Here's the zip file that goes along with spra999a:

    http://www.ti.com/litv/zip/spra999a

    This error

     warning: load address of uninitialized section .boot_load ignored

    means that you have not put any code into that section.  In C code you would need

    #pragma CODE_SECTION(myfunc, .boot_load)

    In assembly you would need:

       .sect boot_load

    (That's off the top of my head, but I think I have the right notation!)

    Brad

  • Thanks  for the link  I've build the dsp/bios project that  is in spra99a\rf3_dsk6713_boot_with_table\referenceframeworks\apps\rf3_table_boot\dsk6713 called app.pjt  and I get 7 errors then I compared that project with mine and I've saw some diferences in memory sections definitions IRAM it started  at 0x00000400 and len 0x0002fc00 in instead of  the paper  in wich len is : 0x1fc00 that solved  the problem I posted ,  I tried to add boot_c671x.s62 and c6713_emif.s62 to my project  and boot_c671x.h62 in my project folder and I get this:

    undefined                        first referenced
     symbol                              in file
    ---------                        ----------------
    ___binit__                       c:\ti\myprojects\play\Debug\boot_c671x.obj

    >>   error: symbol referencing errors - './Debug/play.out' not built

     

    -the secondary bootlader boo_c671x.s62 in the paper have a copy table that's not in app project  how can i get this?

    when I saw  play.map

    address        name

    .....

    UNDEFED ___binit__
    00000a00   ___bss__
    00000ec8   ___cinit__
    00000400   ___data__
    00000400   ___edata__
    00000ec8   ___end__

    .....

     

    my project is named play  and it simple it only turn on leeds .

    I'd really appreciate  your help

    Vanessa

     

     

  • yes, I think that can explain it for the boot_load section, but how about the .hwi section?

    warning: load address of uninitialized section .hwi ignored

    When I set this section's run address to DDR2/IRAM, and its load adress to FLASH, the map file gave it a random run address of 0xffffffff, and code length is 0.

    While I changed its run adress to FLASH, the warning is gone, but the code length is still 0.

    Can I ask what's the relation between .hwi section and .hwi_vec section?  ISTP obviously points to .hwi_vec, am I right?  then why is it necessary that BIOS create the .hwi section?

    I would appreciate your reply.

    Chen Jie

    PS. I am using dm6437evm board.