cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade Project STM32F1xx UV2 to UV5 Error stdbool

faza
Associate II
Posted on August 01, 2014 at 16:52

Hello,

i'm Fabien and i'm a beginner with UV5 and STM32 and i need to modify a project but i have a 64bit windows so i need use UV5 with a new lib stm32f10x.h.

I can change my project but i have a lot of error with the stdbool.h (see below).

I don't understand in my code i have &sharpinclude <stdbool> but i always have these errors. In the different forum,  I see that there is a problem with that but i don't understand the solution. anybody can hepl me?

Thank

Rebuild target 'OU399'

compiling main.c...

compiling Clavier.c...

Fonctions_Principales\Clavier.c(37): error:  &sharp20: identifier ''BOOL'' is undefined

  extern BOOL TIMEOUT_texto;

Fonctions_Principales\Clavier.c(658): error:  &sharp20: identifier ''TRUE'' is undefined

                else if((Touche_precedente!=ToucheEntree && ToucheEntree<=touche_9) || TIMEOUT_texto==TRUE )

Fonctions_Principales\Clavier.c: 0 warnings, 2 errors

compiling RFID.c...

compiling Zigbee.c...

Fonctions_Principales\Zigbee.c(26): error:  &sharp260-D: explicit type is missing (''int'' assumed)

  extern waitDiezKeyIsPressToContinue(void);

Fonctions_Principales\Zigbee.c: 0 warnings, 1 error

compiling lcd.c...

compiling Fonctions_globales.c...

compiling IHM.c...

Fonctions_Principales\IHM.c(111): error:  &sharp20: identifier ''FALSE'' is undefined

        bool bAdmin = (strcmp((const char*)UserStatut,''ADMIN'') ? FALSE:TRUE); 

Fonctions_Principales\IHM.c(111): error:  &sharp20: identifier ''TRUE'' is undefined

        bool bAdmin = (strcmp((const char*)UserStatut,''ADMIN'') ? FALSE:TRUE); 

Fonctions_Principales\IHM.c: 0 warnings, 2 errors

compiling CTDPE.c...

TestsElectriques\CTDPE.c(324): error:  &sharp20: identifier ''FALSE'' is undefined

        bool        erreur_continiutee=FALSE;

TestsElectriques\CTDPE.c(412): error:  &sharp20: identifier ''TRUE'' is undefined

                  erreur_continiutee=TRUE;

TestsElectriques\CTDPE.c(425): error:  &sharp20: identifier ''TRUE'' is undefined

                  erreur_continiutee=TRUE;

TestsElectriques\CTDPE.c(441): error:  &sharp20: identifier ''TRUE'' is undefined

                                erreur_continiutee=TRUE;

TestsElectriques\CTDPE.c(450): error:  &sharp20: identifier ''TRUE'' is undefined

              if(erreur_continiutee==TRUE)

TestsElectriques\CTDPE.c: 0 warnings, 5 errors

compiling CTDRB.c...

compiling Communication_implant.c...

TestsElectriques\Communication_implant.c(29): error:  &sharp20: identifier ''BOOL'' is undefined

  extern volatile BOOL TIMEOUT_texto;

KB: Unexpected type: 0

error type>(41): error:  &sharp20: identifier ''FALSE'' is undefined

  bool CONVERSION_ADC_TRAME_IMPLANT=FALSE;

TestsElectriques\Communication_implant.c(55): error:  &sharp20: identifier ''TRUE'' is undefined

                if(CONVERSION_ADC_TRAME_IMPLANT == TRUE)

TestsElectriques\Communication_implant.c(114): error:  &sharp20: identifier ''TRUE'' is undefined

                        CONVERSION_ADC_TRAME_IMPLANT = TRUE;

TestsElectriques\Communication_implant.c: 0 warnings, 4 errors

compiling ADC.c...

Gestion microcontroleur\ADC.c(99): error:  &sharp20: identifier ''ADC1_2_IRQChannel'' is undefined

        IRQ_ADC.NVIC_IRQChannel=ADC1_2_IRQChannel;

Gestion microcontroleur\ADC.c(127): error:  &sharp20: identifier ''FALSE'' is undefined

        CONVERSION_ADC_TRAME_IMPLANT=FALSE;

Gestion microcontroleur\ADC.c: 0 warnings, 2 errors

compiling Timers.c...

Gestion microcontroleur\Timers.c(43): error:  &sharp20: identifier ''BOOL'' is undefined

  BOOL TIMEOUT_texto;

Gestion microcontroleur\Timers.c(90): error:  &sharp20: identifier ''TRUE'' is undefined

                TIMEOUT_texto=TRUE;

Gestion microcontroleur\Timers.c(160): error:  &sharp20: identifier ''FALSE'' is undefined

        TIMEOUT_texto=FALSE;

Gestion microcontroleur\Timers.c(218): error:  &sharp20: identifier ''FALSE'' is undefined

        TIMEOUT_texto=FALSE;

Gestion microcontroleur\Timers.c: 0 warnings, 4 errors

compiling RTX_Conf_CM.c...

assembling startup_stm32f10x_hd.s...

compiling system_stm32f10x.c...

compiling misc.c...

compiling stm32f10x_rcc.c...

compiling stm32f10x_usart.c...

compiling stm32f10x_adc.c...

''.\Obj\Blinky.axf'' - 20 Error(s), 0 Warning(s).

Target not created

#stm32f10xx
9 REPLIES 9
Posted on August 01, 2014 at 17:20

uV4 runs fine on 64-bit Windows

You'd perhaps want to review what include files you're using, and the Project settings for Include Paths. I'd also recommend downloading your own copy of the STM32 Standard Firmware Library (STM32F1 v3.5.0) and using that, rather than whatever stale stuff Keil bundled.

#include <stdbool> or #include <stdbool.h>, where's it pulling that from? Check the dependency tree for files that supposedly pull it in.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zzdz2
Associate II
Posted on August 01, 2014 at 17:28

I don't know what are these UV2 and UV5 but instead of <stdbool> you can try this:

typedef enum {FALSE = 0, TRUE=1} BOOL;

faza
Associate II
Posted on August 01, 2014 at 17:35

Hi clive1,

yes UV4 works well in windows 64bit but it's same problem. My project works fine with windows 32 and UV2. But my informatic departement want upgrade all computer to 64bit :( 

So the next week, i take your recommendation and i try to find the dependency tree. I hope to find it.

Thanks good we

 

From: clive1

Posted: Friday, August 01, 2014 5:24 PM

Subject: Upgrade Project STM32F1xx UV2 to UV5 Error stdbool

uV4 runs fine on 64-bit Windows

You'd perhaps want to review what include files you're using, and the Project settings for Include Paths. I'd also recommend downloading your own copy of the STM32 Standard Firmware Library (STM32F1 v3.5.0) and using that, rather than whatever stale stuff Keil bundled.

#include <stdbool> or #include <stdbool.h>, where's it pulling that from? Check the dependency tree for files that supposedly pull it in.
faza
Associate II
Posted on August 01, 2014 at 17:44

Yes it works well !

I don't understand why i can't add directly the lib but this solution is Ok for me thanks!

UV5 is Keil compiler Version5

Posted on August 01, 2014 at 17:49

I'm surprised uV2 supports Cortex-M3 parts, as I recall when I started STM32 development we used uV3.

If the file tree view you should be able to toggle the [+] for the source files and see all the dependent files, from there you can open them, or look at the properties to see where they are being pulled from.

C:\Keil474\ARM\ARMCC\include\stdbool.h ??

No reference to upper case TRUE and FALSE

Review also the Template projects for Keil (MDK-ARM) supplied by ST in their current library release. You might need to port 2.x.x (C:\Keil\ARM\Examples\ST\STM32F10xFWLib) code to 3.5.0 (STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template\MDK-ARM\readme.txt)
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
faza
Associate II
Posted on August 01, 2014 at 18:22

you are also reason with ''TRUE'' and ''FALSE'' in lowercase and including stdbool, it works well (no error). I do not understand why the program  compiles well on UV4.00 with this error (maybe there is a different stdbool.h !  i see it the next week) The problem this wasn't my project, i need to take it and learn more

.

You also are true the version is V4 and  no V2, i launched my other pc to confirm it but this V4.00 don't works in 64bit).

thanks
Posted on August 01, 2014 at 19:36

You also are true the version is V4 and no V2, i launched my other pc to confirm it but this V4.00 don't works in 64bit.

You must be using some prehistoric versions of Keil, because going back as far as V4.2.0 is known to work on 64-bit platforms, the most current version is V4.7.4 or thereabouts. Now some people have crashes due to 1366x768 and ridiculously sized fonts/icons, but it's not a 64-bit problem.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
faza
Associate II
Posted on August 07, 2014 at 11:10

Hi

i have succeed to launch my code. Now I have two project :

- one with the old library. I had copy the old library since my 32bit windows and i add directly this old library  in my projec. This works well. 

-The second project is with the new library i compile well all but i don't find the old stm32_init to configure the processor.

Could you tell if it is better to use the new library? and if this is case how and where i can configure the processor as the windows ''configuration wizard'' of stm32_init.c.

Thanks for your help

Posted on August 07, 2014 at 18:45

The wizard stuff is all from Keil, who also use very stale library releases.

You'd need to configure the processor speed/clocks within system_stm32f10x.c and routines like SystemInit(). Review RCC/PLL documentation to understand fully your options. ST also had a clock code generation tool running in Excel.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..