Getting started on OSX?

Apple Mac OSX
User avatar
mrburnette
Posts: 1888
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Getting started on OSX?

Post by mrburnette » Tue Jun 16, 2015 11:15 pm

anthonyjclarke wrote:Thanks, lots to try later...

To answer some questions, using latest OSX

When I power up Maple Mini the LED does flash slowly, would that be Blink, or is that a Status LED?

I see no serial ports at all.....

Will revert later.... Thanks!
The LED flashes 10 seconds in bootloader mode. If it flashes afterward, the vendor put in the blink sketch.

Quick ref: viewtopic.php?f=27&t=68 the other serial ports are shown (&below)

"Serial" on the mini is the USB. The OS will enumerate a comm port- see the OSX installation:
https://github.com/rogerclarkmelbourne/ ... /Apple-OSX


The Maple Mini has three serial ports (also known as USARTs). They communicate using the pins given in the following table. Serial Port..... TX ..... RX ..... CK ........ CTS ..... RTS Serial1 ....... D26 ..... D25 .....D27 ..... D24 ..... D23 Serial2 ....... D9 ....... D8 ....... D7 ....... D11 ..... D10 Serial3 ....... D1 ....... D0 ....... D31 ..... D30 ..... D29
Last edited by mrburnette on Tue Jun 16, 2015 11:45 pm, edited 3 times in total.

User avatar
anthonyjclarke
Posts: 12
Joined: Tue Jun 16, 2015 8:44 pm

Re: Getting started on OSX?

Post by anthonyjclarke » Tue Jun 16, 2015 11:31 pm

Thanks Mr B....

I did the DFU Install as per : https://github.com/rogerclarkmelbourne/ ... stallation

"Install DFU Utils. The easiest way to do this is to use Homebrew http://brew.sh/ - see the bottom of the Homebrew page.

Then type "brew install dfu-util" in the terminal window to install"

I see "Serial"... But no tty.usbModemxxxxx (where xxxxx seems to vary)

User avatar
mrburnette
Posts: 1888
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Getting started on OSX?

Post by mrburnette » Tue Jun 16, 2015 11:49 pm

anthonyjclarke wrote: ...
I see "Serial"... But no tty.usbModemxxxxx (where xxxxx seems to vary)

You must Program it once!
viewtopic.php?f=21&t=257&p=2957&hilit=Osx#p2957

The virtual USB s/w is uploaded with every sketch.

Ray

User avatar
RogerClark
Posts: 7482
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started on OSX?

Post by RogerClark » Tue Jun 16, 2015 11:55 pm

Its hard to say if its running blink or if the bootloader is waiting for upload.

I think its more likely just to be the bootloader, as the clone Maple mini boards don't always have blink installed because the vendors don't want the bother of installing blink as well as installing the bootloader.

BTW.

When you get it working, you should probably re-flash the bootloader. The ones that the cloned maple minis come with is the original bootloader written in 2012 by leaflabs

We have recently re-worked the bootloader and uploads are now substantially faster on OSX (and Linux), and you also gain 12k of Flash and 3k of RAM, as the stm32duino-bootloader is compiled with optimisations that the original one wasn't.

User avatar
sheepdoll
Posts: 238
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: Getting started on OSX?

Post by sheepdoll » Wed Jun 17, 2015 12:03 am

I already had a macports installation on my machine(s). Works well with the STLink. I have not attempted to do a DFU load yet. One note if installing DFU and other tools that use LIBUSB with macports they use a different path than brew does. I just made a symbolic link.

User avatar
RogerClark
Posts: 7482
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started on OSX?

Post by RogerClark » Wed Jun 17, 2015 12:05 am

I'm tempted just to copy the osx dfu binaries into the tools/macosx as this may be a lot easier for people than needing to install homebrew and then install dfu-util, but I'm not sure if homebrew changes any rules etc that allow dfu-util to run. I'd need to experiment on a mac that I've not installed dfu-util already

User avatar
RogerClark
Posts: 7482
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started on OSX?

Post by RogerClark » Wed Jun 17, 2015 12:14 am

I just opened a brand new Maple mini (clone) and it seems to have blink installed and I can see the Maple USB serial device (on Windows)

If the flash is on for 1 sec off for 1 sec is likely to be blink.

If its on for 1/2 sec off for 1/2 sec is probably the bootloader saying its got nothing to run. In which case you won't have a serial device.
So just upload an empty sketch, and you should then see a serial device (name seem to vary)

User avatar
anthonyjclarke
Posts: 12
Joined: Tue Jun 16, 2015 8:44 pm

Re: Getting started on OSX?

Post by anthonyjclarke » Wed Jun 17, 2015 7:01 am

So appreciate all the help here... will respond fully after some "quiet time at home" to play (test!)....

In meantime, this is what I see when I plug in.... (somebody here might notice what I am trying to build!)

http://youtu.be/E5g2F-TaU78

Thanks!

User avatar
RogerClark
Posts: 7482
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started on OSX?

Post by RogerClark » Wed Jun 17, 2015 7:14 am

Anthony

The flash rate looks like its in DFU upload mode, i.e blink has not been installed.

So just ignore that you cant see the maple usb serial device (it won't be running as its stuck in the bootloader, as there is no valid code for the bootloader to run

The bootloader checks the program start address (0x8005000 on your maple with the old bootloader ), and if it can't find a valid stack pointer address in the first 4 bytes, it stays waiting for DFU upload.

Re: The display you are using.

I have one of those, but have not tested it. From what I recall @madias has used that display.
I think you may be using Ray's example code sorry I cant remember who has written which lib and which example code

But, I think there is a strong chance you will get this to work fairly easily

User avatar
Kenjutsu
Posts: 134
Joined: Fri May 29, 2015 8:26 am

Re: Getting started on OSX?

Post by Kenjutsu » Thu Jun 18, 2015 6:22 pm

Today I got my "5PCS/LOT leaflabs Leaf maple mini ARM STM32 compatibility" from AliExpress. I plugged one into my Mac, and it was also not recognised/assigned a serial port, and it seems as if it is in perpetual bootloader mode, but, following the instructions here, I uploaded the Blink example, and it now has its own serial port (/dev/tty.usbmodemfa1331).

Tomorrow I will solder the header pins, and try the new bootloader 8-)
Pieter

OSX: 10.12.6
Arduino IDE: 1.6.12
Blue pill STM32F103C8T6 Dev Board
Maple Mini Clones

Post Reply