I am using Windows 8.1 64-bit and Arduino 1.6.1/2. I have my Windows 8.1 in "test mode" so that I can utilize the unsigned drivers. As you are utilizing a Mac, just about everything I know about the Windows environment will be useless.

The tested board is this one: STM32 32-bit Maple Mini clone I have over 10 boards from different vendors all stenciled with "Baite" and what I have found is that the Baite board is a 2 layer design where the original Leaflabs board was a 4 layer board. This will mess with your ADC low order bit(s) due to noise. However, for the average user, 2^10 vs 2^12 should have little issue between AVR and STM. Just anticipate a more noisy ADC. Additionally, the $4 from Chinese dealers seem to be a manual rework of the Baite board... that is, one can see manual reflow efforts on the uC by a soldering iron. My guess is Baite off-loads those boards to other sellers who correct issues in the initial reflow oven process. However, I have both $4 and $6 boards and other than the rosin on the reworked board, they both function the same.

Here is the caveat: The STM32 Maple core is experimental. There is little to no support for issues you may encounter. While I have received boards from eBay and AliExpress, you should realize that you are dealing with off-shore vendors and hosting companies with varied policies. If you choose to play, remember that play is the objective. If you download and install the ZIP for the Maple core, please keep a copy of the ZIP so that if future core work messes up your code, you can revert back to a core that is working until the new core is validated. Let me repeat, the github source is constantly changing ... sometimes multiple times per day which is especially true over a weekend.

Few libraries from AVR will work as-is with the STM32 board. The effort to "fix" these libraries is akin to what Paul does for gaining compatibility with the Teensy3.x boards or what Arduino does with the Due. As libraries are converted and tested, we put them into the ZIP. As an example, we have the Adafruit_GFX and Adafruit_ILI9341 libraries converted and tested---> that is, they run the Adafruit test sketch. Nothing is exhaustively tested!

Because you must often modify libraries, in my STM32 sketch directory, I am building projects that have all of the supporting modified libraries (those not in \documents\Arduino\libraries) in the sketch directory. This approach fully insulates the modified libraries from other sketches for my 8-bit AVR programs. If you take this approach, then you will need to modify your #include statements from #include <library.h> to the format #include ".\library.h" in all locations where the library is specified: that is, the main sketch and any tabs and in many of the .cpp files.Example:

So as not to mess up my Arduino setup on my Mac I am experimenting with Windows XP in a Parallels Desktop window on the Mac. You can keep images of the XP setup for easy backup.This will just be used for STM32 sketches

Delete all traces of old Arduino in the XP image.Downloaded and install Arduino 1.6.1 for WindowsDownloaded the ZIP of the STM32 files found bottom right on this page

So as not to mess up my Arduino setup on my Mac I am experimenting with Windows XP in a Parallels Desktop window on the Mac.

I noticed that you have a Maple Mini on order. Would the Parallels setup manage the serial port DTR line the same as under native Windows - that is, do you anticipate that the Mini will honor the DTR, create a reset, and enter DFU mode automatically? That would be pretty cool.

On my Windows 8.1 machine, the auto-reset signal works most of the time. When it fails, it is because I am hung-up, or an ASSERT_FAULT has executed!

Parallels (and VMWare) grab the USB serial devices from the Mac (the Mac can't use them at the same time) and in normal use the Mac certainly sets up a complete FTDI rs232 on my Chinese USB to RS232 adapter.

Sorry not sure yet what "honor the DTR, create a reset, and enter DFU mode " means (device firmware update?) but the FTDI chips work fine linked via TTL to my tiny Arduino pro minis - I think DTR tells those to run after a download so I guess that must be a reset?

I guess the free VMWare player might allow you to run XP within Windows 8 - but not sure if the driver signing would stay with you if VMWare simply uses the host drivers.

I was hoping to program the Maple Mini via the UART like I am doing now and so avoid the driver complication.

but the FTDI chips work fine linked via TTL to my tiny Arduino pro minis - I think DTR tells those to run after a download so I guess that must be a reset?

It is my guess that the Maple Mini (Baite version) will work correctly. The reset mechanism just uses the DTR pluse and a capacitor to pulse reset and the bootloader enters DFU. Simple, but generally effective.

I was wrong about Windows use of Macdrivers. My Parallels Win XP asked to load a driver when it saw my Chinese USB to serial. It found one and was happy and serial port 3 appeared in Win Arduino. But it will not yet talk to the board - new errors after compile to sort out.

Most standard libraries used for Arduino will not work unmodified on the STM32 platform. Therefore, rather than modifying them and renaming and adding them to the libraries in the user Arduino\libraries path, I simply keep the edited libraries in my sketch folder.

Therefore, depending on your OS you may need to change some things in my code!

Are you on Windows, Win7 or higher? #include can be written as#include "./filename.h" OR #include ".\filename.h" but under Linux/iOS you most likely can use only "./filename.h"

Anyway - if you have issues with my syntax, just remove the dot-slash and specify the filename as#include "filename.h"and see If that works for you. I can assure you that all of my examples compile, if they do not for you, the mostly fix is to double-check simple configuration;

I will have compiled for Maple Mini Rev2

I use the 64-bit version of Windows 8.1 Pro on an Intel box with 4 Gig RAM

I run as system Administor

I run in "Test Mode"

I will have compiled using Arduino 1.6.1 or 1.6.2 nightly build

I may be using Roger's latest core or I may be behind by a week (or 2)

I often write code while enjoying a cold beer, or two. I am retired and do this for fun but I am not a professional programmer; rather i am an electronic engineer and I have been caught numerous times taking all manner of shortcuts.

I will try to check here once per day... but no promises. Everything to do with STM32 is sub-beta, consider it alpha.

For Mac users I can confirm that Ray's GLCD5110_BMP085 runs - after a few tweaks.Some notes here

As Ray says, all modified supporting files can be stored in the same folder as the main .ino and so you can keep old Arduino files in the libraries folder and not have the STM32 files mess up the Arduino IDE. Very convenient.

#include "filename.h" worked on the Mac

Hey Arduino users! order that fast STM32 ARM board and come and play here!Then consider this page since we are supporting China and not Italy

Read this threadbut comment here, not there, if your C skills are like mine.....

any chance you would make some code for I2C for OLED displays?I'll tried your SPI example and it is working very well , error was because of linux,would like to use bigger display like 1.3" or 2"+ OLED for my maple miniall of the I have are I2C unfortunately

any chance you would make some code for I2C for OLED displays?I'll tried your SPI example and it is working very well , error was because of linux,would like to use bigger display like 1.3" or 2"+ OLED for my maple miniall of the I have are I2C unfortunately

I have also used I2C with the BMP180 and that works well. So, it boils down to the display and library you intend on using.

If an Adafruit library, much of the work is already done since Adafruit uses a common GFX interface and only the display driver has to be updated. If you are proficient, you can use the existing OLED code as a template.

If another author, it is a new effort, but should not be impossible- just a bit more difficult unless one has the exact display for testing.

Ray

Edit:

In general, here is how it all fits together using the SSD1306 as an example. In Adafruit_SSD1306.h you will see the prototypes for the class member functions:

You will notice, that the Adafruit_SSD1306::Adafruit_SSD1306 is common 3 times, but only one can be used: h/w SPI, s/w SPI, or I2C. This methodology is called "overloading":

Quote

An overloaded declaration is a declaration that had been declared with the same name as a previously declared declaration in the same scope, except that both declarations have different arguments and obviously different definition (implementation).

When you call an overloaded function or operator, the compiler determines the most appropriate definition to use by comparing the argument types you used to call the function or operator with the parameter types specified in the definitions. The process of selecting the most appropriate overloaded function or operator is called overload resolution.

Study both my SPI and madias's I2C examples. That should get you a head-start on making necessary changes to existing libraries.