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.
Install issue
Moderator: paolo.gai
Re: Install issue
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?
Re: Install issue
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.
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
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.
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
Re: Install issue
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. When I add the #define __something__ to the eecfg.h I receive a lot of warning, as shown into the second image. Thanks a lot.
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. When I add the #define __something__ to the eecfg.h I receive a lot of warning, as shown into the second image. Thanks a lot.
Re: Install issue
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
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
Re: Install issue
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
PJ
Re: Install issue
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
More details at http://erika.tuxfamily.org/wiki/index.p ... n_RT-Druid
best regards
Nicola