How to use G400D dev board bootloader to upload application firmware

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?

http://docs.ghielectronics.com/hardware/products/ucm/g400.html

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 4.3.8.1). 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 4.3.8.1). 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 4.3.8.1.

You are using NETMF. You need the old documentation for that here http://old.ghielectronics.com/support/netmf

If you are not shipping a product very soon, we suggest switching to TinyCLR http://docs.ghielectronics.com/tinyclr/intro.html

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 https://www.ghielectronics.com/downloads/ 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;

@trent1098s

Just rename www with old

http://old.ghielectronics.com/downloads/

1 Like

THANKS!

I thought I had lost that link forever…

also you might want to look at IFU, in-field updates. But that’s overkill in many situations, and MFDeploy is the simplest tool to implement and document the process.

1 Like

Where is FEZ Config located in http://old.ghielectronics.com/downloads/FEZ/?
There is several directory related to FEZ.

It is part of the GHI SDK installation. It is on your PC.

Press the Start button. Look for the GHI Electronics section. Check the section for the installed programs.