This repo contains the nano firmware flasher tool. It's a .NET Core CLI Global Tool that allows flashing a .NET nanoFramework target with nanoBooter, nanoCLR, managed application or backup files. Is part of .NET nanoFramework toolbox, along with other various tools that are required in .NET nanoFramework development, usage or repository management.
It makes use of several 3rd party tools:
- Espressif esptool You can find the esptool and licensing information on the repository here.
- QMKDfuSe Tool based on STM DfusSe tool. You can find the source, licensing information and documentation here.
- STM32 Cube Programmer You can find the source, licensing information and documentation here.
- Texas Instruments Uniflash You can find the Uniflash tool and licensing information here.
Perform a one-time install of the .NET nanoFramework Firmware Flasher tool using the following .NET Core CLI command:
dotnet tool install -g nanoff
After a successful installation a message is displayed showing the command that's to be used to call the tool along with the version installed. Similar to the following example:
You can invoke the tool using the following command: nanoff
Tool 'nanoff' (version '9.9.9') was successfully installed.
To update .NET nanoFramework Firmware Flasher tool use the following .NET Core CLI command:
dotnet tool update -g nanoff
Once the tool is installed, you can call it by using its command nanoff
, which is a short version of the name to ease typing.
nanoff [command] [args]
The tool includes help for all available commands. You can see a list of all available ones by entering:
nanoff --help
To update the firmware of an ESP32_WROOM_32 target connected to COM31, to the latest available development version.
nanoff --update --target ESP32_WROOM_32 --serialport COM31
To update the firmware of an ESP32_WROOM_32 target connected to COM31 with a local CLR file (for example from a build). This file has to be a binary file with a valid CLR from a build. No other checks or validations are performed on the file content.
nanoff --update --target ESP32_WROOM_32 --serialport COM31 --clrfile "C:\nf-interpreter\build\nanoCLR.bin"
To deploy a managed application to an ESP32_WROOM_32 target connected to COM31, which has the deployment region at 0x190000 flash address.
Note: The binary file with the deployment image can be found on the Release or Debug folder of a Visual Studio project after a successful build. This file contains everything that's required to deploy a managed application to a target (meaning application executable and all referenced libraries and assemblies).
nanoff --target ESP32_WROOM_32 --serialport COM12 --deploy --image "E:\GitHub\nf-Samples\samples\Blinky\Blinky\bin\Debug\Blinky.bin" --address 0x190000
To update the firmware of an ESP32 target connected to COM31, to the latest available development version. You have to specify the path to the managed application. This example uses the binary format file that was saved on a previous backup operation.
nanoff --update --target ESP32_WROOM_32 --serialport COM31 --deployment "c:\eps32-backups\my_awesome_app.bin"
To update the firmware of the ST_STM32F769I_DISCOVERY target to the latest available stable version using the JTAG connection.
nanoff --update --target ST_STM32F769I_DISCOVERY --jtag
To deploy a managed application to a ST_STM32F769I_DISCOVERY target, which has the deployment region at 0x08080000 flash address and reset the MCU after flashing it.
Note: The binary file with the deployment image can be found on the Release or Debug folder of a Visual Studio project after a successful build. This file contains everything that's required to deploy a managed application to a target (meaning application executable and all referenced libraries and assemblies).
nanoff --target ST_STM32F769I_DISCOVERY --deploy --image "E:\GitHub\nf-Samples\samples\Blinky\Blinky\bin\Debug\Blinky.bin" --address 0x08040000 --reset
To update the firmware of the ST_STM32F769I_DISCOVERY target to the latest available preview version, using a JTAG connection, along with a managed application. You have to specify the path to the managed application. This example uses the binary format file that is generated by Visual Studio when building any nanoFramework C# application. Because it's a binary file you have to specify too the flash address of the deployment region (here 0x08000000, mind the hexadecimal format).
nanoff --update --target ST_STM32F769I_DISCOVERY --preview --jtag --binfile "c:\dev\my awesome app\bin\debug\my_awesome_app.bin" --address 0x08000000
This useful to list all STM32 devices that are connected through JTAG.
nanoff --listjtag
This useful to list all STM32 devices that are connected through DFU.
nanoff --listdfu
To install the drivers for STM32 JTAG connected targets.
nanoff --installjtagdrivers
To install the drivers for STM32 DFU connected targets.
nanoff --installdfudrivers
To update the firmware of the TI_CC1352R1_LAUNCHXL target to the latest preview version.
nanoff --update --target TI_CC1352R1_LAUNCHXL --preview
To install the XDS110 USB drivers.
nanoff --installxdsdrivers
The tool output verbosity can be set through the v|verbosity
option.
This is convenient, for example, if this tool is being used in a automated process where the minimum output is desired to ease processing the return result of the execution. It can be set to:
- q[uiet]
- m[inimal]
- n[ormal]
- d[etailed]
- diag[nostic]
nanoff -v q
The exit codes can be checked in this source file.
To provide feedback, report issues and finding out how to contribute please refer to the Home repo.
Join our Discord community here.
The list of contributors to this project can be found at CONTRIBUTORS.
The nanoFramework firmware flasher tool is licensed under the MIT license.
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behaviour in our community. For more information see the .NET Foundation Code of Conduct.
This project is supported by the .NET Foundation.