This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

rtos L6200E Symbol multiply defined rtx

Hello,
I'm working on a little service firmware using RTX.
At all I don't wanted to write hole code in one File so I split my code in logical units.
So far so good.

Now I want send Data from one to another thread.
I've read in "osObjects.h" file that I can define global RTOS objects there.
Maybe this is a beginner fault but I'm the opinion to use this "osObjects.h" in every file
I use RTOS objects.
By building the project I get several Error: L6200E: Symbol "text" multiply defined...

I define a memory pool this way:

File objects.h:

typedef struct { uint16 Temperature; uint8 MotorStatus; uint16 ack_hex_Motor;
} mp_writeData_t;

osPoolId mpid_writeData;
osPoolDef(mp_writeData, 1,mp_writeData_t);

osMessageQId qid_writeData;
osMessageQDef(q_writeData, 1, &mp_writeData_t);

So I've leave no stone unturned and tried with declare as extern and static,
with static I reduced the errors to a minimum but there also errors.

The threads declared in objects.h File work fine ...

Maybe someone as an idea or help on me.

regards

  • Guess I'd look for where "text" is defined, the linker/compiler usually isn't wrong about what it is told to do.

    Don't put a definition in an include file that will be pulled into multiple files. The .H file should describe "extern int foo;" not "int foo;", which you should define in a singular .C file for everyone to share.