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.

adapting GCC code for TI's compiler

Other Parts Discussed in Thread: RM42L432, HALCOGEN

hi

i am about to integrate a piece of code into an SPI application on a hercules RM42L432. This code is written so that it should be compatible to some different compilers using different struct attributes depended on compiler. 

the TI compiler is not one of them.

the code below is a piece that checks the compiler type

/* check for known compilers using the key symbols of which one should be defined */
#if !defined (__GNUC__) && !defined (__MSVC__) && !defined (__ADS__) && !defined (__REALVIEW__) && !defined(__TLR_USE_CUSTOM_COMPILER__)
  #error Unknown compiler type. (Check definitions in TLR_Types.h.)
#endif  /* __MSVC__, __GNUC__, __ADS__, __REALVIEW__ */


/* specific definitions for GNU C compiler */
#if defined (__GNUC__)
  /* tight packing of structure members */
  #define __TLR_PACKED_PRE
  #define __TLR_PACKED_POST  __attribute__ ((packed))
  /* redefinition for inline */
  #ifndef INLINE
    #define INLINE static inline
  #endif  /* INLINE */
#endif  /* __GNUC__ */

my first thought was to find a GNU compiler for the Hercules processor. So i started out building a project using CCSv6. 

I have not yet succeeded making a GNU compiled SPI functionality. i dont know what to do to make an SPI project (or any other) work with GCC. which include files to add and linkers etc. 

i anyone can guide me in that direction i would be happy. is it worth the effort to adjust halcogen code to fit GCC.?

or do i have any other solutions.

an other approach to my problem could be to correct the struct attributes to fit TI's compiler. but here im not very familiar with TI's compiler. 

what is the procedure for this approach saying that the attributes are the only thing that needs to be corrected?

would it help if i show some more code? there are quite a bunch of files.

thanks in advance

your help will be appreciated  

William