cancel
Showing results for 
Search instead for 
Did you mean: 

Building Error!! STM32CubeIDE don't recognize the declarations int8_t , int32_t.

BLima.1
Associate II

i´m new here, and i´m starting to work with STM32F103C8 (blupill)

I´ve created a very simple code. It´s shown in image down.

0693W00000StmqbQAB.pngThe problem is:

The editor doen´t recognize the variable type int8_t and int32_t (probably int16_t too).

And when a try to build the code, the editor show me a message: adc0 undeclared.

I don´t know how to resolve this. I´ve tried to declare stdio, nothing changes.

Does anyone could ,pelase, help me??

Thanksss

1 ACCEPTED SOLUTION

Accepted Solutions
Danish1
Lead II

How well do you know the C language?

When you declare a variable, you do so by specifying its type and the name you give it:

int8_t counter;
char c;

You can assign values to these variables

counter = counter + 1;
c = 't';

You can declare at the same time as assigning

int32_t total = 0;

View solution in original post

4 REPLIES 4
Danish1
Lead II

You need the line

#include <stdint.h>

somewhere near the top of your file

BLima.1
Associate II

i've tried it now, But the mistake persists.

:(

Danish1
Lead II

How well do you know the C language?

When you declare a variable, you do so by specifying its type and the name you give it:

int8_t counter;
char c;

You can assign values to these variables

counter = counter + 1;
c = 't';

You can declare at the same time as assigning

int32_t total = 0;

BLima.1
Associate II

Oh. I dind´t see that. Thanks