How to use G400D dev board bootloader to upload application firmware

I am using Microsoft Visual Studio Community 2013 C# to develop firmware for G400-D Dev Board. Now I am using USB-Debug port on Dev Board for development.

I know there is a bootloader inside microcontroller. How to use USB<->Serial COM1 or RS232 COMM2 port to upload hex file into the Atmel microcontroller? With Microsoft Visual Studio Community 2013, how to generate hex file? I looked at GHI Bootloader document, cannot understand it. Is there a step by step procedure of doing it?

Start here

I read this document, still did not understand how to do it.

I use FEZ Config to get Loader(TinyBooter) version, Firmware(TinyCLR) version from G400D dev board.

Have you used Fezconfig to update your board?

If so, you are ready to program. You connect your board to the pc, and when you hit debug in visual studio, your program is compiled and transferred to board. This is explained in document.

I know how to do the debug on the program. I do not know how to load firmware using bootloader with the serial communication, not debugging the code.

You can load the firmware using Fez Config and a serial port.

Are you asking how to move the debug port from USB to serial? You need to ground a pin and then boot. The G400 datasheet should tell you which pin needs to be grounded. I believe it is the Mode pin.

Is this what you are looking for?

It seems that you are not fully understand my question.

Normally for the regular microcontroller I need to develop bootloader and load it into the microcontroller through debugger or programmer. Then I will use embedded C compiler to convert my application firmware into hex or bin file and use Tera Term to load hex or bin file into the microcontroller through serial port.

I know for GHI G400-D dev board there is a bootloader installed (I use FEZ Config to get Loader(TinyBooter) version The question is how to convert my application compiled from Microsoft Visual Studio Community 2013 C# into hex or bin file and use Tera Term to load hex or bin file into the microcontroller through serial port(USB<->Serial COM1 of G400-D dev board).

I read the loading firmware section from GHI website, it use Tera Term to load GLB file, which I assume was loaded before the G400-D dev board shipped out from factory(I use FEZ config to see Firmware(TinyCLR) version This is not the application firmware.

I think you are mixing things up. Are you using TinyCLR or NETMF? They are very different.

Now I just use Microsoft Visual Studio Community 2013 C# to read GPIO. I assume I am using NETMF. I don’t know whether I use TinyCLR or not. I only use FEZ config to see Firmware(TinyCLR) version

You are using NETMF. You need the old documentation for that here

If you are not shipping a product very soon, we suggest switching to TinyCLR

I am in a hurry so only use NETMF. How do you answer my previous question which has 4 paragraphs?

you can deploy your application directly from within visual studio

you dont need to develop your own bootloader as this is proprietary from ghi and already installed on your device or during update through fez config or other tools

So, simply put, you need to ignore your previous thoughts about firmware, bootloaders, and loading applications.

With netmf, you do not develop a firmware. You develop an application that is interpreted by the existing firmware. In your case, you need to install the bootloader and netmf firmware that comes with the GHI SDK onto your device. You will then develop an application within VS, and you then deploy it direct from within VS to your device, where it is then interpreted and executed. You remain within VS to debug the app, over USB, and it’s all just simple…

Don’t need to worry about all of that.

You write the application in C# in VS2013. Hit F5 to deploy and test. Unplug the board from your dev computer, the application stays resident on the device and will automatically start and run whenever the dev board is plugged in to a power source.

The boot loader is already on from the beginning. The firmware is already on from the beginning. When you compile with the board pluggd in and selected in VS2013’s compile option, your hex files are automatically sent to the board. Whenever that board powers up next time, independently of the computer, it will run the last version of the program you deployed to it.

That’s how you test and develop and get it working.

Or are you talking about after it is in place, and running in the field, how to update it?

I am talking about after it is running in the field, how to update it?

You can use MFDeploy or the Deployment option (bottom left button) in FEZConfig to deploy hex files to the boards. Those are generated and should be under the bin directory when you compile your application in visual studio.

There are links on google to the documentation for this but they link to invalid addresses on the new website. Not sure where the documentation ended up.

I used to pull schematics and documents from but that link apparently doesn’t work anymore. Not sure exactly where they moved documentation to at the moment… @Gus_Issa where’d you hide the docs???

Microsoft documentation on MFDeploy here;


Just rename www with old

1 Like