Most microcontroller manufacturers give you some kind of free development toolchain or IDE with their silicon products. Often it’s crippled, closed source, and a large download. This is pretty inconvenient when you want to have firmware that’s easy to build and distribute. I’ve found many of these toolchains to be annoying to use, and requiring closed source software to build open source firmware seems less than desirable.
It’s possible to build code for most microcontrollers using command line tools. You’ll need a compiler, the device manufacturer’s libraries and header files, and some method of flashing the device. A lot of these tools are open source, which lets you have an open source toolchain that builds your project.
Setting up these tools can be a bit tricky, so I’m building a set of templates to make it easier. Each template has instructions on setting up the toolchain, a Makefile to build the firmware, and sample code to get up and running quickly. It’s all public domain, so you can use it for whatever you’d like.
Currently there’s support for AVR, MSP430, Stellaris ARM, and STM32L1. More devices are in the works, and suggestions are welcome. Hopefully this helps people get started building firmware that’s easy to build and distribute with projects.
Only plans to support PIC18 and PIC32? Microchip have been producing their line of C compilers for PIC’s all the way down to 12F, seems strange to ignore everything below PIC 18.
To be honest, I just stuck PIC18 there as a placeholder. I think it will be easy to get support for PIC12 and PIC16 with SDCC, an open source C compiler. Haven’t used the low end PICs in a little while though.
Oh, and if anyone wants to contribute, let me know!
I’d like to contribute both our LPC13xx libraries (the LPC1343 and LPC1347 families have some slight but important differences), and also the LPC176x library. These are all original libraries developed by us (me), offered under BSD 3-clause license, but I’m happy to go with Unlicense. There is currently some good documentation for the LPC1343 library: http://universalair.co.uk/control/forebrain#functions but not for the others.
The LPC1343 code is specifically written for the Forebrain LPC1343 dev board, but is written in a way that makes it useable on any LPC1343 board. You donidn’t include
whoops, I meant to say: you didn’t include any contact details in the post, but then I found your twitter handle and stuff via your personal page. Please let me know how best to get in touch with you if you’re interested.
Based on UAir’s work, I’ve done a small amount of work to get things running nicely under Linux:
http://forums.hackaday.com/viewtopic.php?f=2&t=2556
It’s no terrible departure from their stock code, but I wrote up step-by-step directions (apologies if UAir has re-published it and made this comment redundant), which might be of interest.
I’ll also be hacking on it a little more to get it working with the LPC1778 sometime in the near future, and can try to remember to post updates.
You might be interested then in the LPC176x libraries we’re working on, it might be a smaller jump from there to the LPC1778 than from the LPC13xx up.
Got a link? I’m all for not reinventing the wheel…
Oops. I’ve added contact details. Thanks!
Have contacted you, thanks.
Should also mention that in terms of the library, there’s only minor differences between the LPC13xx series M3 and LPC11xx series M0, but there are two distinct “generations” that you have to be careful of for each, but other than that, porting code is straightforward.
Also this is us: http://www.arm.com/community/partners/display_product/rw/ProductId/7315/
I have one sort of working for the LPC1768/LPC1769
https://github.com/alvarop/arm-gcc-barebones
Nice, I’ll check it out.
I can contribute STM32F1x support if anyone is interested
Great! Get in touch and we’ll make it happen.
Excellent initiative !
Let’s hope people help you out with this .
Honestly, Atmel’s stuff has always been free and non-crippled. The IDE is actually really nice if your running windows. None the less, this will be a great tool, especially for a lot of the new ARM stuff coming out!
Atmel is probably the best for this. I like Atmel for that :)
That’s not true, it has been free for the past 6-7 years, but before that Atmel didn’t offer the gcc option at all.
Good thing it went free, it has really boosted usage, compatibility and documentation. It really shows what OpenSource has to offer :-)
Indeed. Now if only they would get their supply chain sorted out… Been burned once too often by their moronic shit. 41 weeks IS NOT an acceptable lead time :(
I think that we will be able to talk about Open Source Hardware when the architecture of the processor itself is Open Source, like for the COFE processor (open source hardware developped for academical purposes) that could be synthetized on an FPGA. Taking an open source IDE for developing on ARM based processors and others are not enough, but important though.
Yes, an open source architecture that’s actually available in silicon would be very cool. The OpenRISC is one example of an open core, but it’s not widely used since you need to run it on a FPGA. They’re working on an ASIC though apparently.
I’ve seen this advocated, and I can see why it’s interesting, but I can’t see why it’s _useful_, or more useful than a sufficiently accessible and documented platform. For all practical purposes you’re going to want an ASIC.
Like!
I’d help but sadly lacking in that arena B^(
CodeBlocks pretty much has template and compiler settings for AVR build into it. Making it very easy to do AVR building. (Not sure about the rest of the chips)
Thanks!
This sounds wonderful. Especially for my 2 stellaris launchpads, which have remained mostly unused (even with the stellarisware+gcc post earlier, it was just so much of a hassle to build for)
Including a disassembler would make this. <- pun intended