Skip to content

Add support for generics <T> #3137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 210 commits into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
7956259
Support for generics (#1802)
josesimoes Feb 21, 2023
7dbe14f
Add generic related flags to methoddef flags
josesimoes Dec 29, 2020
46c1b62
Add test app for generics
josesimoes Feb 22, 2023
aec989c
Fix VCX projects
josesimoes Feb 22, 2023
a4b7b29
Migrate test app to VS2022
josesimoes Feb 27, 2023
9633a89
WIP resuming generics implementation on CLR
josesimoes Feb 28, 2023
749de45
Fix several issues in declarations and code to align new names
josesimoes Mar 1, 2023
bbe7113
Add missing declaration from recent PR
josesimoes Mar 1, 2023
8a16c65
Fix code style
josesimoes Mar 1, 2023
c6ffd43
Add missing implementation for FindTypeDef
josesimoes Mar 1, 2023
d5d23a3
Fix code style
josesimoes Mar 1, 2023
af23f00
Bump version to 2.0
josesimoes Mar 1, 2023
e0dfa62
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 9, 2023
4f8750b
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 14, 2023
76cbee4
Default for loop after exit is now false
josesimoes Mar 14, 2023
05df8c5
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 14, 2023
cfe9535
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 15, 2023
edcf9ab
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 15, 2023
88e3055
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 15, 2023
0e9c52f
Add nf-props to solution items
josesimoes Mar 16, 2023
99032f6
Fix defines for virtual device
josesimoes Mar 17, 2023
f1a18bb
Fix types to larger ones
josesimoes Mar 17, 2023
82c4a38
Replace blind calls to CLR FAIL to include detail message
josesimoes Mar 17, 2023
caae7f2
Fix defines for virtual device
josesimoes Mar 17, 2023
134f5c2
Port change from upstream
josesimoes Mar 17, 2023
67aa892
Remove duplicated call
josesimoes Mar 17, 2023
adff06e
Bringing GPIO library up to date with new types
josesimoes Mar 21, 2023
f730ead
Fix declaration of NANOCLR_MSG1_SET_AND_LEAVE to accept arg list
josesimoes Mar 21, 2023
f79563a
Code style fixes
josesimoes Mar 21, 2023
b1c02b1
Improve exception tracing
josesimoes Mar 21, 2023
e605ca6
Add assert for size of CLR_RECORD structs
josesimoes Mar 22, 2023
9b6a11a
Fix compiler error
josesimoes Mar 22, 2023
2bb833c
Add instance names to help debugging
josesimoes Mar 22, 2023
bc97ad9
Moving VerifyStackOK to class
josesimoes Mar 22, 2023
55f22fc
Move comment to follow code guidelines
josesimoes Mar 22, 2023
aa7169c
More style fixes
josesimoes Mar 22, 2023
f2018c6
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 23, 2023
a756d83
Fix resolving MethodDef from MemberRef
josesimoes Mar 24, 2023
c2b92fc
Add verbose Name for instances to help debugging
josesimoes Mar 27, 2023
b60bfbe
Fix MatchSignatureElement to deal with params of Generic Instances
josesimoes Mar 27, 2023
38634fc
Replace FindGenericParamAtTypeDef with FindGenericParamAtTypeSpec
josesimoes Mar 28, 2023
430423f
Multiple code style fixes
josesimoes Mar 28, 2023
ca33f50
Fix processing TBL_TypeRef in TypeDef_Instance::ResolveToken
josesimoes Mar 28, 2023
ef9ba1d
Improve error check in parser
josesimoes Mar 28, 2023
18b5770
Fix TypeDescriptor::InitializeFromReflection
josesimoes Mar 28, 2023
27a81b8
Add missing parser initializer in InitializeFromTypeSpec
josesimoes Mar 28, 2023
6088cb5
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 29, 2023
6dfda8e
Rework encoding of indexes in several metadata internal structs
josesimoes Mar 29, 2023
68fc0b5
Global rename step 1
josesimoes Mar 29, 2023
ff65d4f
Global rename step 2
josesimoes Mar 29, 2023
1507269
Global rename step 3
josesimoes Mar 29, 2023
69da86f
Rename define to disambiguate with same define from Espressif IDF
josesimoes Mar 29, 2023
3a6b1b5
More renames
josesimoes Mar 29, 2023
22a627a
Clean-up declarations for removed legacy functions
josesimoes Mar 29, 2023
54d2ec8
Rename of CLR_RT_WellKnownTypes
josesimoes Mar 29, 2023
e6917ee
Replace NULL with nullptr in cpp files
josesimoes Mar 30, 2023
a4ea6be
Fixing compiler warnings
josesimoes Mar 30, 2023
68f86b3
Replace var declaration and fix more compiler warnings
josesimoes Mar 30, 2023
d28256e
Fix TypeSystem::MatchSignatureElement
antoniofagundes Mar 30, 2023
8707b65
Update checksum for mscorlib
antoniofagundes Mar 30, 2023
35223fd
Add TypeSystem::BuildTypeName for TypeSpec
josesimoes Mar 30, 2023
9398540
Fix TypeSystem::MatchSignatureElement for types with multiple generic…
josesimoes Mar 30, 2023
dffff40
Implement trace for type resolution
josesimoes Mar 30, 2023
bbf27ab
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
antoniofagundes Apr 3, 2023
119a364
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 5, 2023
a0005dc
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes May 29, 2023
4a669a6
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes May 29, 2023
d8e69cf
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
antoniofagundes Jun 6, 2023
dde607f
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Jun 8, 2023
2992a6f
Fix check for enum type
josesimoes Jun 8, 2023
5a230b0
Code style fixes
josesimoes Jun 8, 2023
642222d
Add HeapBlock::SetReflection
josesimoes Jun 15, 2023
ba8246b
Add ResolveToken to GenericParam
josesimoes Jun 15, 2023
e0d5c19
Add implementation for generic param in ldtoken
josesimoes Jun 15, 2023
d85ec74
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Jun 19, 2023
cfc66f5
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Jun 26, 2023
b098358
Merge branches 'main' and 'generics-wip' of https://github.com/nanofr…
josesimoes Nov 15, 2023
ecc72d5
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Dec 14, 2023
5073ad7
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Sep 30, 2024
9be48e1
Fixing several issues from last merge
josesimoes Oct 2, 2024
3498d61
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Oct 4, 2024
5b08237
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Oct 14, 2024
aaee1d3
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Nov 8, 2024
4135531
Fix known type member
josesimoes Nov 8, 2024
0f5ea38
Fix loop iterator type
josesimoes Nov 8, 2024
8246017
Improve report of bad assembly
josesimoes Nov 8, 2024
3645751
Improvements in declaration of VerifyStackOK
josesimoes Nov 11, 2024
5e070e4
Fixes from code review
josesimoes Nov 11, 2024
5d9e9d2
Simplifications for CLR_RT_GenericParam_Index
josesimoes Nov 11, 2024
b2fb9aa
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Nov 12, 2024
3d4ae64
Fix marker version
josesimoes Nov 12, 2024
807c070
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Nov 18, 2024
7c266c7
Fix element name
josesimoes Nov 19, 2024
d077328
Fix element name
josesimoes Nov 20, 2024
01d38bc
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Nov 22, 2024
501a482
Improvements in WP packet header handler
josesimoes Dec 16, 2024
ad106c8
Add asserts and sanity checks on HB Array handling
josesimoes Dec 16, 2024
d001a02
Add asserts on GC compaction (#3050)
josesimoes Dec 17, 2024
ba5ed3a
Improvements in WP packet header handler (#3049)
josesimoes Dec 17, 2024
a884337
Improve sanity check with WP sync code (#3052)
josesimoes Dec 17, 2024
ab8585a
Fix ASSERT in GC heap compact (#3059)
josesimoes Dec 26, 2024
50b07b8
Fix protecting HB from GC (#3062)
josesimoes Jan 9, 2025
eeb4eeb
Proper handling thread creation failure (#3063)
josesimoes Jan 9, 2025
0278a36
Fix format string to output x64 addresses (#3067)
josesimoes Jan 17, 2025
484a27c
Stack trace is now generated despite debugger state (#3068)
josesimoes Jan 20, 2025
b0562da
Rework test of pointers at GC to use malloc instead of C++ constructo…
josesimoes Jan 20, 2025
9b3b765
Fix output of heap allocation info (#3072)
josesimoes Jan 22, 2025
eff7408
Fix asserts (#3074)
josesimoes Jan 22, 2025
34f79e1
Fix pointers comparison (#3075)
josesimoes Jan 22, 2025
583ace5
Fix usage of uintptr_t accross GC and HeapCluster classes (#3076)
josesimoes Jan 23, 2025
e907663
Fix element name
josesimoes Mar 10, 2025
2085283
Remove unnecessary memsets from code base (#3079)
josesimoes Jan 27, 2025
f963f16
Fix compiler issues
josesimoes Mar 10, 2025
1719949
Fix assert in GC::Heap_Compact (#3080)
josesimoes Jan 27, 2025
07e8015
Fix base64 encode/decode and To/From Base64 string (#3082)
josesimoes Jan 28, 2025
0f5da96
Improve output messages (#3083)
josesimoes Jan 28, 2025
23739b9
Rework `DateTime` and `TimeSpan` (#3084)
josesimoes Mar 10, 2025
e979361
Fix printf (#3086)
josesimoes Jan 31, 2025
489c1da
Replace dynamic allocation of print buffer (#3087)
josesimoes Jan 31, 2025
876efdc
Improve root namespace for vxproj files (#3089)
networkfusion Feb 7, 2025
df18099
Remove deprecated Windows.Storage API (#3090)
networkfusion Feb 7, 2025
b11a683
Add stubs for Sys.Devices.I2c and SPI to virtual nanoCLR (#3100)
josesimoes Feb 11, 2025
3407a4b
Improve fill memory with dirty pattern (#3101)
josesimoes Feb 11, 2025
d7105ff
Improve output of GC runs (#3102)
josesimoes Feb 11, 2025
cc8006e
Improve output messages for Memory and GC (#3103)
josesimoes Feb 12, 2025
4e08988
Fix offset type in relocation region (#3111)
josesimoes Feb 17, 2025
75d11a0
Fixes and improvements in String heap block (#3112)
josesimoes Feb 18, 2025
17ace79
Add profiler to virtual device (#3113)
josesimoes Feb 18, 2025
edf0a5f
Improvements in profiler host processors (#3114)
josesimoes Feb 19, 2025
27c730a
Improvements in profiler (#3115)
josesimoes Feb 19, 2025
4192c0a
Clean-up includes and header files (#3116)
josesimoes Feb 20, 2025
5872af4
OOM exception is back to EE and is not disposed anymore (#3119)
josesimoes Feb 21, 2025
052ff42
Improve profiler messages for object relocation (#3120)
josesimoes Feb 24, 2025
450e7f5
Add comment to clarify origin and reference
josesimoes Feb 24, 2025
7153814
Fix variable names
josesimoes Feb 24, 2025
5a6ed36
Rework Reflection, RuntimeType and System.Type (#3125)
josesimoes Feb 26, 2025
db0d891
Fix string relocation handler (#3073)
josesimoes Feb 28, 2025
9dd0e57
Add implementation for Hashing CRC32 to virtual device (#3131)
josesimoes Mar 5, 2025
4e67f9b
Update nanoclr and host to .NET 8.0 (#3134)
josesimoes Mar 14, 2025
f48da5a
Fix type lookup table
josesimoes Mar 17, 2025
1d18fa1
Fix declarations
josesimoes Mar 17, 2025
de32afb
FindTypeDef is now able to process nested types
josesimoes Mar 18, 2025
b6e028d
Fix ResolveToken for FieldDef when using TypeRefs
josesimoes Mar 18, 2025
c5a9177
Fix attribute enumerator
josesimoes Mar 20, 2025
d1696c2
Fix decoding token in exception handler
josesimoes Mar 21, 2025
44b264a
Fix compare double and floats
josesimoes Mar 21, 2025
e48208b
Fix `Equal` and value comparison for double and float types (#3088)
josesimoes Feb 6, 2025
d7fe889
Improve type resolution of nested types
josesimoes Mar 21, 2025
05faf5e
Fix crawling of types in FindTypeDef
josesimoes Mar 21, 2025
eaba6c8
Fix wrong access in get declaring type
josesimoes Mar 21, 2025
103337a
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 31, 2025
71afbc2
Add missing files from last merge
josesimoes Mar 31, 2025
8abddbe
Fix dev containers versions
josesimoes Mar 31, 2025
9303829
Add missing implementation od DateTime::NewObject
josesimoes Mar 31, 2025
2c2f055
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Mar 31, 2025
d43de1d
Missed previous commit
josesimoes Mar 31, 2025
d061b02
Update GC implementation
josesimoes Mar 31, 2025
bec0038
Code style fixes for nanoframework/nf-interpreter PR#3137 (#3139)
nfbot Mar 31, 2025
1ff599c
Update GC implementation
josesimoes Mar 31, 2025
a861398
Fix build issues
josesimoes Mar 31, 2025
8902aad
Merge branch 'generics-wip' of https://github.com/nanoframework/nf-in…
josesimoes Mar 31, 2025
f0cca1a
Merge branch 'update-gc-api' of https://github.com/Eclo/nf-interprete…
josesimoes Mar 31, 2025
d9d8387
Merge branch 'generics-wip' of https://github.com/nanoframework/nf-in…
josesimoes Mar 31, 2025
bd10161
Fix struct elements name
josesimoes Apr 1, 2025
d0c8a77
Update GC implementation
josesimoes Mar 31, 2025
04d5310
Code style fixes (#152)
nfbot Apr 1, 2025
ede1f5f
Merge branch 'update-gc-api' of https://github.com/Eclo/nf-interprete…
josesimoes Apr 1, 2025
b62eb84
Code style fixes (#154)
nfbot Apr 1, 2025
2073a71
Fix merge
josesimoes Apr 1, 2025
3c2b107
Fix migrated code
josesimoes Apr 1, 2025
03ba6a8
Fix elements name
josesimoes Apr 1, 2025
ab6954f
Disable LTO for Azure RTOS and TI SimpleLink targets
josesimoes Apr 1, 2025
9747a46
Fix includes for TI targets
josesimoes Apr 1, 2025
6618434
Rename typedef for Void to disambiguate with TI SimpleLink SDK type
josesimoes Apr 1, 2025
840714d
Adjust storage block size for TI_CC1352R1_LAUNCHXL
josesimoes Apr 1, 2025
994856b
Add sys call _exit required for TI_CC1352R1_LAUNCHXL
josesimoes Apr 1, 2025
12be03b
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 2, 2025
ff9fec1
Merge branch 'update-gc-api' into generics-wip
josesimoes Apr 3, 2025
6936d7c
Fix mscorlib declaration
josesimoes Apr 3, 2025
1eb0dd2
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 3, 2025
6a329f1
Bump mscorlib native version
josesimoes Apr 4, 2025
4c5e235
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 4, 2025
d8f0a6b
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 9, 2025
ec17b1f
Remove test app
josesimoes Apr 9, 2025
ee4e249
Add implementation for VerifyStackOK
josesimoes Apr 9, 2025
cff23c2
Remove duplicated code
josesimoes Apr 9, 2025
badf168
Another pass addressing compiler warnings about nullptr usage
josesimoes Apr 9, 2025
1caf186
Fix case in struct element
josesimoes Apr 9, 2025
795d4a5
Revert wrong NULL replacement
josesimoes Apr 9, 2025
c113215
Work CI-CD
josesimoes Apr 10, 2025
c20d9b0
Fix wrong declarations
josesimoes Apr 10, 2025
ee6dee3
Fix wrong struct element names
josesimoes Apr 10, 2025
cd8d7fc
Work CI-CD
josesimoes Apr 10, 2025
67932ad
Work CI-CD
josesimoes Apr 10, 2025
edca5fe
Fix MDP path
josesimoes Apr 10, 2025
b759f76
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 10, 2025
29f16f6
Replace setting MDP path with copy over
josesimoes Apr 10, 2025
74392c7
Fix formating and typo
josesimoes Apr 10, 2025
8655078
Add debug output
josesimoes Apr 14, 2025
a89b9f4
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 14, 2025
b18de9d
Fix copy script
josesimoes Apr 14, 2025
16c9b66
Merge branch 'main' of https://github.com/nanoframework/nf-interprete…
josesimoes Apr 17, 2025
8f181c3
Merge branch 'develop' of https://github.com/nanoframework/nf-interpr…
josesimoes Apr 17, 2025
3014226
Bump version variable counter
josesimoes Apr 17, 2025
08b97e2
Merge branch 'develop' of https://github.com/nanoframework/nf-interpr…
josesimoes Apr 17, 2025
091f92c
Add config for task to download preview version of msbuild components
josesimoes Apr 17, 2025
60d427d
renormalize AZDO yaml
josesimoes Apr 17, 2025
b5956c3
Merge branch 'develop' of https://github.com/nanoframework/nf-interpr…
josesimoes Apr 17, 2025
5bcf25a
Bump container versions
josesimoes Apr 17, 2025
9d4a75e
Revert change in jpeg library
josesimoes Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/All/Dockerfile.All
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-all:v2.57
FROM ghcr.io/nanoframework/dev-container-all:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/AzureRTOS/Dockerfile.AzureRTOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.34
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/ChibiOS/Dockerfile.ChibiOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-chibios:v1.35
FROM ghcr.io/nanoframework/dev-container-chibios:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/ESP32/Dockerfile.ESP32
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-esp32:v2.37
FROM ghcr.io/nanoframework/dev-container-esp32:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.07
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/TI/Dockerfile.TI
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-ti:v1.27
FROM ghcr.io/nanoframework/dev-container-ti:v3.0
2 changes: 1 addition & 1 deletion CMake/Modules/AzureRTOS_EFM32GG11_GCC_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ macro(nf_set_link_options)

# set optimization linker flags for RELEASE and MinSizeRel
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os -flto -fuse-linker-plugin ")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os")
endif()

# request specs from newlib nano
Expand Down
2 changes: 1 addition & 1 deletion CMake/Modules/FindNF_CoreCLR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ set(NF_CoreCLR_SRCS
CLR_RT_HeapBlock_Delegate.cpp
CLR_RT_HeapBlock_Delegate_List.cpp
CLR_RT_HeapBlock_Finalizer.cpp
CLR_RT_HeapBlock_GenericInstance.cpp
CLR_RT_HeapBlock_Lock.cpp
CLR_RT_HeapBlock_LockRequest.cpp
CLR_RT_HeapBlock_Node.cpp
Expand Down Expand Up @@ -129,7 +130,6 @@ set(NF_CoreCLR_SRCS
# Runtime.Native
nf_rt_native.cpp
nf_rt_native_nanoFramework_Runtime_Hardware_SystemInfo.cpp
nf_rt_native_nanoFramework_Runtime_Native_GC.cpp
nf_rt_native_nanoFramework_Runtime_Native_ExecutionConstraint.cpp
nf_rt_native_nanoFramework_Runtime_Native_Power.cpp
nf_rt_native_nanoFramework_Runtime_Native_Rtc_stubs.cpp
Expand Down
2 changes: 1 addition & 1 deletion CMake/Modules/TI_SimpleLink_CC13X2_GCC_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ macro(nf_set_link_options)

# set optimization linker flags for RELEASE and MinSizeRel
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os -flto -fuse-linker-plugin ")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os ")
endif()

# request specs from newlib nano
Expand Down
5 changes: 2 additions & 3 deletions CMake/binutils.AzureRTOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
#

include(binutils.common)
# include(ChibiOS_HAL)

function(nf_set_optimization_options target)

target_compile_options(${target} PRIVATE
$<$<CONFIG:Debug>:-Og -ggdb>
$<$<CONFIG:Release>:-O3 -flto>
$<$<CONFIG:MinSizeRel>:-Os -flto>
$<$<CONFIG:Release>:-O3>
$<$<CONFIG:MinSizeRel>:-Os>
$<$<CONFIG:RelWithDebInfo>:-Os -femit-class-debug-always -ggdb>
)

Expand Down
4 changes: 2 additions & 2 deletions CMake/binutils.TI_SimpleLink.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function(nf_set_optimization_options target)
# debug compile options: -Og (optimize for debugging) and -ggdb (produce debug symbols specifically for gdb)
target_compile_options(${target} PRIVATE
$<$<CONFIG:Debug>:-Og -ggdb>
$<$<CONFIG:Release>:-O3 -flto>
$<$<CONFIG:MinSizeRel>:-Os -flto>
$<$<CONFIG:Release>:-O3>
$<$<CONFIG:MinSizeRel>:-Os>
$<$<CONFIG:RelWithDebInfo>:-Os -ggdb>
)

Expand Down
2 changes: 1 addition & 1 deletion InteropAssemblies/CLR_RT_InteropAssembliesTable.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const CLR_RT_NativeAssemblyData *g_CLR_InteropAssembliesNativeData[] =
&g_CLR_AssemblyNative_mscorlib,
&g_CLR_AssemblyNative_nanoFramework_Runtime_Native,
@CLR_RT_NativeAssemblyDataTableEntries@
NULL
nullptr
};

const uint16_t g_CLR_InteropAssembliesCount = (@CLR_RT_NativeAssembliesCount@ + 2);
22 changes: 11 additions & 11 deletions azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,18 @@ jobs:
NeedsSRECORD: false
CMakePreset: ORGPAL_PALX

ST_NUCLEO64_F091RC:
TargetBoard: ST_NUCLEO64_F091RC
TargetSeries: "stm32f0xx"
BuildOptions:
NeedsDFU: false
NeedsSRECORD: true
CMakePreset: ST_NUCLEO64_F091RC
# ST_NUCLEO64_F091RC:
# TargetBoard: ST_NUCLEO64_F091RC
# TargetSeries: "stm32f0xx"
# BuildOptions:
# NeedsDFU: false
# NeedsSRECORD: true
# CMakePreset: ST_NUCLEO64_F091RC

variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('STM32_1_12_4_versioncounter', 0)]
REVISION: $[counter('STM32_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "stm32"

Expand Down Expand Up @@ -582,7 +582,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('ESP32_1_12_4_versioncounter', 0)]
REVISION: $[counter('ESP32_2_0_0_versioncounter', 0)]
IDF_PATH: "D:/a/1/s/esp-idf"
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
TargetPlatform: "esp32"
Expand Down Expand Up @@ -665,7 +665,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('TI_1_12_4_versioncounter', 0)]
REVISION: $[counter('TI_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "ti_simplelink"

Expand Down Expand Up @@ -717,7 +717,7 @@ jobs:

variables:
# creates a counter and assigns it to the revision variable
REVISION: $[counter('AZURERTOS_1_12_4_versioncounter', 0)]
REVISION: $[counter('AZURERTOS_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "efm32"

Expand Down
93 changes: 93 additions & 0 deletions azure-pipelines-templates/check-mdp-for-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.

steps:
- task: PowerShell@2
displayName: Check MDP for build
condition: ne(variables['System.PullRequest.PullRequestId'], '')
inputs:
failOnStderr: false
targetType: "inline"
script: |

# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)")))"

# find PR
"Getting PR#$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
$pr = Invoke-WebRequest "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" | ConvertFrom-Json

if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
{
'##[command] OK' | Write-Host -ForegroundColor Green
}

# grab PR commit message
$prCommitMessage = $($pr.body)

# look for test prompt in PR commit message
# pattern is "[build with MDP buildId NNN]"

if($prCommitMessage -match "\[build with MDP buildId (\d+)\]")
{
$buildId = $matches[1]
"AZDO build ID found: $buildId" | Write-Host -ForegroundColor White

echo "##vso[task.setvariable variable=MDP_BUILDID]$buildId"
}
else
{
"No build ID found" | Write-Host -ForegroundColor Red
}
env:
GITHUB_TOKEN: $(GitHubToken)

- task: DownloadPipelineArtifact@2
condition: >-
and(
eq(variables['DownloadMDP'], true),
ne(variables['MDP_BUILDID'], '')
)
displayName: Download MDP
inputs:
buildType: specific
project: 'metadata-processor'
definition: '43'
buildVersionToDownload: specific
allowFailedBuilds: true
pipelineId: $(MDP_BUILDID)
artifactName: 'deployables'
targetPath: '$(Pipeline.Workspace)/mdp'
itemPattern: '*.MsBuildTask.dll'

- task: PowerShell@2
condition: >-
and(
succeeded(),
eq(variables['DownloadMDP'], true),
ne(variables['MDP_BUILDID'], '')
)
displayName: Copy MDP to build tool
inputs:
targetType: 'inline'
script: |
# Find which VS version is installed
$VsWherePath = "${env:PROGRAMFILES(X86)}\Microsoft Visual Studio\Installer\vswhere.exe"

Write-Output "VsWherePath is: $VsWherePath"

$VsInstance = & $VsWherePath -latest -property displayName

Write-Output "Latest VS is: $VsInstance"

# copy MDP file to msbuild location
$VsPath = & $VSWherePath -latest -property installationPath

Write-Debug "Copy MDP DLL to msbuild location"

$msbuildPath = $VsPath + "\MSBuild"

$extensionPath = $msbuildPath + "\nanoFramework\v1.0"

Copy-Item -Path "$env:Pipeline_Workspace\mdp\*" -Destination $extensionPath -Force -Verbose
57 changes: 44 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,34 +78,60 @@ jobs:
{
# this is a release prep so NO build
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"

Write-Host "##[command] Release preparation, skipping build."
}
else
{
# get commit details, if this is a PR
if($env:System_PullRequest_PullRequestId -ne $null)
{
Write-Host "##[command] **This is a PR build**"
Write-Host "**This is a PR build**"

# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)")))"

$commit = Invoke-RestMethod -Uri "https://api.github.com/repos/nanoframework/nf-interpreter/commits/$(Build.SourceVersion)" -ContentType "application/json" -Method GET

if( ($commit.commit.author.name -eq "nfbot") -and ($commit.commit.message -like "*[version update]*") )
{
Write-Host "##[command] **version update commit, skipping build**"
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
Write-Host "**version update commit, skipping build**"
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
}
else
{
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false"
echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false"
}

# find PR
"Getting PR #$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
$pr = Invoke-WebRequest "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" | ConvertFrom-Json

if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
{
'OK' | Write-Host -ForegroundColor Green
}

# grab PR commit message
$prCommitMessage = $($pr.body)

# debug output
# echo "=====`r`n$($prCommitMessage)`r`n====="

# check if Unit Tests for mscorlib should be run
if(($commit.commit.message -like "*[run mscorlib tests]*") -or ($commit.commit.message -match "Tested against nanoframework/CoreLibrary#(\d+)"))
if(($prCommitMessage -like "*[run mscorlib tests]*") -or ($prCommitMessage -match "Tested against nanoframework/CoreLibrary#(\d+)"))
{
Write-Host "##[command] **mscorlib tests are to be runned**"
Write-Host "##[command] >> mscorlib tests are to be run"
echo "##vso[task.setvariable variable=RUN_MSCORLIB_TESTS;isOutput=true]true"
}

# check if should use specific MDP for mscorlib
if($prCommitMessage -match "\[build with MDP buildId (\d+)\]")
{
Write-Host "##[command] >> Using specific MDP for mscorlib build"
echo "##vso[task.setvariable variable=USE_SPECIFIC_MDP;isOutput=true]true"
}
}
else
{
Expand Down Expand Up @@ -409,7 +435,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('STM32_1_12_4_versioncounter', 0)]
REVISION: $[counter('STM32_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "stm32"

Expand Down Expand Up @@ -524,7 +550,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('ESP32_1_12_4_versioncounter', 0)]
REVISION: $[counter('ESP32_2_0_0_versioncounter', 0)]
IDF_PATH: "D:/a/1/s/esp-idf"
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
TargetPlatform: "esp32"
Expand Down Expand Up @@ -612,7 +638,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('NXP_1_12_4_versioncounter', 0)]
REVISION: $[counter('NXP_2_0_0_versioncounter', 0)]
GIT_LFS_SKIP_SMUDGE: 1
TargetPlatform: "freertos"

Expand Down Expand Up @@ -691,7 +717,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('TI_1_12_4_versioncounter', 0)]
REVISION: $[counter('TI_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "ti_simplelink"

Expand Down Expand Up @@ -763,7 +789,7 @@ jobs:

variables:
# creates a counter and assigns it to the revision variable
REVISION: $[counter('AZURERTOS_1_12_4_versioncounter', 0)]
REVISION: $[counter('AZURERTOS_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "efm32"

Expand Down Expand Up @@ -815,7 +841,7 @@ jobs:
value: true
# creates a counter and assigns it to the revision variable
- name: REVISION
value: $[counter('WIN32_1_12_4_versioncounter', 0)]
value: $[counter('WIN32_2_0_0_versioncounter', 0)]
- name: LITTLEFS_PATH
value: "D:/a/1/s/littlefs"

Expand Down Expand Up @@ -1237,6 +1263,7 @@ jobs:

dependsOn:
- Build_nanoCLR_CLI
- Check_Build_Options

pool:
vmImage: "windows-latest"
Expand All @@ -1246,6 +1273,7 @@ jobs:
solution: "nanoFramework.CoreLibrary.sln"
buildPlatform: "Any CPU"
buildConfiguration: "Release"
DownloadMDP: $[ dependencies.Check_Build_Options.outputs['BuildOptions.USE_SPECIFIC_MDP'] ]

steps:
- checkout: self
Expand All @@ -1271,6 +1299,9 @@ jobs:
displayName: Install .NET nanoFramework MSBuild components
inputs:
GitHubToken: $(GitHubToken)
UsePreview: true

- template: azure-pipelines-templates/check-mdp-for-build.yml

- template: azure-pipelines-templates/install-nuget.yml@templates

Expand Down
Loading
Loading