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.

memcpy - _RamfuncsLoadSize undefined

Other Parts Discussed in Thread: TMS320F2802, CONTROLSUITE

Hi there,

while trying to program with my TMS320F2802 on flash, I keep facing an error when calling memcpy(). I'm using the "F2802.cmd" file and the apperently not working code line is following:

memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

In the console I get the message:

 undefined         first referenced
  symbol               in file     
 ---------         ----------------
 _RamfuncsLoadSize ./main.obj      

error #10234-D: unresolved symbols remain

In my opinion it should be defined in the linker command file as 'RamfuncsRunStart' and 'RamfuncsLoadStart' are defined there.

Can anyone please help me out?

  • In your linker command file you should see something like this:

    ramfuncs : LOAD = FLASHA,

    RUN = RAMM0,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_SIZE(_RamfuncsLoadSize),
    RUN_START(_RamfuncsRunStart),
    PAGE = 0

    The region related symbols also need to be "extern" in your program:

    extern uint16_t RamfuncsLoadStart;
    extern uint16_t RamfuncsLoadSize;
    extern uint16_t RamfuncsRunStart;

    Please take a look in the in the example project "Example_2802x_Flash" under device support in controlSUITE.  

    Regards,

    Richard

  • Thanks for the reply but I already tried this and it didn't work either.

    Finally I got it working but not with the linker command file I wanted to. I used a document from Azim found here (at the bottom):

    e2e.ti.com/.../1031767

    But why can't I find the section with ramfuncs in the "F2802x_Headers_nonBIOS.cmd"? And can you also explain what the problem was with my previous linker command file "F2802.cmd"?

  • if you look closely, the F2802x_Headers_nonBIOS.cmd contains the registers locations of your processor. The F2802.cmd contains the memory Flash and Ram locations and other section. This last cmd should contain the ramfuncs.
    Gastón
  • Oh thanks, that's interesting! Now it makes kind of sence :)

    Found some documentation (for anyone who's still searching: 1, 2).

    Thanks again for helping me out!!