2010-04-20 03:32 AM
Typedef bool C99 conflict in STM32F10x StdPeriph Lib V3.x.x
2011-05-17 04:48 AM
To be general, the solution would also have to cater for non-C99 compilers (which, I think, is the majority of embedded compilers?)
2011-05-17 04:48 AM
All of GCC, Keil/ARM, and IAR support C99 at least in so far as having <stdbool.h> and <stdint.h> headers, and these are the compilers directly supported by ST's peripheral and CMSIS libraries.
Moreover the library already uses <stdint.h> which is a C99 header also. At least a subset of C99 is supported by most compilers, and provision of these headers requires no modification to the compiler (although the stdbool.h would not have an intrinsic underlying _Bool type). For example, I use a third-party implementation of these for VC++ 2008 for compatibility which does not otherwise provide them). Even if I were not using a C99 compiler, the unnecessary incompatibility would be better avoided. My real question is how best to report the issue to ST so that it may be improved? I realise that I can fix it myself, but adding modifications to the library makes it cumbersome and error prone integrating future updates.