Loading...
 
Skip to main content

System Workbench for STM32


Custom Library Compilation Error

Hi

You can not use a variable of whatever type in a .c file if it's not known there.
Tell CubeMX to generate separate pairs of .c .h files for every peripheral.

Then the the variable is declared extern in the .h file and defined and used within the .c file.
Thereafter you can access the variable whereever the .h file is included.

Or use main.h.

Dieter

 
Collapse/expand modules below