You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/building/build-esp32.md
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,14 @@
1
1
# How to Build, Flash and Debug the ESP32 nanoCLR on Windows using Visual Code
2
2
3
+
⚠️ NOTE about the need to build .NET **nanoFramework** firmware ⚠️
4
+
5
+
You only need to build it if you plan to debug the native code, add new targets or add new features at native level.
6
+
If your goal is to code in C# you just have to flash your MCU with the appropriate firmware image.
7
+
There are available ready to flash firmware images for several targets, please check the [Home](https://github.com/nanoframework/Home#firmware-for-reference-boards) repository.
8
+
3
9
## About this document
4
10
5
-
This document describes how to build the required images for .NET **nanoFramework** for ESP32 targets.
11
+
This document describes how to build the required images for .NET **nanoFramework**firmware for ESP32 targets.
6
12
The build is based on CMake tool to ease the development in all major platforms.
7
13
8
14
## Using Dev Container
@@ -74,17 +80,17 @@ After cloning the repo, you need to setup the build environment. You can use the
-**Step 5**: At the options screen, know that you don't have to install all the tools there. Follow the recomended option to be able to build .NET nanoFramework. Also note that you may want to install the toolchains only for the chip serie(s) that you're planning to build for.
83
+
-**Step 5**: At the options screen, know that you don't have to install all the tools there. Follow the recommended option to be able to build .NET nanoFramework. Also note that you may want to install the toolchains only for the chip serie(s) that you're planning to build for.
-**Step 6**: The install step may prompt you for permission on installing drivers and launch secondary installers. And be aware that it can take a while to complete...
82
88
83
-
-**Step 7**: After the installer completes, open a command prompt at the IDF repository location with elevated permisssion and execute the script `install`. This will *hopefully* install all the requirements and prerequisites.
89
+
-**Step 7**: After the installer completes, open a command prompt at the IDF repository location with elevated permission and execute the script `install`. This will *hopefully* install all the requirements and prerequisites.
84
90
85
-
-**Step 8**: Now execute the script `export`. This will *hopefully* update the path environement variable of your machine. You can check the success of the operation by opening another cmd prompt and print the content of the path variable.
91
+
-**Step 8**: Now execute the script `export`. This will *hopefully* update the path environment variable of your machine. You can check the success of the operation by opening another cmd prompt and print the content of the path variable.
86
92
87
-
-**Step 9**: Calling the above scripts it's not 100% guaranteed to effectivelly install everything and updates the path. This can be because of permission issues, updating the path variable and others. Here's the image of the path on a machine where the update was succesfull so you can compare it.
93
+
-**Step 9**: Calling the above scripts it's not 100% guaranteed to effectively install everything and updates the path. This can be because of permission issues, updating the path variable and others. Here's the image of the path on a machine where the update was successful so you can compare it.
Copy file name to clipboardExpand all lines: content/building/build-in-visual-studio.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Building .NET **nanoFramework** in Visual Studio
2
2
3
+
⚠️ NOTE about the need to build .NET **nanoFramework** firmware ⚠️
4
+
5
+
You only need to build it if you plan to debug the native code, add new targets or add new features at native level.
6
+
If your goal is to code in C# you just have to flash your MCU with the appropriate firmware image.
7
+
There are available ready to flash firmware images for several targets, please check the [Home](https://github.com/nanoframework/Home#firmware-for-reference-boards) repository.
8
+
3
9
## Developing firmware for the nanoframework using Visual Studio 2019 community edition
4
10
5
11
[(See below for VS2017)](#developing-firmware-for-the-nanoframework-using-visual-studio-2017-community-edition)
Copy file name to clipboardExpand all lines: content/building/build-instructions.md
+16-10Lines changed: 16 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Building .NET **nanoFramework**
1
+
# Building .NET **nanoFramework** firmware
2
2
3
3
.NET **nanoFramework** build system is based in CMake. Please read the instructions specific to each target series.
4
4
@@ -7,9 +7,15 @@
7
7
-[NXP](build-nxp.md)
8
8
-[Using Dev Container](using-dev-container.md)
9
9
10
+
⚠️ NOTE about the need to build .NET **nanoFramework** firmware ⚠️
11
+
12
+
You only need to build it if you plan to debug the native code, add new targets or add new features at native level.
13
+
If your goal is to code in C# you just have to flash your MCU with the appropriate firmware image.
14
+
There are available ready to flash firmware images for several targets, please check the [Home](https://github.com/nanoframework/Home#firmware-for-reference-boards) repository.
15
+
10
16
## About this document
11
17
12
-
This document describes how to build the required images for .NET **nanoFramework** to be flashed in a SoC or MCU.
18
+
This document describes how to build the required images for .NET **nanoFramework**firmware to be flashed in a SoC or MCU.
13
19
The build is based on CMake tool to ease the development in all major platforms.
14
20
15
21
## Using Dev Container
@@ -36,8 +42,8 @@ If you are using VS Code as your development platform we suggest that you use th
36
42
37
43
In case you specify an RTOS and you want its source to be downloaded from the official repository, you'll need:
38
44
39
-
- For FreeRTOS a SVN client. [Tortoise SVN](https://tortoisesvn.net/downloads) seems to be a popular choice for Windows machines.
40
-
- For ChibiOS a Git client. [GitHub Desktop](https://desktop.github.com/) seems to be a popular choice for Windows machines.
45
+
- For ChibiOS a SVN client. [Tortoise SVN](https://tortoisesvn.net/downloads) seems to be a popular choice for Windows machines.
46
+
- For all the other repositories a Git client.[Fork](https://git-fork.com/) it's a great visual git client packed with a lot of features or[GitHub Desktop](https://desktop.github.com/) seems to be a popular choice for Windows machines.
41
47
42
48
## Preparation
43
49
@@ -48,11 +54,11 @@ In case you need to clean up or start a fresh build all you have to do is simply
48
54
49
55
As a suggestion we recommend that you create a directory named *build* in the repository root and run CMake from there.
50
56
51
-
## Build a .NET **nanoFramework** image
57
+
## Build a .NET **nanoFramework**firmware image
52
58
53
59
The build script accepts the a number of parameters (some of them are mandatory). Please check the details about each parameter [here](cmake-tools-cmake-variants.md#content-explained).
54
60
55
-
_Note 1: The RTOS currently supported (except for ESP32 target) is ChibiOS. If no source path is specified the source files will be downloaded from nanoFramework GitHub fork._
61
+
_Note 1: The RTOSes currently supported (except for ESP32 target) are ChibiOS and FreeRTOS. If no source path is specified the source files will be downloaded from nanoFramework GitHub fork._
56
62
_Note 2: the very first build will take more or less time depending on the download speed of the Internet connection of the machine were the build is running. This is because the source code of the RTOS of your choice will be downloaded from its repository. On the subsequent builds this won't happen._
57
63
58
64
You can specify any generator that is supported in the platform where you are building.
@@ -87,12 +93,12 @@ cmake \
87
93
-DCHIBIOS_BOARD=ST_NUCLEO144_F746ZG \
88
94
-DTARGET_SERIES=STM32F7xx \
89
95
-DNF_FEATURE_DEBUGGER=TRUE \
90
-
-DAPI_Windows.Devices.Gpio=ON \
96
+
-DAPI_System.Device.Gpio=ON \
91
97
-DNF_FEATURE_RTC=ON \
92
98
-G "NMake Makefiles" ../
93
99
```
94
100
95
-
This will call CMake (on your *build* directory that is assumed to be under the repository root) specifying the location of the toolchain install, specifying that ChibiOS sources to be used are located in the designated path (mind the forward slash and no ending slash), that the target board is named ST_NUCLEO144_F746ZG, that STM32F7xx is the series name that it belongs to, debugger feature is to be included, Windows.Devices.Gpio API is to be included, RTC is used and that the build files suitable for NMake are to be generated.
101
+
This will call CMake (on your *build* directory that is assumed to be under the repository root) specifying the location of the toolchain install, specifying that ChibiOS sources to be used are located in the designated path (mind the forward slash and no ending slash), that the target board is named ST_NUCLEO144_F746ZG, that STM32F7xx is the series name that it belongs to, debugger feature is to be included, System.Device.Gpio API is to be included, RTC is used and that the build files suitable for NMake are to be generated.
96
102
97
103
After successful completion you'll have the build files ready to be used in the target build tool.
98
104
@@ -106,9 +112,9 @@ Follows a brief explanation on the files you might want to tweak.
106
112
- launch.json (inside .vscode folder) here you can set up your launch configurations, such as gdb path or OpenOCD configuration. We've made available Gists with launch.json for several of the reference targets. Grab yours from [here](https://gist.github.com/nfbot). :warning: Remember to update paths and other preferences according to your setup and machine configuration. :wink:
107
113
- cmake-variants.json (at the repository root) here you can add several build flavors. You can even add variants to each one. Check the documentation extension [here](https://vector-of-bool.github.io/docs/vscode-cmake-tools/variants.html#). We've made available Gists with cmake-variants.json for each of the reference targets. Grab yours from [here](https://gist.github.com/nfbot). :warning: Remember to update paths and other preferences according to your setup and machine configuration. :wink:
108
114
109
-
To launch the build in VS Code check the status bar at the bottom. Select the build flavor and then click the build button (or hit F7).
115
+
To launch the build in VS Code check the status bar at the bottom. Select the build flavour and then click the build button (or hit <kbd>F7</kbd>).
Copy file name to clipboardExpand all lines: content/building/build-nxp.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,14 @@
1
1
# How to Build, Flash and Debug the NXP nanoBooter and nanoCLR on Windows using Visual Studio Code
2
2
3
+
⚠️ NOTE about the need to build .NET **nanoFramework** firmware ⚠️
4
+
5
+
You only need to build it if you plan to debug the native code, add new targets or add new features at native level.
6
+
If your goal is to code in C# you just have to flash your MCU with the appropriate firmware image.
7
+
There are available ready to flash firmware images for several targets, please check the [Home](https://github.com/nanoframework/Home#firmware-for-reference-boards) repository.
8
+
3
9
## About this document
4
10
5
-
This document describes how to build the required images for .NET **nanoFramework** for NXP targets.
11
+
This document describes how to build the required images for .NET **nanoFramework**firmware for NXP targets.
6
12
The build is based on CMake tool to ease the development in all major platforms.
7
13
8
14
## Using Dev Container
@@ -42,7 +48,7 @@ To simplify: this guide we will put all our tools and source in easily accessibl
42
48
43
49
1. Run the PowerShell script that's on the `install-scripts` folder that will download and install all the required tools.
44
50
`.\install-stm32-tools.ps1 -Path 'C:\nftools'`
45
-
For best results, run in an elevated command prompt, otherwise setting system environnement variables will fail.
51
+
For best results, run in an elevated command prompt, otherwise setting system environment variables will fail.
46
52
1. Review and adjust several JSON files to match your environment (as documented below)
47
53
1. Restart Visual Studio Code (due to json changes)
Copy file name to clipboardExpand all lines: content/building/build-stm32.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,14 @@
1
1
# How to Build, Flash and Debug the STM32 nanoBooter and nanoCLR on Windows using Visual Studio Code
2
2
3
+
⚠️ NOTE about the need to build .NET **nanoFramework** firmware ⚠️
4
+
5
+
You only need to build it if you plan to debug the native code, add new targets or add new features at native level.
6
+
If your goal is to code in C# you just have to flash your MCU with the appropriate firmware image.
7
+
There are available ready to flash firmware images for several targets, please check the [Home](https://github.com/nanoframework/Home#firmware-for-reference-boards) repository.
8
+
3
9
## About this document
4
10
5
-
This document describes how to build the required images for .NET **nanoFramework** for STM32 targets.
11
+
This document describes how to build the required images for .NET **nanoFramework**firmware for STM32 targets.
6
12
The build is based on CMake tool to ease the development in all major platforms.
7
13
8
14
## Using Dev Container
@@ -41,7 +47,7 @@ To simplify: this guide we will put all our tools and source in easily accessibl
41
47
42
48
1. Run the PowerShell script that's on the `install-scripts` folder that will download and install all the required tools.
Copy file name to clipboardExpand all lines: content/building/build-win32.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Building .NET nanoFramework - WIN32
2
2
3
+
⚠️ NOTE about the need to build .NET **nanoFramework** firmware ⚠️
4
+
5
+
You only need to build it if you plan to debug the native code, add new targets or add new features at native level.
6
+
If your goal is to code in C# you just have to flash your MCU with the appropriate firmware image.
7
+
There are available ready to flash firmware images for several targets, please check the [Home](https://github.com/nanoframework/Home#firmware-for-reference-boards) repository.
8
+
3
9
The WIN32 version meant to be used for high level debugging, feature testing and Unit Testing for other projects.
4
10
It's a VC++ solution which can be build using Visual Studio.
# Building .NET **nanoFramework** with local RTOS source vs RTOS source from repository
1
+
# Building .NET **nanoFramework**firmware with local RTOS source vs RTOS source from repository
2
2
3
-
When building .NET **nanoFramework**for a CMSIS target (currently only ChibiOS is supported) the developer has two options: either using a local path for the RTOS source code or downloading it from the official repository.
3
+
When building .NET **nanoFramework**firmware the developer has two options: either using a local path for the RTOS source code or downloading it from the official repository.
4
4
This document aims to give you an brief overview of the differences between these two so you can choose the option that best fits your use scenario.
5
5
6
6
## Source from official repository
7
7
8
-
When running CMake, if the parameter `-DCHIBIOS_SOURCE` is not not specified CMake will connect to **nanoFrameworks**[ChibiOS mirror](https://github.com/nanoframework/ChibiOS) on GitHub and will clone the source from there. The time for this operation to complete will mostly depend on the speed of your internet connection.
8
+
When running CMake, if the parameter `-DRTOS_SOURCE_FOLDER` is not not specified CMake will connect to the respective official repository and will clone the source from there. The time for this operation to complete will mostly depend on the speed of your internet connection.
9
9
10
-
ChibiOS will be cached within the build directory so the full download won't happen again unless the build directory is cleared. A check for any changes in the repo is made whenever a build is run. If there are any, the changes will be downloaded and merged.
10
+
The RTOS will be cached within the build directory so the full download won't happen again unless the build directory is cleared. A check for any changes in the upstream repository it's performed whenever a build is run. If there are any, the changes will be downloaded and merged.
11
11
12
-
This option is good for automated builds or when you don't have (or don't want) the repo cloned to your local storage device.
12
+
This option it's great for automated builds or when you don't have (or don't want) the repo cloned to your local storage device.
13
13
14
14
Another advantage is that you don't have to manage the updates to the local clone yourself.
15
15
16
16
An obvious disadvantage is that if the build folder is cleaned (required when switching between target boards) the 'cached' repo will be gone and a full download will occur when the project is next built.
17
17
18
18
## Source from local clone
19
19
20
-
When running CMake, if the parameter `-DCHIBIOS_SOURCE="....."` is specified a local clone located at the designated path will be used when the build occurs.
21
-
The only _timing penalty_ is the one necessary for CMake to copy the contents of the local ChibiOS repo to the build cache folder. This is a one time operation and it won't happen again unless the build folder is cleaned up.
20
+
When running CMake, if the parameter `-DRTOS_SOURCE_FOLDER="....."` is specified, a local clone located at the designated path will be used when the build occurs.
21
+
The only _timing penalty_ is the one necessary for CMake to copy the contents of the local RTOS repo to the build cache folder. This is a one time operation and it won't happen again unless the build folder is cleaned up.
22
22
23
-
This option is good when you have a local clone of the repo and you don't want to increase the build time with checks on the repo and downloading it or wish to target a different branch (such as `master`).
23
+
This option is preferable when you have a local clone of the repo and you don't want to increase the build time with checks on the repo and downloading it or wish to target a different branch.
24
24
25
-
The downside is that you have to manage the update process for the ChibiOS repo yourself.
25
+
The downside is that you have to manage the update process for the RTOS repo yourself.
26
26
27
-
Another important aspect to consider is the branch **to _manually_ checkout**. Not doing this is synonym of using the 'master' branch that contains the development files and is not a stable version, which is probably not what you want to use.
28
-
So, make sure that you checkout the branch matching the currently supported stable version. In doubt ask in the Discord channel.
27
+
Another important aspect to consider is the branch or tag that you have to **to _manually_ checkout**. Not doing this is synonym of using the default branch that contains the development files and is not a stable version, which is probably not what you want to use.
28
+
So, make sure that you checkout the branch or tag matching the currently supported stable version. In doubt ask in the Discord channel.
29
29
30
30
Also here, if the build folder is cleaned the 'cached' repo will be gone.
0 commit comments