Project

General

Profile

Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - FIXED

Added by DaveStyles about 11 years ago

Hi all..

It almost compiles, but there's def a problem, but I know what it is ! but its not good.

A while ago, mbed (the team) removed rpc.h from the mbed library, and put it in it's own library mbed-rpc library with some other rpc stuff.

The version of the mbed SDK in GCC4MBED was 43, and I believe this did have rpc.h in it, and there are calls to rpc.h buried in some of the other libraries.

EDIT
It had rpc.h in it, but it fails due to other reasons. Does anybody know which version of the mbed SDK the laos code compiles with?
  • ***

Adam has updated GCC4MBED very recently with the new mbed SDK, and rpc.h is gone, and now the code that is in github no longer compiles with GCC4MBED.

(This is completely different to all my other issues, which turned out to be path issues)

I don't know if it's possible to add mbed-rpc to Adam's GCC4MBED release.

I'll ask him.

Meanwhile, hang on to your mbed sdk at back level, I don't believe the src in github will compile with the new one.

(PS. I took the source into the online compiler, exactly the same problem there)


Replies (10)

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - Added by peter about 11 years ago

This was one of the reasons we wanted to switch from online to offline compiler environment: The online compiler gave us a number of occasions
in the past where our (unchanged) code would not compile or run anymore.

I'm in the process of making a clean Linux VM to compiler the source, according to this procedure (but using an older version of GCC4MBED):

http://jeelabs.net/projects/tosca/wiki/ARM_toolchain_setup_GCC4ARM

We seem to be using "revision 43" of the mbed libraries

See also:

http://mbed.org/handbook/mbed-Library-Releases

I can also see what is required to compile the source with the latest MBED lib.

I would "love" to see a working eclipse workspace with debugging for the MBED!

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - Added by peter about 11 years ago

I have removed the offending include from the source, and checked it with the latest GCC4MBED: now it compiles
(have not checked the functionality of the binary)

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - Added by DaveStyles about 11 years ago

Ok, now I'm confused.
I think the rpc.h include was needed because there are some calls to rpc methods in the Netservices library.
Without that include, don't the netservices not compile, or is it something else you've removed ?

I have a nice eclipse environment up.. if you could post the source up, (or email to me as zip would be fine), I'll see if I can get it to compile in Eclipse.

Then I'll get the debugger working.. then I'll write a set of instructions and set off on getting the flow switch / extraction added etc etc.

I have a v4.0 board built, and a K40-III laser with no controller (it melted), I have a feeling that shortly this will be the conversion of choice for a K40-III !!

(especially as I'll document my conversion)

cheers,

Dave.

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - Added by peter about 11 years ago

Hi dave.
I checked in the sources in git. Just pull.

Rpc lib was removed from the core by mbed (see changelog). You can still include it
(seperate download). AFAIK we do not use any rpc. Just removing the include line
Solves the problem.

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - Added by Anonymous about 11 years ago

I did create a branch of GCC4MBED before upgrading it. You should be able to issue the following git command after cloning gcc4mbed to get the older version:

git checkout gcc4.6-2012-q1_mbed43

You could also just pull a version of GCC4MBED into your project so that you don't need to worry about updates that I make in the future. I think there is an update I will be making in 2 weeks that you might want to update to and then pull into your project. It will have some advantages over current versions for a project like yours.

-Adam

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - FIXED - Added by DaveStyles about 11 years ago

Thankyou Adam. and I mean THANKYOU !

Do you know I use the phrase "standing on the shoulders of giants" a LOT within the embedded community, and you know why ?
Because I find I can do amazing things because I get to stand on the shoulders of giants.

when I was trying to regress to build 43, I was just regressing to the mbed SDK build 43,.. I've just pulled in the gcc build from above and of course it also had some differences in the gcc4mbed.c (which was bigger) and may have had other differences !

anyway.. I don't understand exactly why.. but it now works.

Hurrah !!

Now to try and understand the code, and then to get it running in debug, and then to put my rev4 board on my K40-III and then to replace the mbed and pololu drivers on the rev4.

btw.. has anyone noticed the new official mbed HDK ?

or.. how to eliminate mbed from your design !!

mbed.org/betamode if you have an account will tell you all about it !

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - FIXED - Added by peteruithoven almost 11 years ago

After installing the gcc4.6-2012-q1_mbed43 branch of GCC4MBED. I get the following error when compiling.
make: arm-none-eabi-gcc: No such file or directory
make: *** [LPC176x/./FATFileSystem/ff.o] Error 1

Whole proces:
  1. git cloning GCC4MBED
  2. checking out gcc4.6-2012-q1_mbed43 branch
  3. running mac_install
  4. running BuildShell
  5. downloading firmware
  6. coping laser folder to the gcc4mbed folder
  7. running make in this laser folder

Do I need to make a virtual machine as explained on the following page?
http://jeelabs.net/projects/tosca/wiki/ARM_toolchain_setup_GCC4ARM

Any tips anyone?

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - FIXED - Added by Springuin almost 11 years ago

You are missing the compiler. VM is not neccesary, you can just do it in your normal environment.

wget https://github.com/adamgreen/gcc4mbed/zipball/master
mv master adamgreen-gcc4mbed.zip
unzip adamgreen-gcc4mbed.zip
mv adamgreen-gcc4mbed-* gcc4mbed
cd gcc4mbed
./linux_install

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - FIXED - Added by peteruithoven almost 11 years ago

Hi Springuin, that's exacly what I did, on OS X. I also tried the commands you suggested in Ubuntu. This ended in:

make[2]: Entering directory `/home/peteruithoven/gcc4mbed/samples/HelloWorld'
Compiling main.cpp
make[2]: Leaving directory `/home/peteruithoven/gcc4mbed/samples/HelloWorld'
make[1]: Leaving directory `/home/peteruithoven/gcc4mbed/samples'
make[2]: arm-none-eabi-g++: Command not found
make[2]: *** [LPC176x/./main.o] Error 127
make[1]: *** [HelloWorld] Error 2
make: *** [samples] Error 2
Wed May 15 21:47:54 CEST 2013 Failure forced early exit

I found the following tip on the gcc4mbed github page.
https://github.com/adamgreen/gcc4mbed
The Linux install only installs 32-bit Intel binaries. If you are running a 64-bit version of Intel Linux then you may need to install the 32-bit support libraries. This problem typically shows up as a file not found error when you attempt to run tools such as arm-none-eabi-g++. On Ubuntu, the necessary libraries can be installed by running sudo apt-get install ia32-libs

Then I downloaded the firmware from github
Placed the laser folder into the gcc4mbed.
called make
And it compiled

I'll check how the lasercutters responds to this bin.

RE: Urgent : Tracked it down, but it's a worry. Doesn't compile with current mbed sdk. - FIXED - Added by peteruithoven almost 11 years ago

The strange thing for OS X is that the installation was successful, I can read that in the install log. Even the samples where all compiled. But when I place laser in the gcc4mbed folder and run make it fails.


mkdir -p LPC176x/./FATFileSystem/ > /dev/null 2>&1 ; exit 0
arm-none-eabi-gcc -O2 -g -mcpu=cortex-m3 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-exceptions -fno-delete-null-pointer-checks -I./ -I./ConfigFile/ -I./FATFileSystem/ -I./FATFileSystem/option/ -I./LPC176x/ -I./LaosDisplay/ -I./LaosFile/ -I./LaosFile/SDFileSystem/ -I./LaosIO/ -I./LaosMenu/ -I./LaosMotion/ -I./LaosMotion/grbl/ -I./LaosServer/ -I./LaosServer/TFTPServer/ -I./NetServices/ -I./NetServices/api/ -I./NetServices/core/ -I./NetServices/dbg/ -I./NetServices/drv/ -I./NetServices/drv/at/ -I./NetServices/drv/eth/ -I./NetServices/drv/gprs/ -I./NetServices/drv/gprsmodule/ -I./NetServices/drv/serial/ -I./NetServices/drv/serial/buf/ -I./NetServices/drv/serial/lwip/ -I./NetServices/drv/serial/usb/ -I./NetServices/drv/umtsstick/ -I./NetServices/drv/usb/ -I./NetServices/if/ -I./NetServices/if/eth/ -I./NetServices/if/gprsmodule/ -I./NetServices/if/lwip/ -I./NetServices/if/net/ -I./NetServices/if/ppp/ -I./NetServices/if/umtsstick/ -I./NetServices/lwip/ -I./NetServices/lwip/arch/ -I./NetServices/lwip/core/ -I./NetServices/lwip/core/ipv4/ -I./NetServices/lwip/core/snmp/ -I./NetServices/lwip/include/ -I./NetServices/lwip/include/ipv4/ -I./NetServices/lwip/include/lwip/ -I./NetServices/lwip/include/netif/ -I./NetServices/lwip/netif/ -I./NetServices/lwip/netif/ppp/ -I./NetServices/services/ -I./NetServices/services/email/ -I./NetServices/services/email/smtp/ -I./NetServices/services/http/ -I./NetServices/services/http/client/ -I./NetServices/services/http/server/ -I./NetServices/services/http/util/ -I./NetServices/services/mysql/ -I./NetServices/services/ntp/ -I../../gcc4mbed/mri -I../../gcc4mbed/external/mbed -I../../gcc4mbed/external/mbed/LPC1768 -DTARGET_LPC1768 -DMRI_ENABLE=0 -DMRI_INIT_PARAMETERS='"MRI_UART_MBED_USB"' -DMRI_BREAK_ON_INIT=1 -DMRI_SEMIHOST_STDIO=0 -MMD -MP -Wall -Wextra -Wno-unused-parameter -Wcast-align -Wpointer-arith -Wredundant-decls -Wcast-qual -Wcast-align -c FATFileSystem/ff.c -o LPC176x/./FATFileSystem/ff.o
make: arm-none-eabi-gcc: No such file or directory
make: *** [LPC176x/./FATFileSystem/ff.o] Error 1

As a maker OS X is fitting me less and less.

    (1-10/10)