Project building failure with EE 1.4.3

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Project building failure with EE 1.4.3

Post by icserny » Sun Oct 12, 2008 7:45 pm

Hi,

I installed Erika Enterprise 1.4.3 for dsPIC30 and tried to build one of sample projects for the demo board Explorer 16. Following the instructions in the Tutorial everything went smoothly, except of the building of the project. I\'ve got the following error message.
Error launching external scanner info generator (gcc -E -P -v -dD C:/Evidence/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) test1 -1 C/C++ Problem
This looks a bit strange for me, because the compiler is called pic30-gcc, not just gcc. And the file mentioned above (.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) contains just an empty line (single character of 0x0A). So does the file specs.c as well...

I tried to specify the MPLAB C30 compiler first, and after seeing the above problem I tried to use the EE gcc but the result was the same.

How can I elmiminate this problem, and compile the demo project?

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

Re:Project building failure with EE 1.4.3

Post by paolo.gai » Sun Oct 12, 2008 8:45 pm

Hi...

We are getting this error too... but it seems not harmful at all.

in particular, take a look in the console, and check if the pic30.cof has been generated under the Debug directory.

The problem seems to be related to the CDT plugin trying to use gcc to get something done, but the executable gcc is not available by default in Eclipse... Maybe we should change something in the CDT, but I guess it is not so urgent...

Ciao,

PJ

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Re:Project building failure with EE 1.4.3

Post by icserny » Mon Oct 13, 2008 7:39 am

Hi Paolo,

The problem is that the build procedure stops at the very beginning so pic30.cof is trivially not created.

The project wizard created files .cproject, .project, code.c and conf.oil.

Then rtdruid_launcher.bat created the Debug directory and files eecfg.c, eecfg.h and makefile.

The make just says:
MAKE_DIRECTORIES (after a clean)
This happens also if I start mymake_cygwin.bat manually.
So I guess, that the compiler is not started at all.
Running make with the debug flag, it seems, that a lof of files are not found at all.

I attach here the debug output of make which may help to understand the situation.

BTW the path for the compiler is c:\\Program Files\\Microchip\\C30 in my case, which seems to be correctly reflected in the makefile.

Thank you for your reply!

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Re:Project building failure with EE 1.4.3

Post by icserny » Mon Oct 13, 2008 7:44 am

Sorry, the file was too large to attach it, so I provide here links to it and for the makefile as well:

makefile

debug.txt

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

Re:Project building failure with EE 1.4.3

Post by paolo.gai » Mon Oct 13, 2008 8:21 am

Hi...

I see that the default directory specified in the makefile is \"C:\\\\Program Files\\\\Microchip\\\\C30\" . On my machine is \"C:\\\\Program Files\\\\Microchip\\\\MPLAB C30\". Did you installed the compiler in a different location or maybe you need to change the pathname?

Also, try to remove the Debug directory and rebuild. It often helps when dependency files are messed up...

PJ

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Re:Project building failure with EE 1.4.3

Post by icserny » Mon Oct 13, 2008 9:54 am

Did you installed the compiler in a different location?
Yes, so the C:\\Program Files\\Microchip\\C30 pathname is correct in my case.
Also, try to remove the Debug directory and rebuild.
I\'ve already tried it (several times).

I think, that the problem is here (see in debug.txt):
Looking for an implicit rule for `/cygdrive/c/PROGRA~1/MICROC~1/C30/support/h/p33FJ256GP710.h\'.
I am away from my computer on which EE and RT-Druid was tested, but as I remember, the relative path of C30/support/h/p33FJ256GP710.h is incorrect, since the up to date Microchip compiler has separate subdirectories of each family of their 16 bit MCU\'s. So the path should be C30/support/dsPIC33/h/p33FJ256GP710.h or someting similar.

Does it mean, that my compiler (probably ver 3.11B, but I cannot check at this moment) is not compatible with EE 1.4.3?

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

Re:Project building failure with EE 1.4.3

Post by paolo.gai » Mon Oct 13, 2008 10:46 am

Ok... I just got today another mail saying that ERIKA was failing to compile on PIC30 GCC 3.11.

The reason for the failure seems to be that the new PIC30 GCC has a set of different directories for the include files. It\'s the second time they changed it in less than 1 year :-(

the situation is the following:
- I currently have no problems in compiling with version 3.02
- on my machine the files are under C:\\Program Files\\Microchip\\MPLAB C30\\support\\h\\*
- version 3.1x changed the location, making the makefile fail the compilation

Solutions:
- downgrade to PIC30 3.02 for now
- we are going to change the makefiles ASAP; we will probably release a patch soon, that will be included under EE 1.5.0, planned to be released soon.

Sorry again for that, but it is difficult to cope beforehand with changing directories in the compilers...

PJ

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Re:Project building failure with EE 1.4.3

Post by icserny » Mon Oct 13, 2008 11:37 am

Hi Paolo,

Thank you for your answer. I will try to downgrade the C30 installation.

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Re:Project building failure with EE 1.4.3

Post by icserny » Tue Oct 14, 2008 12:45 pm

Hi,

I\'m glad to tell you that the demo project has been successfully compiled with an older version of MPLAB and C30. Thank you again for your advices!
it is difficult to cope beforehand with changing directories in the compilers...
Yes, I understand. But wouldn\'t be better to let the users to specify the location of the include directories? It may be a bit inconvenient form the user\'s point of view, but gives much more flexibility on the other hand.

In the MPLAB IDE one can specify even several include directories, and the installation directory of C30 is just the default (or assumed) root for the includes.

I also would like to see more feedback from the make process or from the compiler, especially when fatal errors occured or some files are missing.

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

Re:Project building failure with EE 1.4.3

Post by paolo.gai » Tue Oct 14, 2008 1:31 pm

I\'m glad to tell you that the demo project has been successfully compiled with an older version of MPLAB and C30. Thank you again for your advices!
Good!!!
it is difficult to cope beforehand with changing directories in the compilers...
Yes, I understand. But wouldn\'t be better to let the users to specify the location of the include directories? It may be a bit inconvenient form the user\'s point of view, but gives much more flexibility on the other hand.
Of course... you can already do that using the CFLAGS option in the OIL file...

but some of the include files are taken directly from the C30 compiler distribution... maybe we\'ll need to change that...
I also would like to see more feedback from the make process or from the compiler, especially when fatal errors occured or some files are missing.
also this can be done using the VERBOSE option (section 2.3.3 of the arch_pic30 manual). Could that be ok?

In any case, thanks again for the feedback... and continue reporting things, we are working hard to improve the libraries and support for ERIKA and pic30!

Ciao,

PJ

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Re:Project building failure with EE 1.4.3

Post by icserny » Wed Oct 15, 2008 7:42 am

Hi again,

This time I would like to report a success-story for all of you, who are interested in. It is possible to compile the demo projects for dsPIC30 with EE 1.4.3 by using the lataest MPLAB and C30. But some tricks are necessary... This is how to build the Devices Demo for the Explorer 16 board:

1. Copy the directory structure from inside of C:\\Program Files\\Microchip\\MPLAB C30\\support\\dsPIC33 up to one level (i.e. to C:\\Program Files\\Microchip\\MPLAB C30\\support). (I guess that we only need files inc\\p33FJ256GP710.inc h\\p33FJ256GP710.h but I\'ve copied all of the directories (h,inc,gld), just to be on the safe side. You can do it in a more clever way).

2. Copy also the file libp33FJ256GP710-elf.a from directory ...C30\\lib\\dsPIC33F to ...C30\\lib (i.e. up to one level)

3. Now you can start RT-Druid to create the demo project, following the instructions of the Tutorial. Alas, still you will get an error message saying that p30f2010.inc cannot be found.

4. This is the dirtiest trick, hope that Paolo can suggest a better solution for it: copy the file p30f2010.inc from C:\\Program Files\\Microchip\\MPLAB C30\\support\\dsPIC30F\\inc inth the Debug\\frommchp directory of your demo project. (You should already find there the files crt0.s, p33FJ256GP710.inc, p33FJ256GP710.h)

5. You can try to build the project again, and finally you can find the so wanted file: pic30.cof

---------------
Concerning more feedback:
this can be done using the VERBOSE option (section 2.3.3 of the arch_pic30 manual). Could that be ok?
VERBOSE it\'s a nice option, gives many useful information. But this is still not enough. As you see above I was unable to find were on the earth the file p30f2010.inc was looked for by the build procedure, and why was it not found in the default location (I mean ...C30\\support\\inc)? There was a similar problem with the file libp33FJ256GP710-elf.a, but the VERBOSE option didn\'t help me to find the proper location where I should put it. I had to find it\'s proper place by myself using analogies.
In any case, thanks again for the feedback... and continue reporting things
I\'m sorry to say, but I have finished my experimenting with EE, and I\'ve decided not to use it. I don\'t want to live together with so many complications: I need Java, cygwin, Eclipse, RT-Druid and MPLAB and all these packages sould be compatible to get them working. This is too much risk, since both Java and MPLAB is refreshed frequently and independently from you.

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

Re:Project building failure with EE 1.4.3

Post by paolo.gai » Wed Oct 15, 2008 4:24 pm

Hi,

...thanks for your message,a nd thanks for your explanations. I understand that there was no help for finding the missing files, in any case it is also true that these files should have been copied in the right place by the makefiles and not by you directly. I\'m also really sorry that you will not use EE, and I may understand partially your reasons... although please understand that your problem was mainly only related to a different version of the C30 Compiler, issue that can be solved by modifying a few lines of the main makefile.

Ciao,

Paolo

icserny
Newbie
Posts: 9
Joined: Sun Oct 12, 2008 7:19 pm

Re:Project building failure with EE 1.4.3

Post by icserny » Wed Oct 15, 2008 6:43 pm

please understand that your problem was mainly only related to a different version of the C30 Compiler
Of course, I understand it, and I have never regarded it as a serious problem. Indeed, I highly appreciate your quick answers which helped me so much to overcome this problem quite easily.

My only serious problem is - as I explained before - the complicated interdependence among 3rd (and 4th as well :) ) party packages which may not work if one party changes his mind (and his program too...) breaking the compatibility. From the point of view of strategical planning this is a situation which one should avoid.

Ciao,

István Cserny

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

Re:Project building failure with EE 1.4.3

Post by paolo.gai » Wed Oct 15, 2008 9:04 pm

Hi Istvan,

Thanks for your reply... i perfectly understand your situation.

In any case, just to give you the full picture, we are going to release also the OIL compiler as opensource with the next EE release 1.5.0 . Although this does not solve the issues you are saying, it somehow mitigates them because you will be in any case able to recompile the code yourself.

Ciao,

Paolo

nino
Newbie
Posts: 15
Joined: Thu Sep 04, 2008 1:14 pm

Re:Project building failure with EE 1.4.3

Post by nino » Fri Nov 07, 2008 4:16 pm

It is a EE 1.4.3 problem with C30 version 3.11. Now it\'s solved and next releases will be bug free.

Post Reply