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.

Piccolo 2802X Flash Library sections error

I am working on integrating the TI Flash2802x_API_V200.lib into some code that will eventually emulate EEPROM on a flash sector.  The problem that I am getting is that everything compiles properly but at the end of the linking there is a warning that there is no matching section in my F28027.cmd.  The lines which it is complaining about refer to

   -lFlash2802x_API_V200.lib(.econst)
   -lFlash2802x_API_V200.lib(.text)

in my F28027.cmd file.  I've added the Flash2802x_API_V200.lib file to my project.  I've followed the instructions in the Flash2802x_API_Readme.pdf by

1) “Incl. Libraries (-l):” field under the Linker/Libraries tab in the Build Options menu is empty"

2) Check the “Resolve Symbols To First Library (-priority)” box under the Linker/Advanced tab in the Build Options menu

3) I've also ordered the linking order to be the V200.lib, followed by the device and peripheral linkers all using the large memory model.

4) My linker also has the following section added:

Flash28_API:
   {
    -lFlash2802x_API_V200.lib(.econst)
    -lFlash2802x_API_V200.lib(.text)
   }                   LOAD = FLASHD,
                       RUN = PRAML0, 
                       LOAD_START(_Flash28_API_LoadStart),
                       LOAD_END(_Flash28_API_LoadEnd),
                       RUN_START(_Flash28_API_RunStart),
                       PAGE = 0

It's almost as if it is not recognizing the library file sections as I can exclude the library from the build and the warning/compile errors do not change (there are no compiler errors just linker errors).  The library is included in the project and was added to the include path in the build options.  What needs to be done to remove this error?

 

  • Hi to all,

                 I'm facing the same problem as Jacob. I'm using CCS 3.3.81.28.

    The warnings are: 

    "C:\\tidcs\\c28\\Flash28_API\\Flash2802x_API_V200\\example\\Example_Flash28027_API.cmd", line 102: warning:
    no matching section
    "C:\\tidcs\\c28\\Flash28_API\\Flash2802x_API_V200\\example\\Example_Flash28027_API.cmd", line 103: warning:
    no matching section

    The warnings point to this definition in the SECTION:

    Flash28_API:
    {
    -lFlash2802x_API_V200.lib(.econst)//warning
    -lFlash2802x_API_V200.lib(.text)//warning
    }

    How can I solve this?

    Regards

    Gastón

  • Hi Gastón!

    Perhaps this post will be useful http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/157359.aspx

    Regards,

    Igor

  • Igor thsnks for the quick reply. The things is that I'm not familiar with the Flash_API yet and I try to understand the Example_Flash28027_API.pjt that comes with the SPRC848 (http://www.ti.com/tool/sprc848). There is a pdf with instructions to follow regarding the use of that library and how to be included in my proyect. There is a note in the header of the C file that says:

    NOTE: This example runs from Flash. First program the example
    // into flash. The code will then copy the API's to RAM and
    // modify the flash.

    When I compile the Example_Flash28027.pjt, this 3 warnings appear. why?

    I too found that thread and I don´t get it the "...if i complete the whole project" . What does he mean? How can I just simple test this Example_Flash28027_API.pjt?

    the map file shows length 0. According to the Example_Flash28027.pjt options (build options-->linker order tab) the library is there.

    Did I miss something?

    Regards

    Gastón

  • Hi Gastón!

    The author of post have written: "i found the reason, because my demo project haven't use the FLASH_API yes". Maybe this is predefined symbol which is needed to set in Project's properties?

    Regards,

    Igor 

  • I finally could eliminate the warnings regarding the SECTION by including in the build option-->linker tab the directions of the librarys, but now when I try to flash the program in the F28027 this error appears:

    Erase operation in progress...
    Flash API Error #24:
    The Erase operation failed the pre-compaction step.

    this error is avoided if (in the tools--->F28xx on-chip flash programmer) the program only is selected (not erase-program-verify). But when the application is running, suddenly it stop in this subroutine:

    /*------------------------------------------------------------------
    For this example, if an error is found just stop here
    -----------------------------------------------------------------*/
    #pragma CODE_SECTION(Example_Error,"ramfuncs");
    void Example_Error(Uint16 Status)
    {

    // Error code will be in the AL register.
    asm(" ESTOP0");
    asm(" SB 0, UNC");
    }

    why?...I don't know

    Regards

    Gastón

  • Hi Gaston!

    1 Perhaps the problem is at uncorrect option Erase Sector Selection.

    2 Into main C-file of project there are definitions like these: 

    #if FLASH_F28xxx
    #define FLASH_START_ADDR 0x300000
    #define FLASH_END_ADDR 0x33FFFF

    Maybe your current  "defines" are uncorrect.

    Regards,

    Igor

  • Igor,

             into the main C file there are definitions like this:

    #define FLASH_START_ADDR 0x3F0000

    #define FLASH_END_ADDR 0x3F7FF8

    #if (FLASH_F28027 || FLASH_F28025 || FLASH_F28023)
    SECTOR Sector[4] = {
    (Uint16 *)0x3F6000,(Uint16 *)0x3F7FF8,
    (Uint16 *)0x3F4000,(Uint16 *)0x3F5FFF,
    (Uint16 *)0x3F2000,(Uint16 *)0x3F3FFF,
    (Uint16 *)0x3F0000,(Uint16 *)0x3F1FFF,

    in the CMD of the example, the flash directions are:

    FLASHD      : origin = 0x3F0000, length = 0x002000

    FLASHC      : origin = 0x3F2000, length = 0x002000

    FLASHB      : origin = 0x3F4000, length = 0x002000

    FLASHA      : origin = 0x3F6000, length = 0x001F80

    BEGIN       : origin = 0x3F7FF6, length = 0x000002

    BEGIN is part of the FLASHA sector. The funny thing is even if I change the :

     #define FLASH_END_ADDR 0x3F7FF8 to #define FLASH_END_ADDR 0x3F7F80

    and 

    (Uint16 *)0x3F6000,(Uint16 *)0x3F7FF8 to (Uint16 *)0x3F6000,(Uint16 *)0x3F7F80

    the error persist.

    Looks to me that this example just burn my micro. I guess I have to replace it.

    The thing is, how can I know if this example works (NO BUGS). Someone from texas?

    Regards

    Gastón

  • Hi Gastón!

    Strange things...

    1 Perhaps this thread will be useful  http://e2e .ti.com/support/microcontrollers/c2000/f/171/p/21814/822232.aspx#822232

    2 I think you need to create own post with your issue.

    Regards,

    Igor

  • well yes... Igor, it is.

    I searched the forum for information about this issue and I too found that link you gave me.

    1) But let me ask you If you have worked with this library or the F28207?

    In the affirmative case: 

    1a) iF you know if this library has some bugs?

    I'm doing an skeleton of a bootloader, that is why I need the Flash API. I will use the SCI port to download data to the bootloader prog that will be in the FLASHA segment. My main prog will be in the FLASHD segment. 

    I have some doubts regarding how can I program the incoming data. 

    1b) programming by chunks or just programming the incoming data ?

    Regards

    Gastón

  • Hi Gastón!

    Unfortunately I didn't deal with practical use of Flash API library. Just I have some Flash API project for F28335 and I have analyzed it a little at free time because I had some interest of the banal aspect "How it works?".

    Regards,

    Igor 

  • Hi Gastón!

    BTW would you like to participate at this thread http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/283516.aspx? Maybe some useful thoughts will appear.

    Regards,

    Igor