Install issue

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
fkl
Newbie
Posts: 2
Joined: Sat Oct 01, 2011 4:20 pm

Install issue

Post by fkl » Sun Oct 02, 2011 11:07 am

Hello,
I'm new to Erika and RT-Druid, I've a question about RT-Druid: I've installed both RT-Druid and Scicos, I can compile demo projects and get the pic30.cof file, but when I edit the code.c file I see a lot of error and warning (see attached image)

My OS is Win XP Home SP3, and I've installed:
- eeCygwin_1_7_9 to c:\cygwin\
- EE_160_Win to C:\Evidence\eclipse (also updated into eclipse)
- MPLAB C30 to C:\Programmi\Microchip\mplabc30\v3.25

Set the RT-Druid preferences with:
Rt-Druid -> Oil -> Erika Enterprise -> SOURCE DISTRIBUTION
Rt-Druid -> Oil -> dsPic -> Gcc path: C:\Programmi\Microchip\mplabc30\v3.25 and Asm path: C:\Programmi\Microchip\MPLAB ASM30 Suite

How can I fix error and warnings?
Thanks.
Attachments
problem.PNG
problem.PNG (84.45 KiB) Viewed 3081 times

jagomo
Newbie
Posts: 14
Joined: Tue Apr 05, 2011 9:18 am

Re: Install issue

Post by jagomo » Mon Oct 03, 2011 6:56 am

Probably has something to do with your include paths setup, but only with what you posted I cannot see what could be causing all your problems. Could you post the full console output and .oil file?

nicola.serreli
Jr. Member
Posts: 68
Joined: Mon Aug 02, 2010 10:11 am

Re: Install issue

Post by nicola.serreli » Mon Oct 03, 2011 9:18 am

Hello,

the problem is that while you are writing your code, cdt does not know anything about erika. Moreover if you put erika sources inside "include path" list, again you will see errors and warnings: a lot of code in erika sources are "enabled" using defines, then you need them.
Note that these errors may or may not exist compiling your code with erika makefiles (because them know erika sources and defines).

Luckily we start to talk about this behavior during the last week.
We are still working on this topic, anyway here is how solve it manually with the current version of RT-Druid:

0) this method is still experimental and not fully tested yet
1) disable auto-build (really important)
2) open project properties and add "erika source paths" (both pkg and contrib directories from file-system) and "Debug" folder (from workspace) to include path (in "C/C++ General" - "Paths and Symbols")
3) build the project
4) copy all "EE_OPT+=__something__" from makefile to eecfg.h in the form "#define __something__" (Here is really important to not copy DEBUG symbol)

Then almost all errors and warnings will disappear.
Erika Include Paths
Erika Include Paths
erika_include_path.png (54.31 KiB) Viewed 3074 times
Notes:
1) if you do not disable auto-build, eclipse may crash (the solution is to change the path of the project in the file system, open eclise, disable the auto-build, close eclipse, restore the original path of your project and then import it back in eclipse )
2) this point allow you to inform cdt parser where are all .h files involved in the code writing (and later in the build)
3) you need to build your project at least every time you change something in the oil file, in order to update eecfg.h file and the list of EE_OPT required by your code
4) clearly this step should be done every time you build your project after a change in the oil file (the eecfg.h file may be replace by RT-Druid and the list of EE_OPT may change)



I hope that this can help.
Let me know if every thing is good or if there is something bad (as I wrote above, we are still testing it :P )

thanks in advance,
Nicola

fkl
Newbie
Posts: 2
Joined: Sat Oct 01, 2011 4:20 pm

Re: Install issue

Post by fkl » Mon Oct 03, 2011 12:32 pm

thanks for the reply,
with the solution provided, I've done steps 2) and 3) and this fix the include problems, but some other errors still remain, as shown into first attached image. Errors are for unresolved type defnitions and also there are syntax error for TASK definition.
after step 2) and 3)
after step 2) and 3)
moreWrong.PNG (47.13 KiB) Viewed 3069 times
When I add the #define __something__ to the eecfg.h I receive a lot of warning, as shown into the second image.
after step 4)
after step 4)
define.PNG (49.52 KiB) Viewed 3069 times
Thanks a lot.

nicola.serreli
Jr. Member
Posts: 68
Joined: Mon Aug 02, 2010 10:11 am

Re: Install issue

Post by nicola.serreli » Mon Oct 03, 2011 1:28 pm

Please note that some of Types and Registers are related to Microchip files, i.e. you should include also these files (during Erika complying there is a folder that contains some link to them).
Regarding EE_UINT16 and Task definitions, I also have these errors but not always, just "sometime it works" and "sometime not" (I'm trying to understand how be sure that all works).


the second error is totally different. The problem is that the current Erika makefile adds all "__something__" defines at compile time, then if you define them in the code, they are defined twice.
Moreover, you cannot just remove them from generated makefile (inside Debug directory) because EE_OPT are used also for select which makefile have to run.
At this time, there are only two options,
1) ignore warnings on these defines
2) add and remove them every time you switch from "edit" to "compile" (probably the first one is the best :P )

Best regards,
Nicola

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Install issue

Post by paolo.gai » Mon Oct 03, 2011 1:47 pm

noted that we plan to move all the -D options of the compiler as defines in eecfg.h. but this will take some time to be implemented...

PJ

nicola.serreli
Jr. Member
Posts: 68
Joined: Mon Aug 02, 2010 10:11 am

Re: Install issue

Post by nicola.serreli » Tue Oct 18, 2011 4:41 pm

The new night-build of RT-Druid (http://erika.tuxfamily.org/wiki/index.p ... d_RT-Druid) contains some features that resolve many of these problems.
More details at http://erika.tuxfamily.org/wiki/index.p ... n_RT-Druid

best regards
Nicola

Post Reply