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.

TMS320F28377S: Hex 2000

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

I'm trying to convert a .out file to Intel hex format with hex2000.

Options script:

abc.out
-i
-o abc.hex
-fill 0xffff
-memwidth 16
-romwidth 16

and I get the output as following:

>> WARNING: section 'Dfu1ResetVector' at 080000h falls in unconfigured memory(skipped)
>> WARNING: section 'Dfu1RamFunc' at 080002h falls in unconfigured memory(skipped)
>> WARNING: section 'Dfu1Text' at 080a74h falls in unconfigured memory (skipped)
>> WARNING: section 'Dfu1Econst' at 080b74h falls in unconfigured memory(skipped)

Do I miss something in my option script?

thanks.

  • Hello

    I'm not seeing an issue with those options. You listed everything you're including when calling hex2000? You're not including a linker command file too? I ran those options on a F28377S example that uses flash and didn't see any warnings.

    Possibly try using a newer hex2000 from a newer compiler version, I tested using v18.1.1.LTS

    Can check out the hex2000 section in the compiler user guide: http://www.ti.com/lit/spru513

    Best regards
    Chris
  • I have several pages in the project to separate DFU from the application, and the warnings shows none of DFU sections is included in the hex file.

    I do define those memory sections in linker script

    MEMORY
    {
    PAGE 7 :
       RAMLS0_5		: origin = 0x008000, length = 0x003000
       RAMGS456		: origin = 0x010000, length = 0x003000
    
       // Flash sector_A
       DFU1_RESET	: origin = 0x080000, length = 0x000002
       DFU1_TEXT	: origin = 0x080002, length = 0x001FFE
    }

    According to spru513p 12.15:

    unconfigured memory error:

    Description: The COFF file contains a section whose load address falls outside the memory range defined in the ROMS directive.

    Action: Correct the ROM range as defined by the ROMS directive to cover the memory range needed, or modify the section load address. Remember that if the ROMS directive is not used, the memory range defaults to the entire processor address space. For this reason, removing the ROMS directive could also be a workaround.

    Why such error still occurs while I don't have ROMS directive in my option file?

    Thanks.

  • Hello

    You're getting the error because you are setting these memories to "page 7". F28377S uses unified memory, so there isn't separate pages. As far as I'm aware, the hex2000 only looks as "page 0", so that's why you're getting the error. I confirmed this with my local example which was using "page 0" and I changed it to "page 7" resulting in the unconfigured memory error.

    Best regards
    Chris
  • Well the reason why I'm doing so is that I want to allocate the same RAM space to DFU and application.

    Of course I can define the flash section in page 0 and ram section in page 7, but I don't know how to load a .text section into a section in one page while run at a section in another page.

    Statements like this will definitely fail.

    Dfu1RamFunc:
    {
    	DfuFlash.obj(.text)
    	F021_API_F2837xS_FPU32.lib(.text)
    } > DFU1_TEXT, PAGE = 0, LOAD_START(_Dfu1LoadStart), LOAD_END(_Dfu1LoadEnd), RUN = RAMLS0_5, RUN_START(_Dfu1RamStart), PAGE = 7

    And this one doesn't work too.

    Dfu1RamFunc:
    {
    	DfuFlash.obj(.text)
    	F021_API_F2837xS_FPU32.lib(.text)
    } > DFU1_TEXT, PAGE = 0, LOAD_START(_Dfu1LoadStart), LOAD_END(_Dfu1LoadEnd)
    
    Dfu1RamFunc: RUN = RAMLS0_5, RUN_START(_Dfu1RamStart), PAGE = 7

    Is there any suggestion about how to get this done.

    Thanks!

  • Hello

    There aren't separate pages, so you should put all the memories on the same page.

    Try something like the following and see that works:

       Dfu1RamFunc      : LOAD = FLASHA,
                          RUN  = RAMLS0_5
                          RUN_START(_Dfu1RamStart),
                          LOAD_START(_Dfu1LoadStart),
                          LOAD_SIZE(_Dfu1LoadSize),
                          PAGE = 0,
      {
         -l DfuFlash.obj(.text)
         -l F021_API_F2837xS_FPU32.lib(.text)
      }

    Also for reference, linker details can be found in assembly tools guide: http://www.ti.com/lit/spru513 

    Best regards

    Chris

  • My question is that DFU runs only at power on and checks whether the application image is correct,

    and then application takes over the control and reclaims all the memory DFU used (.text, .ebss, ... at RAM).

    To do so, I need linker to allocate code of DFU and application to run at same RAM section.

    If I put all the memories on the same page, those RAM used by DFU running its code cannot be allocated to application (overlapped error).

  • Hello

    Ok, so you want them (DFU or app) be assigned to use the same RAM. Have you tried adding the Dfu1RamFunc as I described above, then have a second "ramfunc" linker section (with load, run, etc, see .TI.ramfunc in any C2000Ware example). This should load and run your DFU, then once you get to the app, you run from main app flash, and then call "memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);" as part of your main app to copy the items in your application to RAM that you need. I believe this should work.

    Best regards
    Chris
  • If the two section is "RUN" at the same ram space, linker will allocate them in different fragment of that section.

    To overlap them, I need two different section on the same ram space. If both section are in the same page, overlapping warning occurs.

  • Hello

    That's right, that's how it works. The linker has to allocate the data to specific addresses and can't allocate then free memory. Unfortunately, I don't believe what you are trying to do is possible.

    Best regards
    Chris