Main Site Documentation

How to flash on-module firmware?


#1

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.

Thanks.

Pete


#2

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


#3

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.


#4

Thanks.

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

Pete


#5

I think it is on Wiki.
http://wiki.tinyclr.com/index.php?title=DL40_Module
There is a link at the bottom.


#6

Does this help? http://wiki.tinyclr.com/index.php?title=OpenDaisyLink


#7

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.

Pete


#8

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.

Thanks.

Pete


#9

@ 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 : http://www.tinyclr.com/codeshare/entry/633
Source : https://dl40io.codeplex.com/

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


#10

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.


#11

@ 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:


#12

@ Justin http://www.mouser.com/ProductDetail/NXP/LPC1114FN28-10212/?qs=%2Fha2pyFadugl0%2FOncVKr8jJ15GYQ%2FF2DJCTzLWozZ58%3D

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:


#13

@ 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


#14

@ 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!)


#15

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


#16

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:
http://till-kopper.de/dot-com_52_units_of_synthesizers_dot_com_i.jpg

and this:
http://www.bing.com/images/search?q=roland+TR-909&qs=n&form=QBIR&pq=roland+tr-909&sc=0-0&sp=-1&sk=

and this:
http://www.bing.com/images/search?q=roland+TB-303&qs=n&form=QBIR&pq=roland+tb-303&sc=0-0&sp=-1&sk=

and this:
http://www.bing.com/images/search?q=virus+ti&qs=n&form=QBIR&pq=virus+ti&sc=0-0&sp=-1&sk=

:slight_smile:

Pete


#17

@ Pete Brown - cool looking board :slight_smile:


#18

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


#19

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


#20

Good one!