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.
Recently I started a repository that houses a template which may be used to compile STM32F0 projects with a GCC toolchain. There are two code packages from STM that I used when putting this together, the firmware for the Discovery board itself, and the Standard Peripheral Library for the chip family. I read the license agreements in the root of both packages and I think they’re quite fair. Basically the agreement is you can use them for any purposes as long as the code is only being used on STM hardware. Fair enough.
You can image I was quite upset so see a comment from a reader stating that I have a copyright violation with one of the files in the repo. It seems the linker script that is given as an example for Atollic’s TrueSTUDIO has it’s own extremely strict copyright:
** (c)Copyright Atollic AB.
** You may use this file as-is or modify it according to the needs of your
** project. Distribution of this file (unmodified or modified) is not
** permitted. Atollic AB permit registered Atollic TrueSTUDIO(R) users the
** rights to distribute the assembled, compiled & linked contents of this
** file as part of an application binary file, provided that it is built
** using the Atollic TrueSTUDIO(R) toolchain.
First off, I’m in violation just for posting the file in a repository. But read a bit deeper. Any code that is compiled with this using a GCC toolchain also breaks the copyright unless it’s Atollic’s toolchain.
My beef here is that STM is distributing this. Why? Why put something so restrictive into a software library with such an otherwise reasonable license? Surely there are many engineers at STM capable of writing a linker script that they could release under their own license which would work with TrueSTUDIO. And, it would have the added benefit of allowing other GCC-based toolchains a convenient (and legal) method of linking code.
So I’ve completely removed the file from the repository. If you were one of the ten people watching it on github, this had the unintended consequence of dumping your watch request. In the mean time I’m trying to learn how to write my own linker. This guide regarding Cortex-M3 linkers has been a great help. If you have the skills to contribute a working linker script, please issue a pull request or raise an issue over at github.
Last week we announced a Germany based design contest only accepting applicants from Europe, the Middle East, and Asia. Unfortunately, this left out one of the larger segments of our readers. After doing some scrounging around (and a helpful tip from [Flash Gordon]), we managed to find a similar contest run by STMicroelectronics, the makers of the Discovery board. This contest sounds familiar, with free Discovery Board for all approved applicants, and prizes for the most interesting and creative projects.
Right now the official rules page seems to be missing, so you technically legally should probably wait to enter, but we can’t stop you. It looks like the official rules page is located here. Thanks to [Andee] for pointing that out. Also, it looks like if you live in Puerto Rico or Quebec, you are also out of this contest as well.
If you are from the EMEA area and missed the last contest, be sure to go back and check it out for your chance to win! Also, we love covering contests (especially ones that give out free kits to all contestants), are there any readers out there that know of a developer other than STM that is offering this kind of deal? We would love to hear from you!
STMicroelectronics has another inexpensive development board out; the STM32 Discovery is an ARM Cortex-M3 prototyping platform. Coming in under $10 puts it right along the lines of their 8-bit offering, but this one is 32-bits with 5 KB of RAM and 128 KB of programming memory. It runs a bootloader and has on-board USB for easy programming. They’ve even got a trio of crippled IDE’s to get you started.
Unfortunately this is following a growing trend with the exclusion of Linux support. [Gordon] wrote in to let us know that there is hope in a couple of forms (but not using the USB functionality). The first is a serial programmer using the RS232 that [Paul] came up with (there’s a lot more on his blog so spend some time there). But you can also use the serial debug protocol to program the board.
Either way you’ll still need a method of compiling the code. We’ve had great success rolling our own GNU ARM cross compiler using this guide. Or you can grab a pre-built package by downloading Sourcery G++ lite.
ChemHacker has posted schematics and code for a scanning tunneling microscope. [Sacha De’Angeli] finalized the proof-of-concept design for version 0.1 and released all of the information under the Gnu general public license version 3. You’ll need to build a sensor from a combination of a needle, a piezo, and a ring of magnets. There’s an analog circuit that gathers data from the probe, which is then formatted by and Arduino and sent to your computer.
We haven’t really dabbled in this type of equipment, though we did cover an STM earlier in the year. Take a look at the video after the break and then help jump-start are imagination by sharing your plans for this equipment in the comments.
Continue reading “Scanning Tunneling Microscope Under GPL3”
Ah, the heady aroma of damp engineers! It’s raining in Silicon Valley, where the 2010 Embedded Systems Conference is getting off the ground at San Jose’s McEnery Convention Center.
ESC is primarily an industry event. In the past there’s been some lighter fare such as Parallax, Inc. representing the hobbyist market and giant robot giraffes walking the expo. With the economy now turned sour, the show floor lately is just a bit smaller and the focus more businesslike. Still, nestled between components intended to sell by the millions and oscilloscopes costing more than some cars, one can still find a few nifty technology products well within the budget of most Hack a Day readers, along with a few good classic hacks and tech demos…
Continue reading “Report From ESC Silicon Valley 2010”
A complete microcontroller development kit for little more than the cost of a bare chip? That’s what STMicroelectronics is promising with their STM8S-Discovery: seven dollars gets you not only a board-mounted 8-bit microcontroller with an decent range of GPIO pins and functions, but the USB programmer/debugger as well.
The STM8S microcontroller is in a similar class as the ATmega328 chip on latest-generation Arduinos: an 8-bit 16 MHz core, 32K flash and 2K RAM, UART, SPI, I2C, 10-bit analog-to-digital inputs, timers and interrupts and all the usual goodness. The Discovery board features a small prototyping area and throws in a touch-sense button for fun as well. The ST-LINK USB programmer/debugger comes attached, but it’s easy to crack one off and use this for future STMicro-compatible projects; clearly a plan of giving away the razor and selling the blades.
The development tools are for Windows only, and novice programmers won’t get the same touchy-feely community of support that surrounds Arduino. But for cost-conscious hackers and for educators needing to equip a whole classroom (or if you’re just looking for a stocking stuffer for your geeky nephew), it’s hard to argue with seven bucks for a full plug-and-play setup.