Skip to main content
Visitor II
March 15, 2025
Question

Invalid initializer error

Hi, it's my first post here. Im learning to use UART and I'm getting a "invalid initializer" error while debugging this code. Can someone please explain why?

This topic has been closed for replies.

2 replies

Pavel A.
March 16, 2025

Probably because you are not using an "official" ST example project from "Cube" software package?

For beginners, these example projects are very much recommended, rather than random stuff from youtube or github.

 

gbm
Super User
March 16, 2025

Look at the detailed description of the error and its location - you didn't even show it in your post. Show the source code line in which the error is signaled. Either it's a simple syntax error or an attempt to initialize static data with a pointer or dynamic expression.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice