We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi.
Long time professional on competitors products, I'm not experimenting with the uVision IDE and STM32F3 Discovery board.
First thing for me is understanding how to setup a project, so I started a new project. I have replicated the structure of the demo project, including all the necessary inclusion paths.
The problem I have is that in usb_type.h (42) there is this snippet typedef enum { FALSE = 0, TRUE = !FALSE }
bool;
Which triggers #65: expected a ";" error on line 45, and a warning #64-D: declaration does not declare anything
I did every possible compare of my project and the demo one from ST and I can't find any difference in include paths, include paths' hierarchy, included files or anything else able to justify this.
I'd really appreciate some help here. Thanks
usb_type.h of the problem comes from ST's "STM32_USB-FS-Device_Lib_V4.0.0", not from Keil's.
STM32_USB-FS-Device_Lib_V4.0.0\Libraries\STM32_USB-FS-Device_Driver\inc\usb_type.h
It suggests ST's code quality, well ;-)
Tsuneo
Life gets interesting if the code already has some #define for TRUE and FALSE.
Yeah I know it's ST stuff, but ST has its own project for uVision that are working. I tried building my own one, and I have this problem.
Had to remove all the USB stuff.
As Per said, you should have another FALSE/TRUE/bool define in your header file. And the #include of the header file is placed before the USB headers from ST. Swap the order of #includes, and you'll see similar error on your header file.