Skip to content

Commit 4704dd5

Browse files
authored
Merge pull request #927 from nanoframework/release-1.0.0
Merge 'develop' for Release 1.0.0
2 parents 35269b2 + 4621247 commit 4704dd5

File tree

731 files changed

+66683
-12628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

731 files changed

+66683
-12628
lines changed

.github_changelog_generator

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
user=nanoframework
2+
project=nf-interpreter
3+
issues=true
4+
add_issues_wo_labels=false
5+
add_pr_wo_labels=false
6+
add_issues_wo_labels=false
7+
filter_issues_by_milestone=false
8+
exclude_labels=Area: Config-and-Build,Area: Infrastructure-and-Organization,reverted
9+
enhancement_labels=Type: enhancement
10+
bug_labels=Type: bug
11+
merge_prefix=**Documentation and other chores:**
12+
unreleased_label=**Changes available only in 'Preview' images:**
13+
issue_line_labels=Area: ESP32,Area: STM32-ChibiOS,Area: WIN32,Area: Interpreter,Area: Common libs,Breaking-Change,documentation
14+
author=false

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@
77
# ignore cmake-variants file (will change frequently per user/board setup, use should derive content from cmake-variants.TEMPLATE.json)
88
cmake-variants.json
99

10+
# ignore any content inside the Interop assemblies folder
11+
InteropAssemblies/*
12+
1013
# Visual Studio Code
1114
# ignore C/C++ launch file (will change frequently per user/board setup, use should derive content from launch.TEMPLATE.json)
1215
.vscode/launch.json
1316
.vscode/.cmaketools.json
1417
.vscode/settings.json
1518
.vscode/tasks.json
1619
.vscode/extensions.json
20+
.vscode/c_cpp_properties.json
21+
.vscode/cmake-kits.json
22+
23+
# ignore CMake modules for Interop assemblies
24+
CMake/Modules/FindINTEROP*.cmake
1725

1826
# Visual Studio
1927
## Ignore Visual Studio temporary files, build results, and
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"name": "ESP32 Tools",
4+
"toolchainFile": "CMake/toolchain.FreeRtos.ESP32.GCC.cmake"
5+
}
6+
]

.vscode/launch.TEMPLATE-ESP32.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "ESP32 nanoCLR - OLimex OCD-H",
6+
"type": "cppdbg",
7+
"request": "launch",
8+
"MIMode": "gdb",
9+
"miDebuggerPath": "<absolute-path-to-the-toolchain-folder-mind-the-forward-slashes>/bin/xtensa-esp32-elf-gdb.exe",
10+
"stopAtEntry":true,
11+
"program": "<absolute-path-to-the-build-folder-mind-the-forward-slashes>/targets/FreeRTOS/ESP32_DevKitC/nanoCLR.elf",
12+
13+
"setupCommands": [
14+
{"text": "set logging on"},
15+
{"text": "target extended-remote localhost:3333"},
16+
{"text": "file <absolute-path-to-the-build-folder-mind-the-forward-slashes>/targets/FreeRTOS/ESP32_DevKitC/nanoCLR.elf"},
17+
{"text": "monitor reset halt"},
18+
{"text": "thb app_main"},
19+
{"text": "x $a1=0"}
20+
],
21+
22+
"launchCompleteCommand": "exec-run",
23+
"debugServerPath": "<absolute-path-to-openocd-mind-the-forward-slashes>/bin/openocd.exe",
24+
"debugServerArgs": "-s \"<absolute-path-to-openocd-mind-the-forward-slashes>/share/openocd/scripts/\" -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f target/esp32.cfg -c \"adapter_khz 3000\" " ,
25+
"serverStarted": "Info : .*Tensilica.*0x1.",
26+
"filterStderr": true,
27+
"externalConsole": true,
28+
"cwd": "${cwd}",
29+
30+
"logging": {
31+
"trace": true,
32+
"traceResponse": true,
33+
"engineLogging": true,
34+
"programOutput": true,
35+
"exceptions": true,
36+
"moduleLoad": true
37+
}
38+
},
39+
{
40+
"name": "ESP32 nanoCLR - Wrover",
41+
"type": "cppdbg",
42+
"request": "launch",
43+
"MIMode": "gdb",
44+
"miDebuggerPath": "<absolute-path-to-the-toolchain-folder-mind-the-forward-slashes>/bin/xtensa-esp32-elf-gdb.exe",
45+
"stopAtEntry":true,
46+
"program": "<absolute-path-to-the-build-folder-mind-the-forward-slashes>/targets/FreeRTOS/ESP32_DevKitC/nanoCLR.elf",
47+
48+
"setupCommands": [
49+
{"text": "set logging on"},
50+
{"text": "target extended-remote localhost:3333"},
51+
{"text": "file <absolute-path-to-the-build-folder-mind-the-forward-slashes>/targets/FreeRTOS/ESP32_DevKitC/nanoCLR.elf"},
52+
{"text": "monitor reset halt"},
53+
{"text": "thb app_main"},
54+
{"text": "x $a1=0"}
55+
],
56+
57+
"launchCompleteCommand": "exec-run",
58+
"debugServerPath": "<absolute-path-to-openocd-mind-the-forward-slashes>/bin/openocd.exe",
59+
"debugServerArgs": "-s \"<absolute-path-to-openocd-mind-the-forward-slashes>/share/openocd/scripts/\" -f interface/ftdi/esp32_devkitj_v1.cfg -f target/esp32.cfg -c \"adapter_khz 2000\" " ,
60+
"serverStarted": "Info : .*Tensilica.*0x1.",
61+
"filterStderr": true,
62+
"externalConsole": true,
63+
"cwd": "${cwd}",
64+
65+
"logging": {
66+
"trace": true,
67+
"traceResponse": true,
68+
"engineLogging": true,
69+
"programOutput": true,
70+
"exceptions": true,
71+
"moduleLoad": true
72+
}
73+
}
74+
75+
]
76+
}

.vscode/launch.TEMPLATE.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@
2424
],
2525

2626
"launchCompleteCommand": "exec-continue",
27-
"debugServerPath": "C:/Program Files (x86)/openocd-0.10.0/bin/openocd.exe",
28-
"debugServerArgs": "-s \"C:/Program Files (x86)/openocd-0.10.0/scripts/\" -f interface/<interface-config-file>.cfg -f board/<board-config-file>.cfg",
27+
"debugServerPath": "<absolute-path-to-openocd-mind-the-forward-slashes>/bin/openocd.exe",
28+
"debugServerArgs": "-s \"<absolute-path-to-openocd-mind-the-forward-slashes>/share/openocd/scripts/\" -f interface/<interface-config-file>.cfg -f board/<board-config-file>.cfg",
2929
"serverStarted": "Info\\ :\\ [\\w\\d\\.]*:\\ hardware",
3030
"filterStderr": true,
3131
"externalConsole": true,
32-
"cwd": "${cwd}"
32+
"cwd": "${cwd}",
33+
// Enable the following to debug GDB
34+
//"logging": {
35+
// "engineLogging": true,
36+
// "traceResponse": true
37+
//},
3338
},
3439

3540
{
@@ -55,12 +60,17 @@
5560
],
5661

5762
"launchCompleteCommand": "exec-continue",
58-
"debugServerPath": "C:/Program Files (x86)/openocd-0.10.0/bin/openocd.exe",
59-
"debugServerArgs": "-s \"C:/Program Files (x86)/openocd-0.10.0/scripts/\" -f interface/<interface-config-file>.cfg -f board/<board-config-file>.cfg",
63+
"debugServerPath": "<absolute-path-to-openocd-mind-the-forward-slashes>/bin/openocd.exe",
64+
"debugServerArgs": "-s \"<absolute-path-to-openocd-mind-the-forward-slashes>/share/openocd/scripts/\" -f interface/<interface-config-file>.cfg -f board/<board-config-file>.cfg",
6065
"serverStarted": "Info\\ :\\ [\\w\\d\\.]*:\\ hardware",
6166
"filterStderr": true,
6267
"externalConsole": true,
63-
"cwd": "${cwd}"
68+
"cwd": "${cwd}",
69+
// Enable the following to debug GDB
70+
//"logging": {
71+
// "engineLogging": true,
72+
// "traceResponse": true
73+
//},
6474
}
6575
]
6676
}

.vscode/tasks.TEMPLATE-ESP32.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"taskName": "Flash nanoCLR <COMPORT>",
8+
"type": "shell",
9+
"command": "python <absolute-path-to-the-IDF-folder-mind-the-forward-slashes>/components/esptool_py/esptool/esptool.py --chip esp32 --port \"<COMPORT>\" --baud 921600 --before \"default_reset\" --after \"hard_reset\" write_flash -z --flash_mode \"dio\" --flash_freq \"40m\" --flash_size detect 0x1000 <absolute-path-to-the-bootloader-folder-mind-the-forward-slashes>/bootloader.bin 0x10000 <absolute-path-to-the-nanoframework-folder-mind-the-forward-slashes>/nanoCLR.bin 0x8000 <absolute-path-to-the-nanoframework-folder-mind-the-forward-slashes>/partitions_4mb.bin",
10+
"presentation": {
11+
"reveal": "always",
12+
"panel": "shared"
13+
},
14+
"problemMatcher": []
15+
},
16+
{
17+
"taskName": "Erase flash <COMPORT>",
18+
"type": "shell",
19+
"command": "python <absolute-path-to-the-IDF-folder-mind-the-forward-slashes>/components/esptool_py/esptool/esptool.py --chip esp32 --port \"<COMPORT>\" --baud 115200 --before \"default_reset\" --after \"hard_reset\" erase_flash",
20+
"presentation": {
21+
"reveal": "always",
22+
"panel": "shared"
23+
},
24+
"problemMatcher": []
25+
},
26+
{
27+
"taskName": "Flash nanoCLR Wrover <COMPORT>",
28+
"type": "shell",
29+
"command": "python <absolute-path-to-the-IDF-folder-mind-the-forward-slashes>/components/esptool_py/esptool/esptool.py --chip esp32 --port \"<COMPORT>\" --baud 921600 --before \"default_reset\" --after \"hard_reset\" write_flash -z --flash_mode \"dio\" --flash_freq \"40m\" --flash_size detect 0x1000 <absolute-path-to-the-bootloader-folder-mind-the-forward-slashes>/bootloader.bin 0x10000 <absolute-path-to-the-nanoframework-folder-mind-the-forward-slashes>/nanoCLR.bin 0x8000 <absolute-path-to-the-nanoframework-folder-mind-the-forward-slashes>/partitions_4mb.bin",
30+
"presentation": {
31+
"reveal": "always",
32+
"panel": "shared"
33+
},
34+
"problemMatcher": []
35+
},
36+
{
37+
"taskName": "Flash nanoCLR ESP32-EVB <COMPORT>",
38+
"type": "shell",
39+
"command": "python <absolute-path-to-the-IDF-folder-mind-the-forward-slashes>/components/esptool_py/esptool/esptool.py --chip esp32 --port \"<COMPORT>\" --baud 921600 --before \"default_reset\" --after \"hard_reset\" write_flash -z --flash_mode \"dio\" --flash_freq \"40m\" --flash_size detect 0x1000 <absolute-path-to-the-bootloader-folder-mind-the-forward-slashes>/bootloader.bin 0x10000 <absolute-path-to-the-nanoframework-folder-mind-the-forward-slashes>/nanoCLR.bin 0x8000 <absolute-path-to-the-nanoframework-folder-mind-the-forward-slashes>/partitions_4mb.bin",
40+
"presentation": {
41+
"reveal": "always",
42+
"panel": "shared"
43+
},
44+
"problemMatcher": []
45+
}
46+
]
47+
}

CMake/ChibiOS_target_os.h.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@
1111
#ifndef _TARGET_OS_H_
1212
#define _TARGET_OS_H_
1313

14+
#define STR_HELPER(x) #x
15+
#define STR(x) STR_HELPER(x)
16+
1417
#define VERSION_MAJOR @nanoFramework_VERSION_MAJOR@U
1518
#define VERSION_MINOR @nanoFramework_VERSION_MINOR@U
1619
#define VERSION_BUILD @nanoFramework_VERSION_PATCH@U
1720
#define VERSION_REVISION @nanoFramework_VERSION_TWEAK@U
1821

19-
// build timestamp
20-
#define __DATE__ "@BUILD_TIMESTAMP@"
22+
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
23+
24+
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
25+
26+
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
2127

2228
#endif /* _TARGET_OS_H_ */

CMake/ESP32_target_os.h.in

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// Copyright (c) 2017 The nanoFramework project contributors
3+
// See LICENSE file in the project root for full license information.
4+
//
5+
6+
//////////////////////////////////////////////////////////////////////////////
7+
// This file was automatically generated by a tool. //
8+
// Any changes you make here will be overwritten when it's generated again. //
9+
//////////////////////////////////////////////////////////////////////////////
10+
11+
#ifndef _TARGET_OS_H_
12+
#define _TARGET_OS_H_
13+
14+
#define VERSION_MAJOR @nanoFramework_VERSION_MAJOR@U
15+
#define VERSION_MINOR @nanoFramework_VERSION_MINOR@U
16+
#define VERSION_BUILD @nanoFramework_VERSION_PATCH@U
17+
#define VERSION_REVISION @nanoFramework_VERSION_TWEAK@U
18+
19+
#define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@
20+
21+
#define SUPPORT_ANY_BASE_CONVERSION @TARGET_SUPPORT_ANY_BASE_CONVERSION@
22+
23+
#define HAS_CONFIG_BLOCK @TARGET_HAS_CONFIG_BLOCK@
24+
25+
#endif /* _TARGET_OS_H_ */

CMake/Modules/CHIBIOS_STM32F0xx_GCC_options.cmake

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,34 @@
88
#################################################################
99

1010
# need to specify this for assembler
11-
set(CMAKE_ASM_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
11+
set(CMAKE_ASM_FLAGS " -mthumb -mcpu=cortex-m0 -mfloat-abi=soft -mabi=aapcs -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
1212

1313
# need to specify linker flags here
14-
set(CMAKE_EXE_LINKER_FLAGS " -Wl,--gc-sections -Wl,--no-wchar-size-warning -mthumb -mcpu=cortex-m0 -mabi=aapcs -nostartfiles " CACHE INTERNAL "executable linker flags")
14+
set(CMAKE_EXE_LINKER_FLAGS " -Wl,--gc-sections -Wl,--no-wchar-size-warning -mthumb -mcpu=cortex-m0 -mfloat-abi=soft -mabi=aapcs -nostartfiles " CACHE INTERNAL "executable linker flags")
1515

1616

1717
function(NF_SET_COMPILER_OPTIONS TARGET)
1818

1919
# include any extra options comming from any extra args?
20-
target_compile_options(${TARGET} PUBLIC ${ARGN} -mthumb -mcpu=cortex-m0 -mabi=aapcs -nostdlib -Wall -w -ffunction-sections -fshort-wchar -falign-functions=16 -fdata-sections -fno-builtin -fno-common -fsingle-precision-constant -fomit-frame-pointer -mlong-calls -fdollars-in-identifiers -fno-exceptions -fno-unroll-loops -mstructure-size-boundary=8 -ffast-math -ftree-vectorize -fcheck-new -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics)
21-
20+
target_compile_options(${TARGET} PUBLIC ${ARGN} -mthumb -mcpu=cortex-m0 -mabi=aapcs -nostdlib -Wall -Wextra -Werror -ffunction-sections -fshort-wchar -falign-functions=16 -fdata-sections -fno-builtin -fno-common -fomit-frame-pointer -mlong-calls -fdollars-in-identifiers -fno-exceptions -fno-unroll-loops -mstructure-size-boundary=8 -frounding-math -fsignaling-nans -ffloat-store -fno-math-errno -ftree-vectorize -fcheck-new )
21+
22+
# this series doesn't have FPU
23+
target_compile_definitions(${TARGET} PUBLIC -DCORTEX_USE_FPU=FALSE)
24+
2225
endfunction()
2326

2427

25-
function(NF_SET_LINKER_OPTIONS TARGET PRINTF_FLOAT_SUPPORT)
28+
function(NF_SET_LINKER_OPTIONS TARGET)
2629

27-
# request to include support for float printf form newlib nano
28-
if(PRINTF_FLOAT_SUPPORT)
29-
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " --specs=nano.specs -u _printf_float")
30-
else()
31-
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " --specs=nano.specs ")
32-
endif()
30+
# request specs from newlib nano
31+
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " --specs=nano.specs ")
3332

3433
# set extra linker flags
3534
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${ARGN}")
3635

3736
# set optimization linker flags for RELEASE and MinSizeRel
3837
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
39-
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fno-strict-aliasing ")
38+
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fuse-linker-plugin -Os")
4039
endif()
4140

4241
# set optimization flags

0 commit comments

Comments
 (0)