Skip to main content
BLima.1
Associate II
August 25, 2022
Solved

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

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

This topic has been closed for replies.
Danish1
Danish1Best answer
Lead III
August 25, 2022

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;

4 replies

Danish1
Lead III
August 25, 2022

You need the line

#include <stdint.h>

somewhere near the top of your file

BLima.1
BLima.1Author
Associate II
August 25, 2022

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

:(

Danish1
Danish1Best answer
Lead III
August 25, 2022

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
BLima.1Author
Associate II
August 25, 2022

Oh. I dind´t see that. Thanks