Skip to main content
Topic: MCStackDemo won't compile (Read 5488 times) previous topic - next topic

MCStackDemo won't compile

I'm attempting to compile the MCStackDemo app provided on the Web Platform SVN.

I'm seeing a lot of issues between versions of the C30 compiler, and the microchip TCPIP library files. I've spent 2 days trying to track down the right combination without luck, and I'm getting marred in the complexity of tracking down dozens of different "hacks" that people have used to get this version or that version working.

So now I'm attempting to use the current version of C30 compiler: v3.31, and the latest TCPIP stack: v2010-10-19

Using this combination my first problem occurs when the TCPIP Stack calls on plib.h, these peripheral libraries don't appear to be included as part of the C30 compiler.

does anyone know where I get the correct plib libraries? I'm not intimately familiar with what I'm trying to track down here.

Code: [Select]
Executing: "C:Program FilesMicrochipMPLAB C30binpic30-gcc.exe" -mcpu=33FJ128GP204 -x c -c   "C:ProgrammingWebserver1.1Microchip Solutions v2010-10-19MicrochipTCPIP Stacketh_pic32_ext_phy_rtl8201FL.c" -o"Objects - TCPIP Demo App-C30eth_pic32_ext_phy_rtl8201FL.o" -I"." -I"C:ProgrammingWebserver1.1Microchip Solutions v2010-10-19MicrochipInclude" -I"%PROGRAMFILES%MicrochipMPLAB C30include" -g -Wall -mlarge-code

C:ProgrammingWebserver1.1Microchip Solutions v2010-10-19MicrochipTCPIP Stacketh_pic32_ext_phy_rtl8201FL.c:37:18: error: plib.h: No such file or directory

Re: MCStackDemo won't compile

Reply #1
The latest TCP/IP stack is in Microchip Libraries for Applications v2013-06-15. Try that one.

Re: MCStackDemo won't compile

Reply #2
Good point, and tried those, I get a compilation error for a dependency on the plib libraries. I'm not familiar with those, they apparently don't come with the C30 compiler. Do you know where to get them?

Code: [Select]
Executing: "C:Program FilesMicrochipMPLAB C30binpic30-gcc.exe" -mcpu=33FJ128GP204 -x c -c   "C:ProgrammingWebserver1.1Microchip Solutions v2013-06-15MicrochipTCPIP Stacketh_pic32_ext_phy_rtl8201FL.c" -o"Objects - TCPIP Demo App-C30eth_pic32_ext_phy_rtl8201FL.o" -I"." -I"C:ProgrammingWebserver1.1Microchip Solutions v2013-06-15MicrochipInclude" -I"%PROGRAMFILES%MicrochipMPLAB C30include" -g -Wall -mlarge-code

C:ProgrammingWebserver1.1Microchip Solutions v2013-06-15MicrochipTCPIP Stacketh_pic32_ext_phy_rtl8201FL.c:37:18: error: plib.h: No such file or directory

Re: MCStackDemo won't compile

Reply #3
plib.h is the peripheral library and it comes with your compiler. I found mine under the C32 compiler folder. However, it seems that you are trying to compile a project for pic32 family, that file is only needed then.

The example project is a bit old, it may be better if you start with the Demo App inside the project folder and go from there. You'll need the HardwareProfile.h file from the example project and do some changes.

Re: MCStackDemo won't compile

Reply #4
I've started by trying to follow the documentation on the Web Platform, this page, and related pages:

I think I set it up according to these directions, so the C30 compiler is the right one. But this plib requirement is part of the latest TCPIP stack code from microchip.

I'm wondering if there's a different compiler I should be using for the Web Platform maybe? Seems like, if microchips TCPIP stack won't compile with this compiler, I'm in trouble. Either that or the more likely conclusion, I'm doing something completely ass backwards, I just haven't figured out what that is yet.

Can you (or anyone) confirm that the compiler I'm using is the appropriate one for the Web Platform?

Also, what is this "Demo App inside the project folder" that you referred to?

Firstly, I've checked out everything from the SVN as was instructed to do so on the Web Platform page, but there's no "project" folder in there. Under the "firmware" folder there are a bunch of projects that appear related to the web platform, MCStackDemo seemed to be the only one that included the webserver in it. Hence my efforts to get it to compile.

Second, If you mean the microchip TCPIP Demo App that's in the 'Microchip Solutions v2013-06-15TCPIPDemo App' folder, there are many projects in there for many processors/hardware. It's not clear which one I should start to work from. And in any of those cases it seems like I'm going to have to remove a lot of ancillary code that doesn't reference the hardware existing on the Web Platform (I took a few shots at this route, but didn't seem to have the experience needed to get a hello world app to compile for the Web Platform hardware).

Thanks for whatever pointers and thoughts you can offer!

Re: MCStackDemo won't compile

Reply #5
Well, I'm using v2012-04-03 with C30 v3.30B for starters. I managed to write my own code, but cheated a little: I copied the files from SVN folder and had to do some changes. The changes are minimal if you go this road. Read the README.TXT file under the Web_Platform.source.r1052.v1c.zipfirmwareMCstack-SDcard-server

If you want to use the latest tools, you'll have to use MPLAB X and it's compilers, they should have that file. But again: From the errors you shared, it seems like you are trying to use one of the demos for PIC32, there should be no need to compile "eth_pic32_ext_phy_rtl8201FL.c", we are using ENC28J60, it has a separate file.

If you are following the wiki, check out the "Firmware" topic. If you have no experience with the platform, start with the introduction project. Then move on to quickstart project etc.