User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Introducing "ARMinARM", an STM32 Cortex-M3 breakout board

Mon Jun 30, 2014 2:43 pm

[Edit 2014-08-17: This started out as an addon board for the 'old' Raspberry Pi, but turned into an addon for the B+. The Model B+ was released about halfway this page. Comments about 'form factor' may make less sense now than they did when this was still for the model B.]

Hi,

I'm working on an STM32 ARM Cortex-M3 breakoutboard for the Raspberry Pi. It's called "ARMinARM", because both the Raspberry Pi and the ARMinARM board contain ARM chips, and they're such great companions.

The Raspberry Pi is used as an "all-in-one" code-editor/compiler/programmer/debugger/communicator for the STM32 ARM Cortex-M3 microcontroller on the ARMinARM board.

Image

Project page: http://www.onandoffables.com/
Installation scripts on github: https://github.com/ARMinARM/arminarm
The rest: https://github.com/ARMinARM?tab=repositories

All software that runs on the Pi and the STM32 is based on open source tools and projects. I have an ARM Cortex-M0/M1/M3/M4 toolchain (arm-none-eabi-gcc) running on the Pi. Debugging is done on the Pi itself (without the need for extra hardware) with OpenOCD's sysfsgpio and GDB. Uploading of the firmware can be done with either GDB or the supplied scripts that use the built-in ST bootloader over the serial port.

All Raspberry Pi and STM32 GPIO pins are available on female headers on the ARMinARM board (or male headers, it's probably going to be a kit: everything SMD already soldered on, solder headers yourself). Power selection (power from Pi, USB or external) and useful connections (BOOT0, RST, USART, I2C, SPI) can be easily made by putting jumpers on dual row male headers.

The Pi handles resetting the board and automatically putting it in and out of bootloader mode. That means compiling and uploading of the firmware can all be done (remotely) with a single command.

The ARMinARM board already runs the following software/firmware/libraries:
- CMSIS/Std_Periph library (http://cmsis.arm.com/ examples provided)
- libopencm3 (http://libopencm3.org)
- Leaflabs' Arduino compatible libmaple (http://leaflabs.com)
- Espruino Javascript interpreter (http://www.espruino.com/)
- eLua: LUA interpreter (http://www.eluaproject.net/)

All software is adapted to run on the ARMinARM board. Pre-compiled binaries for eLua and Espruino are uploadable from the 'setup' menu.

Code: Select all

#######################################################################
#                              ARMinARM                               #
#######################################################################

Essentials:
    0) Update Self
    1) Update/Install ARMinARM GCC Toolchain
    2) Add /opt/arminarm* to PATH env
    3) Disable serial port (required for ARMinARM board, needs reboot)
    4) Enable serial port (for booting RPI over serial port, default)
    5) Update/Install node.js

Fast start:
    10) Upload espruino.bin to ARMinARM board
    11) Upload elua.bin to ARMinARM board

Source code:
    a) Update/Install CMSIS_StdPeriph Examples
    b) Update/Install Espruino source code
    c) Update/Install esp-cli
    d) Update/Install eLua source code
    e) Update/Install libmaple
    f) Update/Install libopencm3
    g) Update/Install OpenOCD
    h) Update/Install ST-Link

    q) Quit

Enter your choice:
Thanks for reading, I'd love to hear your comments and feedback!
Last edited by panik on Sun Aug 17, 2014 1:37 am, edited 1 time in total.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

PiGraham
Posts: 3671
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Mon Jun 30, 2014 2:54 pm

What are the key features and benefits of the ArminArm board compared to other co-pro boards?
What are your intended users and applications?

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Mon Jun 30, 2014 3:23 pm

Good questions, thanks!

I think the benefits of this board compared to others is the small form factor. It's easier to build the whole thing into your own project than other boards. The ARMinARM board bolted on to the Pi feels really solid.

Also, everything from code editting, compiling, flashing and debugging is done on the Pi itself. No need for a Windows computer to compile the firmware.

Also, the wide range of software options. You can go low level (asm, c, c++), be "Arduino compatible" with libmaple, or upload Espruino and program the firmware in Javascript. Espruino is awesome. Event based programming makes a lot of sense on a microcontroller. And it's in fact easier than programming an Arduino.

So the intended users range from die-hard hackers to absolute beginners. If you're considering buying an Arduino with an ethernet shield, I'd reconsider :)

Intended applications? Robots!
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com


User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Tue Jul 01, 2014 10:48 am

Probably.

At the moment, Micropython already runs when there's an F405 (Cortex-M4) version of the STM32 chip on the ARMinARM board. That was the original plan (see the schematics), but reliably booting in and out of bootloader mode turned out to be a bit of a headache.

The current pin compatible F103 (Cortex-M3) version of the STM32 is a better fit for various reasons and more reliable in that sense.

I don't see a reason why Micropython shouldn't be able to run on the F103 on the ARMinARM board, but it needs some work (adding STM32F1xx HAL drivers) and it's still early days.

It's definitely something on the todo list, but I want to have it running before stating that it does.

Goes to show how many awesome projects there are for this line of microcontrollers. I have a Micropython kickstarter board here, and it's pretty neat!
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

uberscubajim
Posts: 162
Joined: Thu Jun 21, 2012 12:22 pm
Location: Ipswich, Suffolk. UK.

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sat Jul 12, 2014 11:53 am

I've only just seen this and it looks awesome!

It's an Embedded Pi done right.

Do you have production dates yet and do you need any testers? :D

Jim.

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sat Jul 12, 2014 2:57 pm

Thanks, Jim!

I've been tweaking the PCB a little bit to add some more flexibility/options, make production easier and fit better (the position of the yellow female RCA plug varies a bit from Pi to Pi). I'm expecting that latest revision from the factory this week, and it should be "the one".

A first small batch of boards can be made not long after that. For them to go out to customers, the end of August is probably a safe bet. I wish this was sooner, but I've also learned that "slow and steady wins the race". That will also give me some time to work on the testing setup, and the needed work on the website and software.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

uberscubajim
Posts: 162
Joined: Thu Jun 21, 2012 12:22 pm
Location: Ipswich, Suffolk. UK.

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sat Jul 12, 2014 8:59 pm

That's good to hear. I've just about managed to get an Embedded Pi to do the basics but it's been a massive learning curve. Essentially I've had to program it from the bare metal up.

Yours looks a lot nicer and with proper Pi support.

Regards,

Jim.

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Wed Jul 23, 2014 10:59 pm

Sooo... Model B+ happened. Slight change of plans. :D

Ironically, the two B+'s I ordered arrived on the same day the "final" prototype PCB came back from the factory last week. I still soldered it up and it fits and works great, but I also CAD'ed and sent out an ARMinARM board for the B+ and it's so much more elegant! Good thing the news didn't arrive one week later because the (now "old") board would have gone into production.

The new B+ based board is much nicer to be used stand-alone, resting on 4 standoffs (use it preprogrammed or with a USB bootloader, but there's also JTAG pins on a separate header at the moment). And literally everything is onandoffable now. Every decision I made about the pinout can we reworked simply by removing jumpers.

With all jumpers on the suggested places it's a fully working customized board with lots of software/examples to get people started fast. I'm sure that beginners will love it. With all jumpers removed it's a flexible STM32 breakout board on a relatively small PCB. Experienced users can still do whatever they want.

Even though this sets me back a few weeks to have new prototypes made, I'm very happy with the result so far! Model B+ couldn't have come at a better moment (OK, a couple of weeks earlier would have been nice, but you can't have it all and I still have the feeling I dodged a bullet).
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

voodoochile
Posts: 3
Joined: Sun Aug 10, 2014 12:11 pm

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sun Aug 10, 2014 12:19 pm

Looks awesome, well done!

Would it also be possible to integrate this with the more powerful stm32M4 range?

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sun Aug 10, 2014 7:26 pm

Thanks voodoochile!

If this is at least somewhat succesful I can imagine a low budget M0/M1 version, and a beefed up M4 version. The whole range is pretty much pin compatible (the M4 only needs 2 extra capacitors), so it's fairly easy to do.

But for now I feel the 'mainstream' (64 pin, 72MHz, 512KB Flash, 64KB RAM) Cortex-M3 version is really the sweet spot. It's tested and proven technology. There are already tons of projects out there using it so there's plenty support from multiple helpful communities.

As I already mentioned, getting an M4 to reliably boot in an out of bootloader mode turns out to be somewhat of a challenge (without sacrificing a handful of valuable pins that need to be pulled down or up on startup). If you simply leave those pins floating it still works 99% of the time, but I couldn't live with that. I want it to work 100% of the time.

Things can be done with a custom bootloader of course, but that means locking it down a bit in functionality. Or force the user to use JTAG, which complicates things for beginning users. Or throw more jumpers in, which complicates things for everyone. Using the Cortex-M3 with the factory supplied default ST bootloader keeps it all very reliable, simple and unbrickable. And that still doesn't rule out custom bootloaders, JTAG or SWD.

Also, not too long ago the 8 bit AVR range was my microcontroller of choice for just about anything (as it still is for a lot of people today), but I got really tired of faffing about with voltage level conversion to interface modern 3.3V sensors and what not. You'll want an AVR on 5 volts to keep *some* speed at least. The 32 bit Cortex-M3 is already so much more powerful in terms of speed, memory size and peripherals than any 8 bit AVR, it's not even funny[*].

In other news, the ARMinARM board for the B+ reached revision 3. I've been trying different things and swapping pins around to reach an optimal pinout. I'm very happy with this last version, because all Raspberry Pi pins are still there, as well as all STM32 pins. It even makes more sense now than it did for the "old" Model B version.

In the old version, one of the things I tried to solve was the "awkward form factor problem". Now that the Raspberry Pi Foundation solved that problem for us with the Model B+, I could focus on usability as a stand alone board. Really an added bonus.

I'll replace the crappy cellphone pic in the opening post for a crappy cellphone pic of the B+ board hopefully next weekend.


[*] it's hilarious.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

voodoochile
Posts: 3
Joined: Sun Aug 10, 2014 12:11 pm

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Thu Aug 14, 2014 6:35 am

Alright, fair enough! When and where can I buy one? :-P

voodoochile
Posts: 3
Joined: Sun Aug 10, 2014 12:11 pm

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Thu Aug 14, 2014 6:45 am

Also, what communications protocol will there be already set up between the two boards by default?

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Thu Aug 14, 2014 2:01 pm

Everything is still on track for 'somewhere in september'. I'm setting up a paypal webshop on the website, but I'll be looking for other distribution channels after initial release (Tindie, Amazon, what have you).

The ARMinARM board comes with a 'blank' STM32 chip, with only the default ST bootloader that's on every STM32 chip leaving the ST factory. That bootloader can't be removed or accidentally overwritten (that's why I used the word 'unbrickable' earlier).

The bootloader on the STM32 and Raspberry Pi communicate through UART (/dev/ttyAMA0, pins 14 and 15, TX and RX on the Pi). Those connections are made with jumpers (on what I call the 'CONN' header). Most firmware like Espruino, eLua and lower-level examples also use that connection to communicate over UART. That means you don't have to swap around jumpers after programming to use and communicate with the uploaded firmware. You'll have no problem controlling the board remotely / without physical access.

There are also I2C and SPI connections on the 'CONN' header (just put jumpers there). You could program the STM32 as an I2C or SPI slave if you need faster communication than is possible with UART. That's optional and you'll have to set that up yourself though. I can't (and don't want to) control what kind of firmware people are uploading. ;)

If you don't want or need I2C or SPI, those connections could also be used to trigger interrupts back and forth for example. Or connect I2C or SPI chips of course. Either on the Pi or STM32 or both. The goal was to have a flexible customizable board, force as little predefined workflow as possible on people and certainly not be in anyone's way.

There's no jumper header to directly make a JTAG connection between the Pi and STM32. Those have to be made with jumperwires or a (soldered) addon board. I think that's not used often enough to warrant the loss of valuable space on the board. Jumper wires are easy enough to plug in though, and all JTAG/SWD pins are also routed to male headers on the outside of the board so you can probe them easily while your firmware is running. Even when the 'default' pins on a 'regular' header are inaccessible because of an addon board.

In other words, other than the UART bootloader there's not really a 'default protocol' to speak of. UART/I2C/SPI connections are easily made. How they're used is up to the firmware. There'll be examples, but it mostly depends on how you want to use it :).

I can imagine people using the low level 'virtual USB Serial' examples as the basis of their firmware to use the board stand alone. Or with an FTDI USB serial cable or similar. Or JTAG/SWD. Or Espruino of course. Espruino automatically switches between virtual UART over USB versus 'real' UART on /dev/ttyAMA0 depending on whether the ARMinARM board is plugged on the Raspberry Pi or connected with a USB cable to a PC/laptop. Which is really nice. Using both is also possible, as well as using one the other 4 UARTs (or all of them).

I hope this answers your question. Please let me know if it doesn't.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sun Aug 17, 2014 1:29 am

Crappy cellphone pics as promised. The website is updated a bit too, to reflect the change to a B+ addon: http://www.onandoffables.com

Stand alone board:
Image

On top of the Pi:
Image

Then there are 'caps' as addons for the ARMinARM board. I'm calling them caps, because there's an 'overhang' of 3 holes on the top side. A bit like the flap of a baseball cap. If you squint a little and use some imagination, that is. There's also a (smaller) overhang of 2 holes on the bottom. A bit like a mullet. But let's not call them mullets, OK?

Note that all pins (also the male ones on the 'inside' and even the footprint for the 32.768KHz crystal) align on a 0.1" grid. That means you can cut a piece of cheap protoboard to size, and have access to all the pins. Or use any size of protoboard you like and have your project look like a beetle with wings. The new form factor of the Model B+ is pretty awesome I think.

You can stack them on top of each other infinitely, or just a couple before it gets silly. Either with extra long headers or in a zigzag pattern with cheaper standard headers, working your way up.

Stand alone with a narrow protocap:
Image

On top of the Pi with a wide protocap:
Image

Now that the ARMinARM board turned into an addon board for the Model B+, can I kindly request that a moderator move this topic to the "B+ addons" section of the forum, please?
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12416
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sun Aug 17, 2014 9:51 am

[moderated, moved as requested, also increased the picture sizes to a more appropriate size (huge) :D ]

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sun Aug 17, 2014 2:38 pm

Aha, so that's how that 'picture size thing' works.

Thanks a lot, mahjongg! :D
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Mon Sep 22, 2014 5:09 pm

I'm happy to report that the ARMinARM board is available now (as a 'semi' kit) on Tindie: https://www.tindie.com/stores/onandoffables/

Hope to see you in the Tindie store!
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Fri Feb 13, 2015 2:02 pm

Some updates:

Raspberry Pi 2
The toolchain is recompiled for ARMv7 to be used on the Raspberry Pi 2 B. But it turns out that the ARMv6 version is still (ever so slightly) faster on ARMv7 so I kept the old version in place for all Raspberry Pi versions.

The uploading tool was broken in the new Raspbian (the Device Tree had to be disabled for it to work), but now everything works again (with the Device Tree enabled). Use 'self update' in the ARMinARM setup menu, and 'sudo apt-get upgrade' in Raspbian.

Price
Following the euro to dollar conversion fluctuations, the price for an ARMinARM board is updated regularly and is now lowered to $34.95. There's now also a cheaper shipping option ($4.50) https://www.tindie.com/products/onandoffables/arminarm/.

Espruino
Gordon Williams (the author of Espruino) was awesome and accepted a pull request a while ago to include the ARMinARM board as one of the boards that Espruino supports 'out of the box'. That means that you'll always compile the latest 'nightly build' of Espruino on the Raspberry Pi if you compile it yourself from source. Uploading the binary from the menu installs the latest 'stable' version.

Reviews
The ARMinARM board is for sale for a while now, and people have been leaving reviews on the Tindie store for which I'm very grateful. Generally, they seem to like that it's easy to install the software and appreciate the 'completeness' of the package and the documentation.

All in all, I'm very happy with how this all went down in the past few months. Producing and selling boards has been a pleasant experience, and you'll see more boards with other microcontrollers in the (near) future.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

DhruvXmeena
Posts: 2
Joined: Thu Oct 20, 2016 2:05 am

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Thu Oct 20, 2016 2:41 am

Hello sir.. I am new to raspberry pi and have done projects like retropie, Lodi, normal servo motor, IoT(with my sensei).

I was searching for uses of cortex m series, and got to know how fast they are.

I am working on a upgraded project of retropie and kodi


My query is:
1. can we offload the calculation to these arm m3?

2. Can we offload the audio processing to arm m3?


Sir if it is possible, then can you tell how to do that.


As I have seen tremendous performance gain with these m3/4/7

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sun Oct 23, 2016 11:56 am

It would certainly help with precise control over (multiple) servos. In fact with anything that requires precise timing controlling/sensing GPIO pins. It depends on the type of IoT project how useful it is. Complicated projects with lots of sensors will definitely benefit.

While the M3 has DAC and I2S, I'm not sure how it would help with audio on Kodi and Retropie. For me, both Kodi and Retropie do what I expect from them on a Raspberry Pi without further support from an external processor. Not that it wouldn't be an interesting exercise :)

I hope this helps!
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

yogi2016
Posts: 26
Joined: Thu Mar 17, 2016 4:49 pm

Re: Introducing "ARMinARM", an STM32 Cortex-M3 breakout boar

Sat Dec 31, 2016 6:12 pm

Just discovered this, very interesting. What got my attention was the possibility of running the Midibox.org's MIOS32 firmware and apps on this board.
For background: Midibox projects consists of a base RTOS package, MIOS32, tailored for building midi devices such as synths, sequencers and knob boxes. Apps are built on the RTOS by adding functions into the event hooks of the RTOS, very easy to develop without having to reinvent the wheel on bare metal. There are standard hardware modules to support LCDs, Digital IO, Analog IO, Ethernet/OSC, SD card, for a start, that can be used with standardized 'ports' that are supported by MIOS32.
Originally the core hardware was based on 8bit PIC uControllers, but the project has migrated to ARM32 controllers in the last ~8 years; the first Next Gen core being based on the STM32F103RE (currently using the STM32F407-Disco board).
http://ucapps.de/mbhp_core_stm32.html
Whereas new development is centered on the latest core, there is already a selection of prebuilt apps for the 'F1 that should run. AND as long as MIOS32 runs, new apps can still be written.
The main issue seems to be custom cabling for the HW modules, as the MB STM32F1 core board breaks out the uC pins to logical ports. But not all the standard 'ports' are used for most apps so the needed ports can be scaled for a given app.
Sorry for the long winded post, but if this project is still active would be interested in getting ahold of a board in the coming year :)
Yogi

Return to “HATs and other add-ons”