Skip to main content
Amal Babu
Associate III
Jan 8, 2019 9:06 AM UTC
Question

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

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

    AvaTar
    Senior III
    Jan 8, 2019 9:34 AM UTC

    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.