Skip to main content
Visitor II
September 2, 2017
Question

''stm8s_uart1.c bad struct/union operand'' when build project

  • September 2, 2017
  • 1 reply
  • 709 views
Posted on September 02, 2017 at 06:10

Hello.

I want to using uart1 with STM8S103K,

i do (already work):

1. write program to display 4 pieces of 7 segment. 

2. define STM8S103 in STM8S.h

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

    Visitor II
    October 23, 2017
    Posted on October 23, 2017 at 14:27

    Well, compiler errors usually refer to 1 or more specific lines from a source file.

    Without seeing those lines (and the declarations of the objects and function from those lines) people on the forum won't be able to tell you anything over what the compiler is already telling you.

    Philipp