Skip to main content
Visitor II
September 27, 2017
Question

stm8s_uart1.c bad struct/union operand

  • September 27, 2017
  • 1 reply
  • 1116 views
Posted on September 27, 2017 at 13:19

Hello.

I want to using uart1 with STM8S003,

  

after add

stm8s_uart1.c and stm8s_uart1.h and build project, the compiler(Cosmic) tell error

'stm8s_uart1.c bad struct/union operand' 

it's look like somethings not define to project.

Help please.

    This topic has been closed for replies.

    1 reply

    Graduate II
    September 27, 2017
    Posted on September 27, 2017 at 14:24

    >>it's look like somethings not define to project.

    Ok, so look at what it is complaining about, and define that. Normally .H files are #included, not added to the project explicitly.

    Show what you're doing and what fails, so that people can see what going on without trying to replicate the situation with next to no detail to work from.

    Visitor II
    September 28, 2017
    Posted on September 28, 2017 at 08:48

    Thanks for your quick response,

    Actually i included wrong stm8s.h file. Now it is fixed.