Main Site Documentation

How to flash on-module firmware?


Has anyone come up with a clever way to allow flashing of on-module firmware without requiring additional hardware?

There are a few Gadgeteer modules I’ve love to create, but without the ability to deploy bug fixes, I’m hesitant. I could add a USB connection and bootloader and everything, but I suspect that would be confusing to most users. I assume GHI has this figured out as there are a number of modules with firmware on them.

I usually use STM32F0, STM32F2 or even STM32F4 for these projects.




Just extra socket and may be couple of resistors. Take a look at DL40.


This is my naïve knowledge of DL40. I think it’s been created such that it’s easily possible to deploy a new version of the firmware within an app, as a one-off project. That’s how I’d tackle it if I wasn’t using a DL40.



Any idea how it flashes? Module source and flashing code available? I saw the schematic.



I think it is on Wiki.
There is a link at the bottom.


Does this help?


Thanks. I see it only supports the nxp chips. Has anyone tried to adapt to stm32? It also supports uart flashing, but I’m not sure if the two are compatible in approach.



Or, to ask another way: what is the open source mainboard driver support that has been created to flash these using the U socket? Is it NETMF code that we could change to support flashing our own stuff, or is it baked into the firmware of one or more of the mainboards?

It looks like if I just modify the source code linked on that wiki page, I may be able to do it. I just want to verify that there’s nothing lower-level going on on the mainboard.




@ Pete Brown - The LPC111x chips used on the DL40 support being updated/flashed via the UART. The only trick is toggling the loader and reset pins to put the device into ISP (In-System Programming) mode. But everything can be done using managed code without any additional hardware or firmware support other than the standard GPIO and UART capabilities.

The process and protocol is described in Chapter 26 of the user manual.

To be honest, I found the GHI source is much easier to read and understand than the user manual, I also ported the code to the Cerberus (the port is on codeshare) using a button and the debug window to replace the touch+LCD interface.

This is a super nice little chip, it hardly needs any external components to run, no crystal required etc. all pins are interrupt capable etc. etc. If you are interested, I have a general purpose daisylink firmware that provides access to most the capabilities of the DL40
Binaries :
Source :

I have no idea as to whether the STM32 chips support this capability, would be interesting to know.


The LPC chips have built in loader (from manufacture) that has a documented protocol (in LPC manual) and that is what we implemented and made open source.

If STM32 (or any other micro) has similar feature and it is documented, then you can duplicate what we did. I am near positive STM32 chips have serial loader so it is a matter of writing some code…and it would be great to add it to the Open DaisyLink project so then we will support LPC and STM32.

Why did GHI select LPC not STM32? Because they offer DIP chip that you can simply plug in a breadboard. This should help the community in building modules without the need to make any PCB, just use a breadboard.


@ Gus - the Dip version is hard to come by tho…
I am embarking on the DL adventure but have found it hard to source the Dip so just doing my usual seat of the pants design and build a board and hope it works :smiley:


@ Justin

About 3,000 in stock :slight_smile: And $2.55 in single quantity. Combine this with $1 breakout module and you have a programmable module for under $10 and it supports all the features you want.

@ Pete Brown, do not forget that the open daisylink project is backed by many open source modules and the daisylink protocol implementation, so it the easy way. But if you were to implement all this on STM32 and share then that would be fantastic. I like how STM32 Cortex-M0 chips have analog out but LPC doesn’t so I have use of STM32 on couple modules :wink:


@ Gus - yeah i know you can get them from mouser, im moaning about the local suppliers for the Uk.
RS and Farnell don’t stock the dip which is annoying so i have to wait until i need a few other bits i cant get locally before i head to Texas…
I shall just have to suffer in silence:D


@ Justin - I have couple laying around somewhere in the office. Leave me a note with your next order and will throw in a couple of chips for you :slight_smile: (disclaimer: if I found them!)


@ Gus - cheers, and if its anything like my desk… :smiley:


Thanks guys. Not sure if I’ll use Daisylink on this board or not. Right now, I have it routed for uart. I’ll read up more on OpenDaisyLink before I send this off to be manufactured.

This is the board, btw:

Things like this plug into it:

WIth the intention of controlling things like this:

and this:

and this:

and this:




@ Pete Brown - cool looking board :slight_smile:


Nice one, Pete. That’s one serious module!


Needs to be by looking at that third image, looks like a telephone exchange from the 1950’s!!!


Good one!