Problem with using Shared variable in MultiCore Environment

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
WooHyuk

Problem with using Shared variable in MultiCore Environment

Post by WooHyuk »

Hello~ all!
I'm using TC275 and ERIKA ENTERPRISE for my project.
I made a project with RT-Druid C/C++ Project Example -> tricore -> infineon_TriBoard-TC2X5_V2.0 ->Multicore automatic tests -> Multicore Spinlocks test.
However, When I tried to build this project, Compilation failed because shared variables didn't be referenced. Shared Variables are initialized in master.c code. and in shared.h, they are also initialized as extern values. So, I think that there is no problem with using shared variables in slave2.c or slave1.c. I cannot understand why this undefined reference error had occurred.
Can anyone please tell me how I can get through with this problem?
Attachments
shared_variable3.PNG
shared_variable3.PNG (11.42 KiB) Viewed 4490 times
shared_variable2.PNG
shared_variable2.PNG (6.17 KiB) Viewed 4490 times
shared_variable.PNG
shared_variable.PNG (75.65 KiB) Viewed 4490 times
e.guidieri

Re: Problem with using Shared variable in MultiCore Environm

Post by e.guidieri »

This really weird I just tried it yesterday and the test works.

hich compiler are you using, are you compiling in single ELF way. Could you attach your oil file?
WooHyuk

Re: Problem with using Shared variable in MultiCore Environm

Post by WooHyuk »

Thanks to reply, e.guidieri. I finally solved problem. But I have a question about using shared variable in ERIKA ENTERPRISE. I saw how to use shared variable in Wiki page.
To use shared variable, as a picture I attached, It is essential that EXPORT_FILE has to be assigned. and shared variable should be initiated in the export_master.exp file. Is there any other way to use shared variable in ERIKA ENTERPRISE?
When I initiate shared variable in export_master.exp file, is there difference between writing FUNCTION keyword and OBJECT keyword? I'm confused because, whenI used an integer variable for shared data, I wrote FUNCTION keyword but it worked well. Of course OBJECT keyword works well.
Attachments
external.PNG
external.PNG (28.69 KiB) Viewed 4476 times
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Problem with using Shared variable in MultiCore Environm

Post by paolo.gai »

That is currently what we have. But we are working on a single-ELF version of the kernel that shares the RTOS code among the various CPUs. It is done in the context of the P-SOCRATES FP7 Project, and will probably be available for Kalray MPPA around end of the year.

PJ
Locked