WiFiDip-KitchenSink using GCC

A 40 Pin Dip packaged development board enabling you to create internet connected products

WiFiDip-KitchenSink using GCC

Postby chrisjn52 » Sat Oct 12, 2013 6:16 am

Hi Guys,
are you able to give some guidance on compiling the WiFiDip-KitchenSink mbed example using GCC 4.7.2?

I am currently seeing this error using Netbeans.......
d:/yagarto-20121222/lib/gcc/../../arm-none-eabi/include/c++/4.7.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
In file included from main.cpp:7:0:cc3000_hostdriver_mbedsocket/socket/UDPSocket.h:66:17: fatal error: def.h: No such file or directory
compilation terminated.


Is GCC 4.8 required? Do you have an example HelloWorld project for the WiFiDipcortex platform that can be compiled offline?

Thanks,
Chris
chrisjn52
 
Posts: 5
Joined: Sat Oct 12, 2013 6:06 am

Re: WiFiDip-KitchenSink using GCC

Postby Carl-SolderSplash » Sun Oct 13, 2013 10:54 pm

Hi Chris,

I've not yet tried compiling mbed offline with GCC alone, I did attempt it with LPCxpresso which uses GCC. It's here : https://github.com/SolderSplashLabs/Dipcortex-mbed
But i've hit a wall, the GCC newlib library get's pulled in when you do anything more than toggle an IO. It adds considerable size to the flash section, which means it will no longer fit the 64KB of flash available on the WiFi Dip, the mbed library is quite large!

Mbed have optimised their libraries and compiler get the file size down, Gcc with newlib-nano in 4.8 might work but I have yet to get the time to try that. Keil, which is quite expensive can also compete with mbeds compiled size apparently.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: WiFiDip-KitchenSink using GCC

Postby chrisjn52 » Thu Oct 17, 2013 5:48 am

Hi Carl,
I have managed to build the project in GCC 4.7.3 (using pre-built toolchain from Launchpad) with the mbed-src files. The final bin file size is 68k so it wouldn't fit in Flash as you say. However, when I scrutinise the lst file I see several <UNDEFINED> instructions in the listing.
Do you have any idea what could cause this or how I might track down the source of the problem?
chrisjn52
 
Posts: 5
Joined: Sat Oct 12, 2013 6:06 am

Re: WiFiDip-KitchenSink using GCC

Postby chrisjn52 » Fri Oct 18, 2013 6:21 am

Hi Carl, after some research it seems this might just be word aligment by the linker so I might not have a problem after all?
chrisjn52
 
Posts: 5
Joined: Sat Oct 12, 2013 6:06 am

Re: WiFiDip-KitchenSink using GCC

Postby Carl-SolderSplash » Fri Oct 18, 2013 11:26 am

All I've seen are a few posts on mbed talking about their optimised compiler and support library making it possible. GCC it seems hasn't caught up.

I think the issue is around the printf part of the code, the ARM compiler only includes the code required for the printf conversions being done, where as newlib includes the lot perhaps..

newlib-nano maybe worth a try.

Here are a few posts that talk about it, not sure if this helps :
http://mbed.org/forum/mbed/topic/4226/
https://groups.google.com/forum/#!topic ... Q1rmCzMBRM
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: WiFiDip-KitchenSink using GCC

Postby chrisjn52 » Fri Oct 18, 2013 3:00 pm

Hi Carl, I'm using Newlib-nano from the Launchpad GCC ARM Embedded 4.7-2013-q3-update and I already have the switches set as per the mbed links you highlighted. Unfortunately it is still some way short of the 43K flash footprint using the online compiler, which I believe is Keil based?

If I am correct about Keil then maybe it's possible to use the libraries from the free Keil MDK-Lite version?
Have yo had any luck using the Link Time Optimiser settings in GCC? I get the smallest build with -Os so far (68k).
Any update on the WiFiDipcortex availability?

Chris
chrisjn52
 
Posts: 5
Joined: Sat Oct 12, 2013 6:06 am

Re: WiFiDip-KitchenSink using GCC

Postby Carl-SolderSplash » Fri Oct 18, 2013 10:04 pm

Apparently some of the mbed teams compiler optimisations made it in to keil, someone on the CC3000 mailing list has a license and says they get similar or better compile sizes. Keil is not cheap though!

I'm not sure about mixing compiler libraries, it's not something I have tried before.

Do you need the mbed stack? if your happy with C, the example I will supply post fits in to the processor with no optimisation. Also has USB CDC something i've yet to get on to mbed.

Are you looking at offline compiling for the debug capabilities?

I got word today that the assembled boards are in transit and due to land in the UK early next week.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: WiFiDip-KitchenSink using GCC

Postby chrisjn52 » Sat Oct 19, 2013 9:06 am

I have tried LTO but I get undefined references which seems all too common if you google.

There are significant degrees of freedom when building a project for Arm and I am still unconvinced that I have managed to get my head around all the pitfalls and settings. It would be good to compare someone else's results with this project using GCC so if you hear of anyone trying it then let me know!

I'd certainly like to take a look at the mbed stack example that you have.

Debug is definitely the main driver, I figure on using one of these boards......
http://www.embeddedartists.com/products/lpcxpresso/lpclink2.php
but I would also be interested in any other recommendations you may have.

Cheers
Chris
chrisjn52
 
Posts: 5
Joined: Sat Oct 12, 2013 6:06 am

Re: WiFiDip-KitchenSink using GCC

Postby Carl-SolderSplash » Thu Oct 24, 2013 9:48 am

Yep LPCLinks are good nice and cheap.
On my huge list of software I'd like to do is to get a DipCortex to act as a CMSIS-DAP debugger.

My C project is up on Github now,
https://github.com/SolderSplashLabs/WiFi-DipCortex

This does USB CDC, CC3000 module control, UDP server, TCP Client and a few other examples.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm


Return to WiFi DipCortex

Who is online

Users browsing this forum: No registered users and 5 guests

cron