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?
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 22.214.171.124). 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 126.96.36.199). This is not the application firmware.
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 188.8.131.52.
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…
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?
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.