netmf / netmf-interpreter Goto Github PK
View Code? Open in Web Editor NEW.NET Micro Framework Interpreter
Home Page: http://netmf.github.io/netmf-interpreter/
License: Other
.NET Micro Framework Interpreter
Home Page: http://netmf.github.io/netmf-interpreter/
License: Other
After upgrade to VS14 (2015) the build process started from build_sdk.cmd generates a number of warnings:
warning C4267: '=': conversion from 'size_t' to 'short', possible loss of data
warning C4838: conversion from '' to '' requires a narrowing conversion
In Debug configuration there are 500+ Code Analysis warnings.
It would be beneficial to have Visual C++ projects upgraded so they can be opened in Visual Studio 2013 (and later) and in several cases they can be used directly in msbuild (e.g. SDK server tools).
If I understand it correctly, it is not needed to convert them manually, it should be possible to modify MakeVCProject
task in Framework\Tools\BuildTasksNativeBuild
(or create MakeVcxProject
task). Alternatively, an XSLT transformation could be used to create .vcxproj from dotnetmf.proj.
We have obsolete macros referencing version 3.0 in the GPIOButtonInputProvider template. We should remove these in preference to the latest version.
The Roslyn compiler generates code for event add/remove accessors that the NETMF runtime and metadataprocessor can't handle. In particular it generates calls to Interlocked.CompareExchange<T>()
. This appears to be done to move to a lock free implementation as the prior compiler generated accessors with [MethodImpl( MethodImplOptions.Synchronized )] to prevent conflicts updating/replacing the underlying delegate. Examples shown below:
using System;
namespace ClassLibrary1
{
public class Class1
{
public delegate void FooHandler(object sender, EventArgs e);
public event Class1.FooHandler Foo;
public void Trigger()
{
this.Foo(this, EventArgs.Empty);
}
}
}
public event Class1.FooHandler Foo
{
add
{
Class1.FooHandler fooHandler = this.Foo;
Class1.FooHandler fooHandler2;
do
{
fooHandler2 = fooHandler;
Class1.FooHandler value2 = (Class1.FooHandler)Delegate.Combine(fooHandler2, value);
fooHandler = Interlocked.CompareExchange<Class1.FooHandler>(ref this.Foo, value2, fooHandler2);
}
while (fooHandler != fooHandler2);
}
remove
{
Class1.FooHandler fooHandler = this.Foo;
Class1.FooHandler fooHandler2;
do
{
fooHandler2 = fooHandler;
Class1.FooHandler value2 = (Class1.FooHandler)Delegate.Remove(fooHandler2, value);
fooHandler = Interlocked.CompareExchange<Class1.FooHandler>(ref this.Foo, value2, fooHandler2);
} while (fooHandler != fooHandler2);
}
}
Create a tool to perform IL => IL transform to convert the call to the generic CompareExchange into a call to the non-generic form so the result becomes:
public event Class1.FooHandler Foo
{
add
{
Class1.FooHandler fooHandler = this.Foo;
Class1.FooHandler fooHandler2;
do
{
fooHandler2 = fooHandler;
Class1.FooHandler value2 = (Class1.FooHandler)Delegate.Combine(fooHandler2, value);
fooHandler = Interlocked.CompareExchange(ref this.Foo, value2, fooHandler2);
} while (fooHandler != fooHandler2);
}
remove
{
Class1.FooHandler fooHandler = this.Foo;
Class1.FooHandler fooHandler2;
do
{
fooHandler2 = fooHandler;
Class1.FooHandler value2 = (Class1.FooHandler)Delegate.Remove(fooHandler2, value);
fooHandler = Interlocked.CompareExchange(ref this.Foo, value2, fooHandler2);
} while (fooHandler != fooHandler2);
}
}
I'm running into a data corruption issue on NETMF v4.3 when dealing with UTF16 surrogate pairs inside of char arrays. The following code demonstrates the issue I'm seeing:
Debug.EnableGCMessages(false);
for (int i = 0; i < 10; i++)
{
string s = string.Empty;
char[] buffer = new char[2];
for (int j = 0; j < 30; j++)
{
buffer[0] = (char)0xD83D;
Debug.GC(true);
buffer[1] = (char)0xDE80;
s += new string(buffer);
}
Debug.Print("Result: " + s);
}
The character I'm attempting to build in this example is the rocket emoji "\uD83D\uDE80"
. The issue I'm seeing is that random characters are dropped or added and, occasionally, parts of other strings (and method names, etc.) are pulled in to the final result.
Here's an example of the output I'm seeing:
Here's what it should look like (the same code run from a desktop console app):
I've been able to observe this issue on both the NETMF emulator and on a Netduino 3 Wi-Fi.
This issue actually appears pretty frequently when dealing with StringBuilders, etc. I'm not sure what specifically is triggering the issue, but I have noticed running the garbage collector makes it appear more frequently. Even without the call to Debug.GC in the above code, the result will have some corruption (although usually not as much).
Please let me know if you need any more information. Thanks!
I really like the quick feedback loop that gitter provides. See the dotnet/roslyn room:
https://gitter.im/dotnet/roslyn
Would be nice if you guys create public room for NETMF/netmf-interpreter.
Thank you,
Valentin
Trying to execute RunTests tool on any test solution using emulator, the tool returns Win32Exception. The exception is thrown from Microsoft.SPOT.Debugger library. Basically, BeginReadCore method in GenericAsyncStream class tries to read from the pipes/stream written to by emulator but in one call gets ERROR_BROKEN_PIPE. This broken pipe error apparently happens at the end of test run and close to when the debugger is going to close the stream. I noticed that the stream shows 1 character to read but when the debugger tries to read, the error happens.
Repro Steps:
VSIX package for VS 2013 is not built (warning NETMF: Visual Studio 2013 SDK not found VSIX package will not be generated), because VSSDK12INSTALLDIR
variable is empty - its initialization was removed from setenv_sdk
in commit 4643ab8. Is this intentional?
Hi.
It seems that VS (2013) cannot deploy any application.
This is output from MF Device Deployment console:
Looking for a device on transport 'USB'
Starting device deployment...
Iteration 0
Opening port ?\usb#vid_0483&pid_a08f#5&a453745&0&4#{d32d1d64-963d-463e-874a-8ec8c8082cbf}
Attaching debugger engine...
... debugger engine attached!
Querying device assemblies...
Found Assembly mscorlib 4.4.0.0
Found Assembly Microsoft.SPOT.Native 4.4.0.0
Found Assembly Microsoft.SPOT.Hardware 4.4.0.0
Found Assembly Microsoft.SPOT.Hardware.Usb 4.4.0.0
Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.4.0.0
Found Assembly Microsoft.SPOT.Net 4.4.0.0
Found Assembly System 4.4.0.0
Adding pe file C:\Sviluppo\NETMF\MySamples\MFApp44\MFApp44\bin\Debug\le\MFApp44.pe to deployment bundle
Attempting deployment...
Incrementally deploying assemblies to device
Assemblies not successfully deployed to device.
Deployment to the device was not successful.
Any idea? (I'm running stock porting for MCBSTM32F400 board).
When running build_SDK in the build server the output of the build is redirected to a common build drop share. To do that, the build_share parameter is used to specify the location of the share. However, since several of the projects are copied (and trasnformed) and then built from the output folder the BuildEnv.props file won't be found, which generates an error.
The build process started from build_sdk.cmd will generate a number of warnings:
warning MSB3644: The reference assemblies for framework ".NETMicroFramework,Version=vX.Y"
warning MSB4011: "<path>.Targets" cannot be imported again. It was already imported at "<path> <line>,<col>)". This is most likely a build authoring error. This subsequent import will be ignored.
warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
warning LNK4199: /DELAYLOAD:<dllname>.dll ignored; no imports found from <dllname>.dll
warning LNK4042: object specified more than once; extras ignored
warning C4065: switch statement contains 'default' but no 'case' labels
warning C4996: '<apiname>: was declared deprecated
warning C4018: '<operator>' : signed/unsigned mismatch
warning C4244: '<operator>' : conversion from '<srctype>' to '<dsttype>', possible loss of data
warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
The build system upgrade to VS14 (commit ae0f29a) missed VS SDK version check in build_sdk.cmd
:
if /i "%VSSDK120Install%"=="" goto :MissingVSSDK
if NOT EXIST "%VSSDK120Install%" goto :MissingVSSDK
should be
if /i "%VSSDK140Install%"=="" goto :MissingVSSDK
if NOT EXIST "%VSSDK140Install%" goto :MissingVSSDK
Please add back support for bit shift operators in VB.
This bug is also reported on Codeplex: http://netmf.codeplex.com/workitem/2194
Refer to http://netmf.codeplex.com/workitem/2422
In .NET, DateTime.Ticks represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001. However, in .NET Micro, DateTime.Ticks returns the number of ticks since 12:00 AM January 1, year 1601 A.D.
I would like to contribute support for recent GCC toolchain (GNU Tools for ARM Embedded Processors, including newlib-nano), but I don't have any MCBSTM32 board for testing, I was thinking something more affordable like STM32F4-Discovery.
Are there any plans to include STM32F4-Discovery port in the official NETMF?
From CodePlex issue 2095
When yield return statement is in a foreach block compiler fails with
MMP : error MMP0000: CLR_E_FAIL.
Here is a sample. Tried on both 4.2 and 4.3 sdk versions.
public static IEnumerable Fails()
{
var array = new object[] { 1, 2, 3 };
foreach (var a in array)
yield return a;
}
The build_sdk (in dev
branch) reports two missing solution wizard-related projects: WizardSupport.csproj
and SolutionWizard.csproj
, which were removed, but are still referenced from CLR\Tools\PlatformDesigner\build.dirproj
that is included from the root build.proj
, because the condition is true:
<Project
Condition="EXISTS('$(SPOCLIENT)\CLR\Tools\PlatformDesigner\build.dirproj')"
Include="
Product\build.dirproj;
CLR\Tools\PlatformDesigner\build.dirproj;
tools\scripts\port\Sample\build.dirproj"
/>
I guess the reference(s) should be removed from one of the other build.dirproj.
Windows.Devices.Gpio.set_DebounceTimeout is not yet implemented. To do so, we must add the capability for the HAL layer to set debounce per-pin.
Introduced in #97.
Instantiating a String object with zero-size char array in NETMF results in a null string while on .NET it results in String.Empty. For compatibility between NETMF and .NET behavior, I believe this constructor in NETMF should be modified.
The string table (c_CLR_StringTable_Data[]
, c_CLR_StringTable_Lookup[]
) in CLR\Core\StringTable.cpp
was generated from assemblies that do not exist anymore and its content is outdated (~20%, cca 3 KB). Also, the mechanism used to create it has changed and there is some obsolete code and unused files.
So, I'd suggest to
MetaDataProcessor.exe
to exclude strings such as $$method0x6000*
and <PrivateImplementationDetails>{GUID}
from generated string table,StringTableInputs
in Microsoft.SPOT.Support.Settings
to include valid *.strings,StringTable.cpp
content,tools\scripts\compile_stringtable.cmd
,#if defined TINYCLR_CREATE_STRINGTABLE
.There are multiple copies of device startup assembly files (bootvector.s, firstentry*, vectorshandlers.s, vectorstrampolines.s etc.) present in the source tree, some of which are no longer relevant for Cortex-M. Would it be possible to consolidate those files or perhaps replace them with CMSIS variants?
When v11 (2012) or v14 (2015) VSSDK is not installed on the machine, but present in ..\tools\x86\MicrosoftSDKs\VSSDK\VS##
the build of ...\vs##\CorDebug.csproj
fails due to missing C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v##.0\VSSDK\Microsoft.VsSDK.targets
.
This is caused by change in Microsoft.SPOT.CSharp.Host.Targets
in commit ad67ceb, where initialization of VSToolsPath
variable was added. Before that, MSBuild files for VSSDK 2013 were always used.
The proposed fix:
..\tools\...\VSSDK\VS##\MSBuild
directories (not in the zip download, has to be copied manually)setenv_base.cmd
add if EXIST "%VSSDK##INSTALLDIR%" set VSToolsPath="%VSSDK##INSTALLDIR%\MSBuild"
Microsoft.SPOT.CSharp.Host.Targets
add conditions <VSToolsPath Condition="'$(VSToolsPath)'==''"
Edit: There is a bug in the proposed fix, see comment below.
Now that CoreCLR and CoreFX has been released under the MIT license, wouldn't it make sense to change the license of .NET Micro Framework to MIT license too?
HI, not sure if this is the right place for this as I have a feeling the issue might be with the integration with vs 2015 rc. Let me know where I can raise this issue if it's misplaced.
In a brand new project I have the code:
public class Foo
{
public Foo()
{
var bars = new[] {new Bar()};
var b = bars[0];
}
struct Bar
{
}
}
When I compile I get:
C:\code\Testing\Testing\Program.cs(25,9,25,21): error MMP0000: Cannot parse method signature '.ctor'
MMP : error MMP0000: CLR_E_FAIL
I can get the code to build by:
struct
to a class
var b = bars[0];
The same code works fine under visual studio 2013.
Windows.Devices.Enumeration should not report a bus if it doesn't exist.
Introduced in #97.
Consider the following code:
interface MyInterface
{
int MyMethod();
}
class MyBaseClass : MyInterface
{
int MyInterface.MyMethod()
{
return 1;
}
}
class MyClass : MyBaseClass, MyInterface
{
int void MyMethod()
{
return 2;
}
}
Now, if you run the following code:
MyInterface myInstance = new MyClass();
int value = myInstance.MyMethod();
According to C# Language Specification, value
variable should have the value of 2
; however, in NETMF its value is 1
.
I followed building guide but even though building SDK runs successfully, VSIX generation fails with mentioned VSSDK1039 error. How could I verify "correctness" of my VSSDK setup?
Exact (and complete) error reported is:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsS
DK.targets(59,5): error VSSDK1039: Source.extension.vsixmanifest file not found
in project. If a file with this name is present in the project, make sure the
build action is set to "None". [C:\NETMF\netmf-interpreter\Framework\CorDebug\v
s12\cordebugvs12.csproj]
Thanks!
When the CLR reset, the keil board will hit Bus Fault error at netif_set_ipAddr.
The CLR reset after the VS Deployemnt, as it will hit the bus fault, then VS is no longer able to attached to the board for debugging.
tcp_active_pcbs is all corrupted, that is why hit bus fault. the data inside the tcp_active_pcbs is bogus. Guess when CLR reset the tcp is not probably cleanup. If we look back the old lwip codes, we did add "MS_CHANGE" for purposely to do the cleanup. do we need that again?
Hi,
don't know if this is the right place but...
When i run the build_sdk.cmd I get the sdk msi in the place that is mentioned in the wiki,
but the vsix files aren't where they're supposed to (BuildOutput\public\Release\Server\dll).
And I can't find them anywhere else either...
Any ideas?
Regards
Fred
This issue is to go along with the Pull Request #57 I submitted previously.
I've been bitten by this one a few times myself. When managed code attempts to set the .Active property of a TristatePort object to the value it is currently set to, instead of simply doing nothing (as nothing needs to be done), the interpreter instead throws an InvalidOperationException. This appears to be entirely an arbitrary design choice, as no code is avoided or skipped through the inclusion of the function that initiates the exception. As well, it creates an increased workload for the user, as now they must work around this exception to duplicate the checks already present in unmanaged code. This presents an increased learning curve that is not necessary, and serves only to make programming with Tristate ports more difficult.
The pull request i submitted removes the function call that causes the exception. The effect of this upon managed code is that an exception is not thrown if the user attempts to write a value to the .Active property when the .Active property is already set to that value. It does not prevent existing idioms such as if(Port.Active <> NewValue) Port.Active = NewValue;
.
The idiom that would be affected is the use of try/catch to perform a different function if the code fails, for example:
try {
Port.Active = NewValue;
} catch (InvalidOperationException ex) {
// Do user logic here when NewValue == Port.Active
}
If you mistype a macro value used in a scatterfile XML file the build will generate an error but the error message provides no meaningful or helpful clues on what is wrong:
Repro steps:
Add the following to a load region of an existing scatter file xml:
<ExecRegion Name="ER_BUG_REPRO" Base="%BUG_REPRO_NOTDEFINED%" Options="ABSOLUTE UNINIT" Size=""/>
Expected results:
Error message along the lines of "ERROR <line,column>: 'ER_BUG_REPRO' is not defined
Actual results:
error : Error trying to process scatterfile <scatterfilename.xml> into <scatterfilename.txt>: Key cannot be null.
error : Parameter name: key
new StringBuilder().ToString() on NETMF return null while the same code on .NET return String.Empty. For compatibility between NETMF and .NET behavior, I believe StringBuilder in NETMF should be modified.
I am trying to build the firmware solutions.
Starting point:
The "Getting Started" guide on the Wiki lists Visual Studio 2013 and Visual Studio SDK as a pre-qequisite for building the SDK.
However, it appears that these packages are also required for building a firmware solution. With only Visual Studio 2012 installed, I get the following error messages:
C:\NETMF\netmf-interpreter\BuildEnv.props(66,5): error MSB4175: The task factor
y "CodeTaskFactory" could not be loaded from the assembly "C:\Windows\Microsoft
.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v12.0.dll". Could not load file
or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.B
uild.Tasks.v12.0.dll' or one of its dependencies. The system cannot find the fi
le specified. [C:\NETMF\netmf-interpreter\Framework\Tools\BuildTasksInternal\In
ternalBuildTasks.csproj]
C:\NETMF\netmf-interpreter\devicecode\Targets\Native\STM32F4\STM32F4.settings(3
8,9): error NETMFBLD: Missing CMSIS installation at: C:\NETMF\netmf-interpreter
\CMSIS\* [C:\NETMF\netmf-interpreter\Solutions\MCBSTM32F400\dotnetmf.proj]
After installing Visual Studio 2013 and Visual Studio 2013 SDK, the solution Windows2 builds fine.
But building the other solutions still results in error messages:
Processing file: scatterfile_bootloader_MDK.xml
"C:\NETMF\netmf-interpreter\BuildOutput\THUMB2\MDK5.05\le\FLASH\release\MCBST
M32E\bin\Tinybooter_scatterfile.txt", line 12 (column 5): Warning: L6312W: Em
pty Execution region description for region ER_RAM_RO
EXEC : error : L6218E: Undefined symbol ARM_Vectors (referred from STM32_intc_f
unctions.obj). [C:\NETMF\netmf-interpreter\Solutions\MCBSTM32E\TinyBooter\TinyB
ooter.proj]
Not enough information to produce a SYMDEFs file.
Not enough information to produce a FEEDBACK file.
Not enough information to list image symbols.
Finished: 3 information, 1 warning and 1 error messages.
C:\NETMF\netmf-interpreter\tools\targets\Microsoft.SPOT.System.MDK.targets(313,
5): error MSB3073: The command ""C:\Keil\ARM\ARMCC\bin\armlink.exe" --no_keep_
init_arrays --feedback C:\NETMF\netmf-interpreter\BuildOutput\THUMB2\MDK5.05\le
\FLASH\release\MCBSTM32E\bin\Tinybooter_MCBSTM32E_FLASH_Release_MDK5.05.feedbac
k --debug --remove --unmangled --info sizes,totals,veneers,unused,libraries --
map --xref --symbols --callgraph --userlibpath C:\NETMF\netmf-interpreter\Buil
dOutput\THUMB2\MDK5.05\le\FLASH\release\MCBSTM32E\lib --userlibpath C:\NETMF\ne
tmf-interpreter\BuildOutput\THUMB2\MDK5.05\le\ANY_MEDIA\release\lib --libpath C
:\Keil\ARM\RV31\LIB --libpath C:\Keil\ARM\ARMCC\LIB --entry EntryPoint --symd
efs C:\NETMF\netmf-interpreter\BuildOutput\THUMB2\MDK5.05\le\FLASH\release\MCBS
TM32E\bin\Tinybooter.symdefs --list C:\NETMF\netmf-interpreter\BuildOutput\THUM
B2\MDK5.05\le\FLASH\release\MCBSTM32E\bin\Tinybooter.map --output C:\NETMF\netm
f-interpreter\BuildOutput\THUMB2\MDK5.05\le\FLASH\release\MCBSTM32E\bin\Tinyboo
ter.axf --scatter C:\NETMF\netmf-interpreter\BuildOutput\THUMB2\MDK5.05\le\FLAS
H\release\MCBSTM32E\bin\Tinybooter_scatterfile.txt C:\NETMF\netmf-interpreter\B
uildOutput\THUMB2\MDK5.05\le\FLASH\release\MCBSTM32E\obj\Solutions\MCBSTM32E\Ti
nyBooter\Allocator.obj C:\NETMF\netmf-interpreter\BuildOutput\THUMB2\MDK5.05\le
\FLASH\release\MCBSTM32E\obj\Solutions\MCBSTM32E\TinyBooter\TinyBooterEntry.obj
Crypto.lib GlobalLock_hal_Cortex.lib TinyHal_Cortex.lib cpu_prestackinit_stub
s.lib STM32_bootstrap.lib cpu_cache_stubs.lib cpu_ebiu_stubs.lib STM32_GPIO.lib
STM32_IntC.lib cpu_mmu_stubs.lib STM32_Power.lib STM32_time.lib STM32_SPI.lib
STM32_USART.lib STM32_USB.lib cpu_watchdog_stubs.lib system_initialization_hal_
loader.lib Watchdog_pal_stubs.lib asyncproccall_pal.lib blockstorage_pal.lib Bu
ttons_pal.lib COM_pal.lib DebuggerPort_SSL_config_stubs.lib i2c_pal_stubs.lib u
sart_pal.lib usb_pal.lib config_pal_loader.lib SimpleHeap.lib SimpleHeap_config
.lib heap_pal.lib piezo_pal_stubs.lib tinycrt_pal_loader.lib fs_pal_stubs.lib F
S_Config_stubs.lib Ink_pal_stubs.lib Gesture_pal_stubs.lib palevent_pal_stubs.l
ib Time_pal.lib TimeService_pal_stubs.lib backlight_hal_stubs.lib batterycharge
r_hal_stubs.lib batterymeasurement_hal_stubs.lib lcd_hal_stubs.lib cpu_LCD_stub
s.lib STM32_Flash.lib M25P64_Flash.lib STM32_blconfig_MCBSTM32E.lib M25P64_blco
nfig_MCBSTM32E.lib BlockStorage_AddDevices_MCBSTM32E.lib IO_Init_MCBSTM32E.lib
events_pal.lib sockets_pal_stubs.lib usb_pal_config_MCBSTM32E.lib C:\NETMF\netm
f-interpreter\BuildOutput\THUMB2\MDK5.05\le\FLASH\release\MCBSTM32E\lib\tmp_Tin
ybooter.lib" exited with code 1. [C:\NETMF\netmf-interpreter\Solutions\MCBSTM32
E\TinyBooter\TinyBooter.proj]
EXEC : error : C9912E: No --cpu selected [C:\NETMF\netmf-interpreter\Support\Wi
reProtocol\dotNetMF.proj]
C:\NETMF\netmf-interpreter\tools\targets\Microsoft.SPOT.System.MDK.targets(278,
4): error MSB3073: The command ""C:\Keil\ARM\ARMCC\bin\armcc.exe" --cpp --dia
g_suppress 2874,111,161,550,C3011,C4052 --diag_suppress 66,161,230,1293 --split
_sections -DMDK_V3_1 -DARM_V3_1 --feedback C:\NETMF\netmf-interpreter\tools\ma
ke\Feedback\TEMPLATE_MDK5.05.feedback -DTINYCLR_ENABLE_SOURCELEVELDEBUGGING -D
COMPILE_ARM -DVERSION_MAJOR=4 -DVERSION_MINOR=4 -DVERSION_BUILD=0 -DVERSION_RE
VISION=0 -DOEMSYSTEMINFOSTRING="\"Microsoft Copyright (C) Microsoft Corporation
. All rights reserved.\"" -DPLATFORM_ARM_TEMPLATE -DTARGETLOCATION_FLASH -DL
ITTLE_ENDIAN --arm --fpu softvfp --littleend --no_debug --dwarf2 --no_d
ebug_macros -O2 --inline -Otime --no_autoinline -DNDEBUG -IC:\NETMF\netmf-in
terpreter\Support\WireProtocol -IC:\NETMF\netmf-interpreter\DeviceCode\include
-IC:\NETMF\netmf-interpreter\DeviceCode\Cores\arm -IC:\NETMF\netmf-interpreter\
Support\Include -IC:\NETMF\netmf-interpreter\crypto\inc -IC:\NETMF\netmf-int
erpreter\CLR\Include -IC:\NETMF\netmf-interpreter\CLR\Libraries\CorLib -IC:\NET
MF\netmf-interpreter\CLR\Libraries\SPOT -IC:\NETMF\netmf-interpreter\CLR\Librar
ies\SPOT_Hardware -IC:\NETMF\netmf-interpreter\CLR\Libraries\SPOT_Graphics -IC:
\NETMF\netmf-interpreter\CLR\Libraries\SPOT_Net -IC:\NETMF\netmf-interpreter\CL
R\Libraries\SPOT_Net_Security -IC:\NETMF\netmf-interpreter\Solutions\Template -
IC:\NETMF\netmf-interpreter\devicecode\Targets\Native\TEMPLATE -IC:\NETMF\netmf
-interpreter\DeviceCode\Cores\arm -IC:\NETMF\netmf-interpreter\DeviceCode\Cores
\arm\Include -IC:\NETMF\netmf-interpreter\DeviceCode -IC:\NETMF\netmf-interpret
er\DeviceCode\Include -IC:\NETMF\netmf-interpreter\DeviceCode\Targets\Native\TE
MPLATE\TEMPLATE -IC:\NETMF\netmf-interpreter\Support\Include -IC:\NETMF\netmf-i
nterpreter\DeviceCode\include -IC:\NETMF\netmf-interpreter\CLR\include -IC:\NET
MF\netmf-interpreter\Crypto\inc -IC:\NETMF\netmf-interpreter\BuildOutput\ARM\MD
K5.05\le\ANY_MEDIA\release\lib -IC:\Keil\ARM\RV31\INC -o C:\NETMF\netmf-inte
rpreter\BuildOutput\ARM\MDK5.05\le\ANY_MEDIA\release\obj\Support\WireProtocol\C
ompression.obj -c C:\NETMF\netmf-interpreter\Support\WireProtocol\Compression.c
pp " exited with code 1. [C:\NETMF\netmf-interpreter\Support\WireProtocol\dotN
etMF.proj]
C:\NETMF\netmf-interpreter\devicecode\Targets\Native\STM32F4\STM32F4.settings(3
8,9): error NETMFBLD: Missing CMSIS installation at: C:\NETMF\netmf-interpreter
\CMSIS\* [C:\NETMF\netmf-interpreter\Solutions\MCBSTM32F400\dotnetmf.proj]
Any ideas on what could cause these problems?
Thank you very much,
Marc
Hi.
I'm trying to author a solution for Discovery4 and, even though I succeeded in running TinyBooter, I have TinyClr "throwing" a BusFault error very early in bootstrapping code.
More in details, SystemInit() runs without hiccups, but soonafter, when AppEntry.s jumps to __main() function, located into tinyclr_dat.s, troubles happen, with situation depicted in following screenshot:
https://dl.dropboxusercontent.com/u/7414592/Embedded/NETMF44_Binaries/BusFault_Screenshot.png
I'm not an expert, but it seems that such issue could be related to a "bad" scatterfile, that I uploaded for reference here: https://dl.dropboxusercontent.com/u/7414592/Embedded/NETMF44_Binaries/TinyCLR_Scatterfile.7z
Also, I was wondering whether commenting out all things related to Network support could have removed too much of CMSIS_RTX stuff, so I uploaded also my TinyCLR.proj here: https://dl.dropboxusercontent.com/u/7414592/Embedded/NETMF44_Binaries/TinyCLR.proj
Thank you very much!
platform_selector.h
doesn't allow to configure STM32F411 to run at stock 100 MHz frequency (Unable to set 100000000
value to SYSTEM_CLOCK_HZ
and SYSTEM_CYCLE_CLOCK_HZ
), so it's not possible to run STM32F411 at full speed.
Here is the original C++ configuration from the STM32F411 SDK sample:
SYSCLK(Hz) = 100000000
HCLK(Hz) = 100000000
AHB Prescaler = 1
APB1 Prescaler = 2
APB2 Prescaler = 1
HSI Frequency(Hz) = 16000000
PLL_M = 16
PLL_N = 400
PLL_P = 4
PLL_Q = 7
There are version numbers in different parts of NETMF, plus additional infos like vendor names. There seems to be no system behind this, and no clean way to use the stuff.
Also, the hardware type and version are missing. Some of this information should be accessible through a standard NETMF API, as this is needed for robust firmware updates (MFUpdate). For example, the update feature of an application may want to check whether the underlying hardware is actually compatible with a new firmware image about to be deployed. (As there is no standard way in which the hardware identifies itself, we need this information in the firmware, and a way to make sure that a correct firmware does not update itself to an incorrect one.)
We've tried to find the "minimal viable hack" given the current NETMF data types, I could send you the documentation PDF if you are interested ([email protected]).
Min and Max clock frequency in SPI require a modification of the HAL layer. As this is particularly sensitive work, it's been pushed into a separate change from the original pull request.
XML doc comments for Windows.Devices are largely based on pre-ship documentation for our UWP counterparts. We should update these when the doc writers update the source MSDN documentation.
byte b = 255;
string s = b.ToString("X2");
This code returns "FF"
on device but "FFFFFFFF"
in the emulator (similarly for all byte values above 127). "FF"
is expected.
I followed exactly the steps in the readme, but the code fails to build. I attached a part from the build_sdk output:
Compiler: VS 12
Building PreSDK ...
Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.34014]
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(991,5): warning MSB3644: The reference assemblies for framework ".NETMicroFramework,Version=v4.4" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted
The reference assemblies Version 4.4 must be installed in order to compile. The readme does not contain this information's.
Have to check on codeplex, or here on github, if a release is downloadable.
MetaDataProcessor.exe fails with the above error during the SDK build on a computer where only .NET Framework 4.0 is installed (.NET 2.0/3.5 is not installed). It also happens during the build of a .NET Micro Framework project from within Visual Studio.
[NETMF CodePlex Issue #221]
The tool MFDeploy shows a lot of info when selecting the Device capabilities whilst having a netmf device connected, some of them are available in the SystemInfo class in Microsoft.SPOT.Hardware. Can you make them all available.
There was a known memory leak when using SSL in previous versions of NETMF. It doesn't appear that the issue was brought over from codeplex nor does it appear to have been resolved.
GCC (4.9.3) assembler emits 32-bit encoding (b.w
) for Reset_Handler jump in AppEntry.s, which results in wrong signature and TinyBooter cannot locate TinyCLR. Using b.n
(force 16-bit encoding) fixes it.
The AppEntry.s in Support-GCC branch (Solutions/MCBSTM32F400/DeviceCode/TinyHal/GNU_S/AppEntry.s
) lines 99 and 157 have incorrect comment character ;
(most likely copied from its MDK counterpart), causing assembler errors.
The MCBSTM32F400 rev1.2 boards use a KSZ8081 PHY instead of the ST802RTI. Ethernet/networking support therefore does not work on the newer board revisions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.