SVN 2168 adds a new test for stdint.h being included. That test fails on IAR/MSP430X despite that file being present.
Compiling a file that includes FreeRTOS.h produces the error: "Fatal Error[Pe035]: #error directive: Read the instructions in FreeRTOS/source/stdint.readme if stdint.h is not provided with your compiler or you are building with standard libraries excluded (for example, with -nostdint in GCC). B:\src\FreeRTOS\include\FreeRTOS.h 84".
IAR does provide stdint.h, and it is included by the project successfully. However, it doesn't define UINT32_MAX so the test fails and the #error is produced. I don't know if that's the fault of the IAR include files, or FreeRTOS is using an incorrect test.
The workaround is fairly simple: define UINT32_MAX in the project options. But, I'm not sure that's the correct solution.
Hmm. I already checked with IAR/MSP430X and didn't get a problem. I just rechecked with the compiler set to C89 and C99 and again didn't have any problem. Strictly speaking I think the stdint.h is only mandated for C99, but my testing so far has shown it present with all 14 compilers used by FreeRTOS bar one, which was the old C18 PIC18 compiler.
Which version of the compiler are you using? Can you determine which stdint.h it is actually including and attach it to this ticket?
Reference to your previous ticket - are you still building the code as C++ rather than C? Maybe that could be the difference?
Regards.
That sounds like the IAR stdint.h is not compliant (or the MSP430 has no 32 bit unsigned type.)
You're right - it works correctly when compiling as C, but fails as C++.
The stdint.h file does have a definition of UINT32_MAX, but it's wrapped in "#ifdef INT32_T_TYPE" and that doesn't seem to be defined anywhere. So, it's not seeing the definition. I don't know how it works for C.
Is there a better test that can be used for C++?
I'm using IAR Embedded Workbench for MSP430 v 5.60.1.
stdint.h has the following comments:
/* stdint.h standard header */
/* Copyright 2003-2010 IAR Systems AB. */
and
/*
* Copyright (c) 1992-2009 by P.J. Plauger. ALL RIGHTS RESERVED.
* Consult your license regarding permissions and restrictions.
V5.04:0576 */
Thanks,
Graham
Last edit: Graham Menhennitt 2014-01-20
If I understand you correctly, it is finding stdint.h and stdint.h does include the necessary types - so it is only the guard around the #error that is causing the problem.
If that is the case then maybe it would be best to just remove the #error altogether. The release candidate #2 code does not have the #error anyway - it is only in svn as a 'nice to have' afterthought.
The only project I had a problem compiling with the dependency on stdint.h were those from one particular manufacture that that had the -nostlib GCC setting on by default. Removing that command line option allowed them to build too.
Regards.
The code (not yet checked in) has the #error removed and replaced with a verbose comment thus:
/*
*/
Regards.
[as an aside, the support forum is the best place to discuss these things, especially in code that is not yet released. your time spent in providing feedback is greatly appreciated]