Project

General

Profile

Compilation with with open source MBED from GitHub

Added by peteruithoven over 10 years ago

I was trying, what I think is the better way of compiling the source (open source MBED from GitHub), but I ran into 2 small issues.

During compilation it can't find "C:/arm-none-eabi-gcc-4_7/bin/arm-none-eabi-as" which makes sense. This is the GCC_ARM_PATH path in Firmware/mbed/workspace_tools/settings.py.
So I downloaded the GCC ARM toolchain from the following page and updated the above path
https://launchpad.net/gcc-arm-embedded/+download
This seemed to work, so I added these steps to the wiki. Please correct if necessary.

But now, probably a noob question, where can i find the compiled .bin file?


Replies (9)

RE: Compilation with with open source MBED from GitHub - Added by jaap over 10 years ago

It doesn't work 100% yet.

If you need firmware, compile with gcc4mbed

pbrier is working on this issue. It involves removing the ethernet and sd card libraries that we use and linking to the new mbed libraries.

I started a "how to compile with open source MBED" page, will update it with more info when it actually works...

http://redmine.laoslaser.org/projects/laos/wiki/CompilingFirmware#with-open-source-MBED-from-GitHub

RE: Compilation with with open source MBED from GitHub - Added by jaap over 10 years ago

I finally got it to work! It involved a complete rewrite of the networking + TFTP code.
Now LaOS firmware can be compiled with the open source mbed libs.

I would like some beta-testers for this!

The LaOS firmware in branch mbed-gcc should be working identical to the master branch, but it compiles with gcc-arm.
The README.creole files contains instructions: "Build setup, using MBED library sources (No GCC4MBED requried)".

Back up your working laos binary before you replace it, and please see if you find any bugs that I overlooked while testing!

RE: Compilation with with open source MBED from GitHub - Added by peteruithoven over 10 years ago

Might be a bit late to ask this, but why is this compilation method better? Is it the official MBED way and thus better supported?

RE: Compilation with with open source MBED from GitHub - Added by peteruithoven over 10 years ago

I updated the following wiki page with your README.creole text.

http://redmine.laoslaser.org/projects/laos/wiki/CompilingFirmware

Running the last command ("python workspace_tools/make.py -m LPC1768 -t GCC_ARM -n laser"), I get:

Traceback (most recent call last):
  File "workspace_tools/make.py", line 108, in <module>
    p = TEST_MAP[n].n  
KeyError: 'laser'

RE: Compilation with with open source MBED from GitHub - Added by jaap over 10 years ago

Hi Peter,

Appartently your "patch" command didn't work. The error means there is no "test environment" called laser, which is what is created with the patch command in README.creole.

RE: Compilation with with open source MBED from GitHub - Added by jaap over 10 years ago

On your question, why "gcc-mbed": Because this way, you compile using only open source libraries. The older MBED libraries are closed source and contain bugs that we cannot circumvent, the newer version is open so when we find a bug, at least we can pinpoint it and try to fix.

RE: Compilation with with open source MBED from GitHub - Added by peteruithoven over 10 years ago

Ah, thanks for the tip. I tried again, using the latest wiki explanation and I now have a laser.bin. Will test soon how it performs.

And thanks for the explanation, that's a very good reason.

RE: Compilation with with open source MBED from GitHub - Added by peteruithoven over 10 years ago

Seems to work fine.
For me a big bonus is that I can even compile it on OS X.
And indeed, now the first time I send a file after booting the lasercutter it works, you don't have to send it twice anymore. Very nice!

    (1-9/9)