Skip to main content
frackers
Senior
Apr 19, 2020 12:20 AM UTC
Solved

CubeMonitor doesn't understand 'bool' types

Trying to monitor a 'C' variable of type bool results in the error

not connected ! bad parameter (7)

and the probe connection drops. It then comes back all on its own!!

Changing the variable to any other type and the monitor runs fine.

This topic has been closed for replies.
Richard.Chvr
Richard.ChvrBest answer
ST Technical Moderator
Sep 27, 2023 1:32 PM UTC

No update since a while, closing the post.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

4 replies

Thierry
Visitor II
Apr 20, 2020 1:39 PM UTC

Dear frackers,

Did you define your own bool type or did you use

#include <stdbool.h>

?

Associate
May 5, 2020 3:03 PM UTC

I have the same issue, all bool values appear as undefined type. I'm including <stdbool.h>.

CubeMonitor does not seem to convert GCC's _Bool to uint8_t.

Thierry
Visitor II
May 5, 2020 5:29 PM UTC

Dear NPaqu.1,

Sorry for the inconvenience, but unfortunately the bool type from <stdbool.h> is not supported for the time being. This is definitively something we will consider in an upcoming release.

Meanwhile, you can define your own bool type like this :

typedef enum { false, true } bool;

or even like this :

typedef int bool;
#define true 1
#define false 0

Richard.Chvr
Richard.ChvrBest answer
ST Technical Moderator
Sep 27, 2023 1:32 PM UTC

No update since a while, closing the post.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.