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?
Problem with using Shared variable in MultiCore Environment
Moderator: paolo.gai
Problem with using Shared variable in MultiCore Environment
- Attachments
-
- shared_variable3.PNG (11.42 KiB) Viewed 4453 times
-
- shared_variable2.PNG (6.17 KiB) Viewed 4453 times
-
- shared_variable.PNG (75.65 KiB) Viewed 4453 times
Re: Problem with using Shared variable in MultiCore Environm
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?
hich compiler are you using, are you compiling in single ELF way. Could you attach your oil file?
Re: Problem with using Shared variable in MultiCore Environm
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.
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 (28.69 KiB) Viewed 4439 times
Re: Problem with using Shared variable in MultiCore Environm
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
PJ