I really don’t know what to do about this cleanly. Both files should NOT be edited, but they conflict.
d:\gcc\bin…/lib/gcc/arm-none-eabi/4.2.1/…/…/…/…/arm-none-eabi/include/stdint.h:84:
‘uint32_t’ has a declaration as ‘typedef long unsigned int uint32_t’
D:\MF\client_v4_2_comm\DeviceCode\include/tinyhal_types.h:60:
‘UINT32’ has a previous as ‘typedef unsigned int UINT32’
One INT32 is INT, the other INT32 is LONG. Needless to say, this causes problems.
Possibly because there are a few layers of abstraction built into GCC. I suspect that something gets messed up somewhere… This is the definition of int32_t out of the GCC headers:
/* Check if "long" is 64bit or 32bit wide */
#if __STDINT_EXP(LONG_MAX) > 0x7fffffff
#define __have_long64 1
#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
#define __have_long32 1
#endif
#if __have_long32
typedef signed long int32_t;
typedef unsigned long uint32_t;
#define __int32_t_defined 1
#elif __STDINT_EXP(INT_MAX) == 0x7fffffffL
typedef signed int int32_t;
typedef unsigned int uint32_t;
#define __int32_t_defined 1
#elif __STDINT_EXP(SHRT_MAX) == 0x7fffffffL
typedef signed short int32_t;
typedef unsigned short uint32_t;
#define __int32_t_defined 1
#elif __STDINT_EXP(SCHAR_MAX) == 0x7fffffffL
typedef signed char int32_t;
typedef unsigned char uint32_t;
#define __int32_t_defined 1
#endif
The msbuild thing doesn’t tell you what happened, only that a command failed. I then copy that command and execute it by hand to see the error message.
The link command can’t be executed from the solution folder, I had to CD to the build lib folder.
Secondly. The Microsoft.Spot.system.gcc.targets file lacked statements to set the path for GCC libs when using thumb2. It had this:
Now it tries to link but I get crap loads of link errors. I’m trying to pipe the errors to a log file so I can look at them, but the normal “>log.txt” addition to the command line doesn’t work…
Try to stub all functions and see if it compiles before you make changes. You do not have to use NETMF stubs, just copy/paste the same functions and empty them out fro GCC.
FWIW, this is one of my frustrations with C. Long, complicated mazes of #includes and typedefs that are nearly impossible to sort out. It’s not the languages fault, and it’s a function of it’s portability, but still.
Interrupts vectors should be in hardware specific startup template.
ST does not provide examples on GCC at least I couldnt find it except on CMIS library, where they put a GCC example that defines the startup sequence and the interrupt vectors.
Its located on:
STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7
Its a new version of the discovery examples.
Hope it helps. I will try install everything tonigth if I had time and help you with it. I dont know If I could find time to do it because my son is sick… By the way I receive my kit yersterday, and its great but it would be better to have female headers instead of the ones they put on the board…