cancel
Showing results for 
Search instead for 
Did you mean: 

expected declaration specifiers or '...' before '....'

Sule_Akcay
Associate III

Hi!

I'm working with STM32CubeIDE and I want to send data via UART using the code below.

 

char *msg = "Hello\n";
HAL_UART_Transmit(&huart6, (uint8_t *) msg, strlen(msg), 100);

 

But I get an error like this:

hata.PNG

What can I do about this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
Sule_Akcay
Associate III

I didn't understand what the problem was, but creating a new project solved my problem.

Thanks...

View solution in original post

4 REPLIES 4
STTwo-32
ST Employee

Hello @Sule_Akcay 

I've tested personally using the Nucleo-F756ZG and I can't reproduce the issue. Can you add your project and all details about your board, your IDE version,... Personally, I'm using the CubeIDE  V1.14.1 and everything works fine.

Best Regards.

STTwo-32

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.

AScha.3
Chief III

Did you 

#include <string.h>

?

If you feel a post has answered your question, please click "Accept as Solution".
Sule_Akcay
Associate III

I didn't understand what the problem was, but creating a new project solved my problem.

Thanks...

When you get errors like that, it generally means that something went wrong sometime earlier in your code - leaving the compiler confused.

You haven't shown enough context to see what that might be.

But as it's fixed now, please mark your last post as the solution - so people can see that this issue is resolved.