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.

FEE for RM48

Other Parts Discussed in Thread: HALCOGEN

Hi,

I'm working with RM48HDK and just downloaded the new HalCoGen 3.8 with FEE support for RM48.

To build the first test program I have:

- istalled the F021 v02.00.01 library on my system

- enabled FEE driver in Halcogen

- added to my project paths the include folder of F021

At this point the program compiles flawless. Here the first question: why CCS does not generate errors about the unresolved external symbols? Note that I have not linked the F021 library at this point.

After adding the required:

#include "ti_fee.h"

the compiler gives and error about the ridefinition of "boolean" typedef. As far as I know "ti_fee.h" is required to use the F021 library functions (TI_Fee_MainFunction, TI_Fee_GetStatus, TI_Fee_Init, ecc). How to solve this conflict?

Thank you

  • Hi,

    I experimented a bit with the procedure you followed, but I could not find the exact same errors as you. I am using the same tool versions and CCSv5.5 with the stock compiler (5.1.1) but did not need to manually include the "ti_fee.h".

    The procedure I followed was based on this page, and I used the baseline example source file example_TI_Fee_Write_Read.c with all device drivers disabled in HalCoGen except for the FEE Driver.

    After generating all the code in HalCoGen, I copied the contents of the C source file above to the appropriate regions of sysmain.c, then I went to CCS, modified the include paths appropriately (but did not yet include the library) and clicked build.

    Apart from the expected "unresolved symbols remain" due to the missing library, I also found several warnings about a Fapi_GlobalInit macro improperly defined in the file <Compatibility.h> and the conflicting Boolean macros between the compiler's <stdbool.h> and a Flash API include file <Types.h>. Check the attached build log I got before I added the library path and the library to the project options.

    After adding the library settings, the project built fine.

    To solve the warnings, you would probably need to contact the experts in the Hercules forum, as they are the maintainers of both the HalCoGen example codes and the Flash API software package.

    Hope this helps,

    Rafael

    (edit) I guess someone moved this thread already to the Hercules forum. Thus I think you are already in the right place.

  • Matteo,

    Your post has been forwarded to the FEE library owner in Hercules.   The owner will get back to you soon. 

  • Hi Matteo,

    When you say ""after adding the required #include ""ti_fee.h" file, where is the file added?

    TI_Fee_MainFunction, TI_Fee_GetStatus, TI_Fee_Init are FEE API's. All Flash library API's start with Fapi_*. You would get  errors about the unresolved external symbols when you do not include corresponding F021 library(F021_API_CortexR4_LE.lib, etc).

    Regarding the compiler warning noticed by Rafael, an example is provided in HALCoGen, to overcome it.

    Goto HALCoGen->Help->Help Topics->Examples->example_TI_Fee_Write_Read.c

    Regards,

    Vishwanath Reddy.

    If my reply answers your question please click on the green button "Verify Answer".

     

  • Hi All,

    I'm actually working with the compiler 5.0.7 and with the Flash API 02.00.01.

    The problem is mostly solved: I've seen just now the new example added in HalCoGen. My error was generated by the absence of

    #define _BOOLEAN_DECLARED

    after the inclusion of "ti_fee.h"

    adding the above define it compiles. I have a lot of warning about the ridefinition of some other typedef (uint32, ecc) but these are only warning and I can clean them off adding some other #define after the inclusion of "ti_fee.h".

    Nevetheless I've notice that ti_fee.h must be included before sys_common.h, elsewhere, as expected, the above #define workaround does not work.

    Two warnings remain about the ridefinition of "TRUE" and "FALSE" in Platfom_Types.h and in hal_stdtypes.h.
     Here the values are defined diffently (0/1 vs true/false). Two strange things appens about this redefinition:

    - why it generates only a warning and not an error, as it shoud, beeing the definitions incompatible

    - why the second includes, which is enclosed in #ifndef,  is considered by the preprocessor (his type is yet defined so #ifndef shoud be false)

    Matteo

  • Hi Matteo,

    Please remove the statement #include "sys_common.h" from sys_main.c file. This should remove all warnings except #1921-D white space is required between the macro name "Fapi_GlobalInit" and its replacement text Compatibility.h /LS3137/flash line 49 C/C++ Problem"

    Regards,

    Vishwanath Reddy.

    If my reply answers your question please click on the green button "Verify Answer".
  • Hi Vishwanath,

    removing the sys_common.h include from the main does not fix the warnings probably because my project includes a lot of other driver (currently I'm doing the first tests but my target is to include FEE functionality inside an existing project that uses a lot of drivers).

    Nevertheless I can live with this warnings and for the moment I consider the problem solved, until the next F021 release will fix the issue.

    Thank you