2010-08-13 07:28 AM
uint8_t definition
2011-05-17 05:02 AM
IT DEPENDS ON YOUR LIBC
On codesourcery's arm-2010q1 lite it's in arm-none-eabi-include/stdint.h .line 42 typedef unsigned char uint8_t ;
I bet this helped you a lot! There are tools for searching for strings in files, you know.2011-05-17 05:02 AM
but this line from the stdint.h
typedef __UINT8_T_TYPE__ uint8_t;
There is no stdint.h file in the STM32F10x_StdPeriph_Lib v3.3.0 download dated Apr-2010:http://www.st.com/stonline/products/support/micro/files/stm32f10x_stdperiph_lib.zip
- so you must be looking at an earlier version, or something toolchain-specific. Note that, by convention, names in ALL CAPITALS are preprocessor #defines - so have you searched for a #define __UINT8_T_TYPE__ ? Any decent IDE should have a ''Go To Definition'' facility - have you tried that...?2011-05-17 05:02 AM
Hi,
in stdint.h you this definition
typedef unsigned char uint8_t;
Cheers,
Dragan
2011-05-17 05:02 AM
''in stdint.h you this definition
typedef unsigned char uint8_t;''
As I just noted, there is no stdint.h anywhere in the ST Library! Therefore any stdint.h that you may have is specific to your particular (unspecified) toolchain - and is clearly not the same as the one in the OP's (unspecified) toolchain!2011-05-17 05:02 AM
The OP is likely using IAR
stdint.h /* Fixed size types. These are all optional. */ #ifdef __INT8_T_TYPE__ typedef __INT8_T_TYPE__ int8_t; typedef __UINT8_T_TYPE__ uint8_t; #endif /* __INT8_T_TYPE__ */ Seeing as it is prefaced with an #ifdef, one might reasonably assume that it is there to allow the user to override the normal setting for whatever bizarre reason, or be able to define them as a command line option to the compiler. In either case, if it is not defined the typedef never occurs, so you are left to explicitly typedef them yourself in your main code, or in an include a file you pull into the project. The compiler might also have it's own defaults. Looking at some of the objects, __INT8_T_TYPE__ is ''signed char'', and __UINT8_T_TYPE__ is ''unsigned char''2011-05-17 05:02 AM
2011-05-17 05:02 AM
''the original declaration must be a part of an object file...''
No, of course it isn't! Typedefs (and #defines) are purely at the Source code level!''... included by the compiler'' The Compiler does not ''include'' object files - that is the Linker's job!