cancel
Showing results for 
Search instead for 
Did you mean: 

Errors galore after updating STM32CubeIDE

Abhesheksh
Associate

I updated to the STM32CubeIDE 1.15 WIN, and since then my project has thrown up 100+ errors. It doesn't recognise "u_char" or "uint" or "caddr_t". 

 

It throws up error "expected ')' before 'GPIO_TypeDef'" in the below statement : 

void Write_MFRC522(u_char, u_char, GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);

 

I have cleaned and built the project several times, how do I fix this?

6 REPLIES 6
Ghofrane GSOURI
ST Employee

Hello @Abhesheksh 

First let me thank you for posting.

I would appreciate it if you could provide your project for further investigation.

I will be waiting for your feedback.

THX

Ghofrane

I have attached the full project. Please help.

Andrew Neil
Evangelist III

@Abhesheksh wrote:

my project has thrown up 100+ errors. It doesn't recognise "u_char" or "uint" or "caddr_t". 

It throws up error "expected ')' before 'GPIO_TypeDef'


That typically happens when there is one error early on in your code, and that one error is the cause of all the rest.

So the thing to do is to go to the very first reported error - most likely, a missing or not-found header.

"u_char" or "uint" or "caddr_t" are not standard types, so they must be defined somewhere in your code - presumably a header?

And, presumably, that header is not being found?

Clearly, that will cause every single use of any of these types anywhere in your code to fail - and you can see how that will quickly lead to loads of errors from just the one problem.

 

EDIT:

Here's an example of how just fixing the first-reported issue will actually solve multiple errors:

https://community.st.com/t5/stm32-mcus-machine-learning-ai/identifier-quot-ai-ai-data-activation-1-size-quot-is-undefined/m-p/652055/highlight/true#M2018


go to the very first reported error

You need to look in the build console output - not in the 'Problems' list:

AndrewNeil_0-1710845578750.png

 

TDK
Guru

"u_char" is not a standard type. Find out where you're defining it, or use standard types like uint8_t or unsigned char instead.

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

so they must be defined somewhere in your code - presumably a header?

The simplest way to fix this IMHO is to create a small .h file somewhere and "inject" it into  compilation using GCC/G++ option -include "yourfile.h"

#pragma once
typedef unsigned char u_char;
typedef unsigned int uint;
typedef void *caddr_t;