Skip to content

Commit a4edc8a

Browse files
Merge branch 'main' into port-f767
2 parents f1c6c3a + bc704dc commit a4edc8a

8 files changed

+112
-68
lines changed

.devcontainer/devcontainer.json

+33-26
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,54 @@
11
{
22
"name": "nanoFramework",
3-
// Adjust this file to chose the platform you want using the prebuild containers
3+
// Adjust this file to choose the platform you want using the prebuild containers:
44
// - Dockerfile.All = you can build anything but it's a very large container
55
// - Dockerfile.AzureRTOS = for AzureRTOS targets
66
// - Dockerfile.ChibiOS = for ChibiOS based targets (ex: STM32, Netduino, Orgpal)
77
// - Dockerfile.ESP32 = for ESP32 targets
88
// - Dockerfile.TI = for TI targets
9-
// If you prefer, you can use the source files and adjust them they are located, with the same names in ./sources. This will alow you to customize them and add anything you may need on top.
9+
// If you prefer, you can use the source files and adjust them where they are located,
10+
// To do this, prefix 'sources'. e.g. 'sources/Dockerfile.All'.
11+
// This will allow you to customize and build the container source and add anything you may need on top.
1012
"dockerFile": "Dockerfile.All",
1113
"context": ".",
1214
"mounts": [
15+
// Bind the Unix socket the Docker daemon listens on by default
1316
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
14-
// Mount .azure folder for seamless az cli auth
15-
"source=${env:HOME}${env:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind",
1617
// Keep command history
1718
"source=nano-bashhistory,target=/home/vscode/commandhistory,type=volume",
19+
// OPTIONAL: Mount .azure folder for seamless az cli auth
20+
// "source=${env:HOME}${env:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind"
1821
],
19-
// Set *default* container specific settings.json values on container create.
20-
"settings": {
21-
"cmake.preferredGenerators": [
22-
"Ninja"
23-
],
24-
"cmake.generator": "Ninja",
25-
"cmake.autoRestartBuild" : true,
26-
"cmake.configureSettings": {
27-
"CMAKE_MAKE_PROGRAM":"/usr/bin/ninja"
28-
},
29-
"cmake.configureOnOpen": false
30-
},
31-
// Add the IDs of extensions you want installed when the container is created.
32-
"extensions": [
33-
"ms-vsliveshare.vsliveshare-pack",
34-
"streetsidesoftware.code-spell-checker",
35-
"twxs.cmake",
36-
"ms-vscode.cmake-tools",
37-
"xaver.clang-format"
38-
],
39-
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.all containers
22+
// Set the *default* container specific settings.json values on container create.
23+
"customizations": {
24+
"vscode": {
25+
"settings": {
26+
"cmake.preferredGenerators": [
27+
"Ninja"
28+
],
29+
"cmake.generator": "Ninja",
30+
"cmake.autoRestartBuild" : true,
31+
"cmake.configureSettings": {
32+
"CMAKE_MAKE_PROGRAM":"/usr/bin/ninja"
33+
},
34+
"cmake.configureOnOpen": false
35+
},
36+
// Add the IDs of extensions you want installed when the container is created.
37+
"extensions": [
38+
"ms-vsliveshare.vsliveshare-pack",
39+
"streetsidesoftware.code-spell-checker",
40+
"twxs.cmake",
41+
"ms-vscode.cmake-tools",
42+
"xaver.clang-format"
43+
]
44+
}
45+
}
46+
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers
4047
// "postAttachCommand": "/usr/local/git-pull-repos.sh"
4148
// Use 'forwardPorts' to make a list of ports inside the container available locally.
4249
// "forwardPorts": [],
4350
// Use 'postCreateCommand' to run commands after the container is created.
4451
// "postCreateCommand": "terraform --version",
4552
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
4653
// ,"remoteUser": "vscode"
47-
}
54+
}

CMake/AzureRTOS_target_os.h.in

+12-9
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@
2323

2424
#define TARGETINFOSTRING "@CMAKE_BUILD_TYPE@ build with Azure RTOS v" STR(THREADX_MAJOR_VERSION) "." STR(THREADX_MINOR_VERSION) "." STR(THREADX_PATCH_VERSION)
2525

26-
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
27-
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
28-
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
29-
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
30-
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
31-
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
32-
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@
33-
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
34-
#cmakedefine TARGET_SERIAL_BAUDRATE @TARGET_SERIAL_BAUDRATE@
26+
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
27+
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
28+
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
29+
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
30+
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
31+
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
32+
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@
33+
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
34+
#cmakedefine TARGET_SERIAL_BAUDRATE @TARGET_SERIAL_BAUDRATE@
35+
#cmakedefine NANOCLR_PROFILE_NEW_CALLS @NANOCLR_PROFILE_NEW_CALLS@
36+
#cmakedefine NANOCLR_PROFILE_NEW_ALLOCATIONS @NANOCLR_PROFILE_NEW_ALLOCATIONS@
37+
#cmakedefine NANOCLR_TRACE_MEMORY_STATS @NANOCLR_TRACE_MEMORY_STATS@
3538

3639
#endif // TARGET_OS_H

CMake/ChibiOS_target_os.h.in

+11-8
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@
2323

2424
#define TARGETINFOSTRING "@CMAKE_BUILD_TYPE@ build with ChibiOS v" CH_VERSION "." STR(CH_VERSION_MONTH)
2525

26-
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
27-
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
28-
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
29-
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
30-
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
31-
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
32-
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@
33-
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
26+
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
27+
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
28+
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
29+
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
30+
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
31+
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
32+
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@
33+
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
34+
#cmakedefine NANOCLR_PROFILE_NEW_CALLS @NANOCLR_PROFILE_NEW_CALLS@
35+
#cmakedefine NANOCLR_PROFILE_NEW_ALLOCATIONS @NANOCLR_PROFILE_NEW_ALLOCATIONS@
36+
#cmakedefine NANOCLR_TRACE_MEMORY_STATS @NANOCLR_TRACE_MEMORY_STATS@
3437

3538
#endif // TARGET_OS_H

CMake/ESP32_target_os.h.in

+12-9
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020

2121
#define IDF_VER_FIXED "@IDF_VER_FIXED@"
2222

23-
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
24-
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
25-
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
26-
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
27-
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
28-
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
29-
#define TARGET_HAS_NANOBOOTER FALSE
30-
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
31-
#cmakedefine TARGET_SERIAL_BAUDRATE @TARGET_SERIAL_BAUDRATE@
23+
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
24+
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
25+
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
26+
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
27+
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
28+
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
29+
#define TARGET_HAS_NANOBOOTER FALSE
30+
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
31+
#cmakedefine TARGET_SERIAL_BAUDRATE @TARGET_SERIAL_BAUDRATE@
32+
#cmakedefine NANOCLR_PROFILE_NEW_CALLS @NANOCLR_PROFILE_NEW_CALLS@
33+
#cmakedefine NANOCLR_PROFILE_NEW_ALLOCATIONS @NANOCLR_PROFILE_NEW_ALLOCATIONS@
34+
#cmakedefine NANOCLR_TRACE_MEMORY_STATS @NANOCLR_TRACE_MEMORY_STATS@
3235

3336
#endif // TARGET_OS_H

CMake/FreeRTOS_target_os.h.in

+11-8
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@
2121

2222
#define TARGETINFOSTRING "@CMAKE_BUILD_TYPE@ build with FREERTOS @RTOS_VERSION@"
2323

24-
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
25-
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
26-
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
27-
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
28-
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
29-
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
30-
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@
31-
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
24+
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
25+
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
26+
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
27+
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
28+
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
29+
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
30+
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@
31+
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
32+
#cmakedefine NANOCLR_PROFILE_NEW_CALLS @NANOCLR_PROFILE_NEW_CALLS@
33+
#cmakedefine NANOCLR_PROFILE_NEW_ALLOCATIONS @NANOCLR_PROFILE_NEW_ALLOCATIONS@
34+
#cmakedefine NANOCLR_TRACE_MEMORY_STATS @NANOCLR_TRACE_MEMORY_STATS@
3235

3336
#endif // TARGET_OS_H
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Copyright (c) .NET Foundation and Contributors
3+
# See LICENSE file in the project root for full license information.
4+
#
5+
6+
option(NF_PROFILE_NEW_CALLS "option to support profilling new function calls" OFF)
7+
option(NF_PROFILE_NEW_ALLOCATIONS "option to support profilling new object allocations" OFF)
8+
option(NF_TRACE_MEMORY_STATS "option to enable trace of memory stats" OFF)
9+
10+
if(NF_PROFILE_NEW_CALLS)
11+
set(NANOCLR_PROFILE_NEW_CALLS TRUE CACHE INTERNAL "option to support profilling new function calls")
12+
endif()
13+
if(NF_PROFILE_NEW_ALLOCATIONS)
14+
set(NANOCLR_PROFILE_NEW_ALLOCATIONS TRUE CACHE INTERNAL "option to support profilling new object allocations")
15+
endif()
16+
if(NF_TRACE_MEMORY_STATS)
17+
set(NANOCLR_TRACE_MEMORY_STATS TRUE CACHE INTERNAL "option to enable trace of memory stats")
18+
endif()

CMake/TI_SimpleLink_target_os.h.in

+11-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
#define VERSION_BUILD @nanoFramework_VERSION_PATCH@U
1717
#define VERSION_REVISION @nanoFramework_VERSION_TWEAK@U
1818

19-
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
20-
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
21-
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
22-
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
23-
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
24-
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
25-
#define TARGET_HAS_NANOBOOTER FALSE
26-
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
19+
#define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@
20+
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
21+
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
22+
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
23+
#define NANOCLR_REFLECTION @TARGET_NANOCLR_REFLECTION@
24+
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
25+
#define TARGET_HAS_NANOBOOTER FALSE
26+
#define TRACE_TO_STDIO @TARGET_TRACE_TO_STDIO@
27+
#cmakedefine NANOCLR_PROFILE_NEW_CALLS @NANOCLR_PROFILE_NEW_CALLS@
28+
#cmakedefine NANOCLR_PROFILE_NEW_ALLOCATIONS @NANOCLR_PROFILE_NEW_ALLOCATIONS@
29+
#cmakedefine NANOCLR_TRACE_MEMORY_STATS @NANOCLR_TRACE_MEMORY_STATS@
2730

2831
#endif // TARGET_OS_H

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ message(STATUS "Build directory is '${CMAKE_BINARY_DIR}'.")
110110
message(STATUS "")
111111
#######################
112112

113+
#####################################
114+
# include CLR Profiler build options
115+
include(ClrProfilerOptions)
116+
#####################################
113117

114118
#################################################################
115119
# ouput RTM build option

0 commit comments

Comments
 (0)