Here’s a technique that will let you use the .NET framework on an STM32 Discovery board. [Singular Engineer] was happy to learn that the .NET Micro Framework had been ported for STM32 chips. It’s doesn’t look like the port has hit a stable version yet, but these instructions will be enough to get you up and running. This lets you use managed code in the C# language to program an embedded device: the STM32 F4 Discovery board.
After flashing a new bootloader to the board a driver needs to be added for Windows to communicate with it. Above you can see that the board will enumerate as ‘STM32 .Net Test’. Once the driver is installed the rest of the firmware can be loaded on the board using a GUI supplied with the NETMF for STM32 package. That takes care of prepping the hardware, the rest is a painless process of configuring Visual Studio to use the board as a target. The ‘Hello World’ application then uses C# to blink an LED.
Hot damn! When my boards eventually arrive, I will certainly give this a go!
OMG! Not this sh*t.
Awesome. This could not have come at a better time! My department just got a .NET gadgeteer kit to play with, so I have Visual Studio set up already.
I’ll definitely be giving this a try tomorrow with my F4 board!
Same as Java on MCUs: two thumbs up for the effort, a dozen thumbs down for the implications.
Agree, Novel, interesting, but like Java on an MCU, not a solution to anything useful
Well, for java it would be only 10 thumbs downs (c)
Curious on the memory requirements to implement this on micro without 1MB of flash.
Also wondering how precise this could be time-wise for a real time system.
buy race car, bolt house on top, drive from sofa by writing notes to guy in drivers seat….
+1 B^)
Not saying this isn’t a ridiculous way to go about doing some rather simple things. But still wonder about the resource consumption of .NET on something like this.
I don’t have any real data on this, but the netduino’s chip (assuming I ead the datasheet correctly) has 512 kb of flash (http://netduino.com/netduino/specs.htm) and it performs very well. Also remember, this isn’t a port of pure .NET, but the .NET Micro Framework ,which was designed specifically for chips like this.
There already is a STM32 board running .NET MF: the Netduino Go…
Next on hackaday, how to modify the the controls of a passenger airliner so your dog can fly one!
Ugh. Do not want. The only reason an engineer would use this is because they learned C# as their first language and are too inflexible to move on. From an embedded systems standpoint, if I hired someone to design something and they based a prototype on .NET, I’d find someone else because I wouldn’t want my product chained to Microsoft.
I would be VERY suspicious of an engineer working in embedded electronics who knows C# or Java as their first language.
Those programmers didn`t learn half of the programming – memory management. .Net is so popular because M$ needs to be in full control of everything – from tools to the final products; to capture and reimplement every good idea into their software and to kill other software companies by offering Everything from One company – better integrated with .. itself`s products.
So odd to see so much hostility towards any NETMF posts here on hack-a-day. You’d think anything that made it easier for more people to hack would be welcomed.
Yes NETMF is going to chew up more resources that compiling code with GCC. You know what else it’s going to do? Let my 9 year old son program a device with a 7 inch multi-touch cap screen to play pac-man in under an hour.
It also reduces development costs for companies where .NET programmers are much more plentiful in the job market.
Job security, we can’t have 9 year olds taking our jobs away!
But seriously with highly spec’d micros getting cheaper and cheaper, you might as well throw all this crap on to blink a light when the HW cost the same or less. That leaves development cost to cut, which I would imagine is a big incentive to use something like this.
“You’d think anything that made it easier for more people to hack would be welcomed.”
I think you hit the nail on the head. :)
In the mid-90s, I developed network software for Win95 that provided a TCP/IP stack and a winsock.dll. Microsoft decided to eliminate all third party network software on Windows and added code to Win98 to treat third-party commercial TCP/IP stacks as viruses and remove them if a windows user purchased and tried to install one. It killed a $20 million-a-year product and 70 programmers’ jobs. Other companies in the same space were hit much harder. Some ceased to exist. 6 months later, the DoJ went after Microsoft for similar practices in that and lots of other areas, but the damage was done and the lesson was clear – think carefully before you do anything that makes you (or your 9 year old son) dependent on Microsoft, because they will destroy a platform that you have come to depend on without hesitation if they think it’s strategic or means another dollar for them if they do. As to the value of .NET and C#, remember how they came into being. It was not a technological advance, it was a paranoid reaction to the threat that Microsoft perceived Java to be. Nowadays, .NET is about about lock-in. Making it easier for people to hack is not what .NET is about, and that’s why you’ll see some hostility toward it from some people. That’s not to say that it doesn’t have good things going for it or that it’s not useful – just go into it knowing what the deal really is.
You are so true. This is the reason I avoid developing anything that runs only on MS platform like a plague.
Unfortunately I am afraid that the same fate follows the Java because of Oracle.
And Apple uses forced child labor. Your example, 2 decades ago. My example, today.
As soon as you have a large corporation it will do something bad eventually. Not if, when. The hope is that eventually they care enough to fix it.
The Netduino Go (http://netduino.com/netduinogo/specs.htm) has been out for a few months and is based on the same chip. You have about 100KB of RAM and 384KB of ROM left over for your own code. Having the NETMF on these boards is not so much intended for real-time processing but rather tasks that are not time-critical. And you get the conveniences of the .net Micro Framework (threads, garbage collection, C#) and debugging with Visual Studio. It’s probably even fast enough for home automation or simple robots.
Points to the first person to get a Java JVM written in csharp running on it.
This is crazy. Something as useful as this:
A genius guy made ARM emulator on ATiny with sdram tied to gpios.
It booted Linux kernel in 4 hours.
[http://dmitry.co/index.php?p=./04.Thoughts/08.%20uM0]
This is pretty cool, I did the same thing, for experimenting, but ultimately slapped ChibiOS/RT on it, which has really solid support for this board, and has a really nice balance between system abstraction and letting you get “as close to the metal” as you want. .Net is more slanted toward abstraction, though you can also get very low level.
I was going to respond negatively to the negative reaction to .Net, but I put it on my blog instead.
.NET on a uC ??? you GOT to be kidding me!
okay, so skipping the trolling/hate/insults/ect…
most people who program uC’s as a hobby do so
TO GET AWAY FROM THE BLASTED .NET !!!
it’s a ploy to get you to buy 19$ uC’s PLUS THE COST OF A SOFTWARE/FIRMWARE LICENSE, instead of 1.5$ uC’s. and its a ploy to get you to buy the newest version of windows for your desktop computer, without the newest .NET updates, you’d never be able to communicate with the darn chip, and everytyhing on the internet the chip USED to work with is now broken! why? cuz u need .NET update, which is 3x larger file then before. so you need uC with 367mb so install .NET, before it was 100mb.
when the update hits the net, anyone selling a cheap(er) uC go out of buisness overnight, why? the .NET is too old and the chip wont accept the newest update.
now you can ONLY flash an LED with a powerful uC and all the hurt script kiddies rejoyce because they are now better then (real) hard-core programmers.
whoever invented this is either working for microsoft, butthurt, or just plain evil.
PS: cool internet radio thingy, it will last as long as microsoft holds off the next .NET update, then its garbage or scrap.
PPS: im FUMING mad at whoever invented .NET for uC, and im SO mad i wont begin to describe, i’d go to jail, or just get banned. im sure there are people who feel the same way
even in his demo-picture it says error, maybe we can call it “.NETRROR”
NewCommentor1283,
Your comment makes absolutely no sense whatsoever. Have you actually worked with .NET Micro Framework?
Obviously not. FYI, it is open sourced under the Apache License, but I guess that is just another ploy.
What about the FEZ Cerberus from GHI Electronics.
That one is using the STM32F4 device.
They have actually also made a page describing how to install their .NETMF port to the STM32F4DISCOVERY board: http://wiki.tinyclr.com/index.php?title=FEZ_Cerberus_Firmware_On_Discovery
.Net is not to allow people to hack but the opposite – to hide the know-how and hardware behind a thick layer of API for “everything” over the WinAPI layer over the HAL miniports layer over the…. So one to be unable to create something w/o them.