Keil Logo

rtos L6200E Symbol multiply defined rtx

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Markus Rebholz
Posted
9-May-2018 09:17 GMT
Toolset
ARM
New! 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

Read-Only
Author
Westonsupermare Pier
Posted
9-May-2018 17:12 GMT
Toolset
ARM
New! RE: rtos L6200E Symbol multiply defined rtx

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.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.