Skip to main content
Visitor II
January 8, 2019
Question

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

  • January 8, 2019
  • 1 reply
  • 617 views

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.

    This topic has been closed for replies.

    1 reply

    Visitor II
    January 8, 2019

    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.