Page 1 of 2

full MapleMini support

Posted: Fri Jan 09, 2015 4:59 am
by dpiegdon
Hi!

I spent a little bit of time to improve the support for the MapleMini and its bootloader (STM32F103xE).
Also I created a demo for the board, including a blinker-thread and a full serial/usb shell, similar to many of the other examples.
The attached file should apply to the current trunk of chibios.

Re: full MapleMini support

Posted: Fri Jan 09, 2015 12:57 pm
by utzig
Some suggestions:

  • Your board.h uses tabs in your defined GPIO pins. Standard is to use spaces.
  • Copyright lines with "Copyright (C) 2006-2014 Giovanni Di Sirio" could probably be updated to "Copyright (C) 2006-2015 Giovanni Di Sirio"
  • CDC manufacturer string (vcom_string1) should probably be changed from "STMicroelectronics" to "LeafLabs". Just for convetion...

This looks good to be applied upstream IMO!

Cheers,
Fabio Utzig

Re: full MapleMini support

Posted: Fri Jan 09, 2015 2:05 pm
by Giovanni
I will apply it and remove tabs.

The code will soon go through a mass re-licensing so no problems there (I have a tool for that).

Thanks for the patch.

Giovanni

Re: full MapleMini support

Posted: Fri Jan 09, 2015 4:17 pm
by dpiegdon
hi,
2015... yeah you are right, i forgot :-)...
i fixed the mentioned points, please find the new patch attached.

What I don't like about it - maybe you can help here - this uses the STM32F407 usb vendor/product IDs:

Bus 002 Device 019: ID 0483:5740 STMicroelectronics STM32F407

Now i know that vendor/product IDs are expensive to obtain, but i've been using the maplemini just for a few days and maybe they have one allocated and you know about it?

Re: full MapleMini support

Posted: Fri Jan 09, 2015 5:13 pm
by utzig
Yeah, it looks like they have their own IDs:

Code: Select all

#define LEAFLABS_ID_VENDOR                0x1EAF
#define MAPLE_ID_PRODUCT                  0x0004


https://github.com/leaflabs/libmaple/blob/master/libmaple/usb/stm32f1/usb_cdcacm.c#L89

Cheers

Re: full MapleMini support

Posted: Fri Jan 09, 2015 5:27 pm
by dpiegdon
ah excellent! lets use them, then.

Re: full MapleMini support

Posted: Fri Jan 09, 2015 5:32 pm
by utzig
Since Giovanni already signaled he will commit the original patch I would suggest that you send your changes as extra patches over HEAD when the original or v2 patches are applied.

Cheers

Re: full MapleMini support

Posted: Fri Jan 09, 2015 8:59 pm
by Giovanni
I haven't committed anything yet, please submit your final code, I will wait.

Giovanni

Re: full MapleMini support

Posted: Fri Jan 09, 2015 9:47 pm
by utzig
Giovanni,

His last patch (v3) has everything in it. I would just suggest fixing the comment on line 36 of usbcfg.c from:

Code: Select all

0x1eaf,        /* idVendor (ST).                   */


to:

Code: Select all

0x1eaf,        /* idVendor (LeafLabs).                   */


Cheers

Re: full MapleMini support

Posted: Fri Jan 09, 2015 10:18 pm
by dpiegdon
yes, utzigs last comment is correct.
please use v3 with the vendor name in usbcfg.c fixed to LeafLabs.