cancel
Showing results for 
Search instead for 
Did you mean: 

Why errors are being shown when i add header files and c files in my code?

Amal Babu
Associate III

Hai,

i have written a code for stm8l using st visual and i have added few header files for my code.When i add the files i am getting the error as shown in the image.

the following are the header files added:

stm8l15x_spi.h

stm8l15x_SPI.C

stm8l15x.h

Please help me with the errors shown in the image attached with this.

1 REPLY 1
AvaTar
Lead

Looks like this code requires you to define the MCU sub-type explicitely.

The first error "Please select first..." in line 59 of stm8l15.h is most probably thrown by an explicit preprocessor ​error directive. Use one defined supposedly in the lines before, appropriate for your project. Best place is the project settings, NOT the header file itself.

Know your tools.