Recently I bought a Netduino N3 to create applications in C# for prototyping, but now im faced with executing native c-code in the .NET Micro Framework.
I assumed that the framework should be able to load CLI-DLL’s (where the native c-code is wrapped), but I was wrong.
Is there any chance to execute native c-code in the .NET Micro Framework?
We’re working on a 4.4 release that will include the (real) ability to compile firmware from source and link arbitrary c files. This will add the feature that you want, though, at least initially, you’ll likely need a Keil Compiler license to ensure a compact package size. Stay tuned.
I also did some additional investigation on this topic and I came up with the following link (Tutorial to extend the interpreter with any c files - written by Frank Zhao).
Right now im confused, does the tutorial differs to your described possibility to compile and link any c files?
It does not sound like that.
In addition to your reply, do you have an idea if this mechanism is already implemented? Is it possible to obtain a kind of tutorial or documentation how to use it?
The Porting Kit files contains a few generated C files and one written by Frank. This is where the native driver sits. This is linked into the firmware.
The C# files allow your application to call into the native C/C++ code.
Thank you Mark, it helps in the manner that I’m on the right way. My intension is also to accerlate the switching timing of GPIO’s of a N3.
Unfourtnately I struggle at the intial point to compile the firmware of the device. I just follow the instructions (see link) but it still fails.
Whenever I start the build process it looks good at the beginning, in the meantime (after appr. 2-3 minutes) first build errors occurs. Afterwards the entire build finish with 104 errors.
The first error occurs while building the project “…\Netduino3\TinyCLR\TinyCLR.proj”.
Do you have any idea what might be wrong?
I’m aware that I’m mixing up the inital question with creating firmware of a Netduino device, but it would be great if you could support me at this point.
If you are not in a hurry and just want to get to grips with the build process then I would have a look at this thread on building NETMF 4.4. The build process discussed in that thread uses GCC so while the objects produced are a little larger than Keil it has the benefit that it is free.
As Bryan mentioned, there is work on going to try and simplify the process.
I already read this article but for me it seems that my device is not supported yet “STM32F427”?
I was also wondering about the stage of completion of the NETMF 4.4 as well, is it possible to build a firmware with a user defined extension of the interpreter?
If the answer is yes in both times, then I would give him a try.
That’s a pity, but thank you for your quick respond.
I guess the description
user defined extension of the interpreter
was kept to general. I essentially meant just be able to execute native code on the device. The extension of the interpreter is the way how I understand this process.
It seems so, that I have to use the 4.3 framework to compile a firmware for the N3. Unfortunately I don’t have that much time to wait for the 4.4 support of my device, maybe your are able to help me out for my previous problem?
Whenever I start the build process it looks good at the beginning, in the meantime (after appr. 2-3 minutes) first build errors occurs. Afterwards the entire build finish with 104 errors.
The first error occurs while building the project “…\Netduino3\TinyCLR\TinyCLR.proj”.
Hey guys I have been looking and it seems that v4.4 is still quite - did this ever get released? Or did I miss something?
I put this aside cause of the bug in Maple throwing an exception and not responding to web requests.