full MapleMini support

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
dpiegdon
Posts: 7
Joined: Fri Jan 09, 2015 4:42 am

full MapleMini support

Post 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.
Attachments
maplemini-port.diff.gz
port improvements and demo-files for maple mini
(13.71 KiB) Downloaded 555 times
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: full MapleMini support

Post 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
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: full MapleMini support

Post 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
dpiegdon
Posts: 7
Joined: Fri Jan 09, 2015 4:42 am

Re: full MapleMini support

Post 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?
Attachments
maplemini-port_v2.diff.gz
(13.78 KiB) Downloaded 566 times
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: full MapleMini support

Post 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
dpiegdon
Posts: 7
Joined: Fri Jan 09, 2015 4:42 am

Re: full MapleMini support

Post by dpiegdon »

ah excellent! lets use them, then.
Attachments
maplemini-port_v3.diff.gz
(13.78 KiB) Downloaded 589 times
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: full MapleMini support

Post 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
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: full MapleMini support

Post by Giovanni »

I haven't committed anything yet, please submit your final code, I will wait.

Giovanni
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: full MapleMini support

Post 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
dpiegdon
Posts: 7
Joined: Fri Jan 09, 2015 4:42 am

Re: full MapleMini support

Post by dpiegdon »

yes, utzigs last comment is correct.
please use v3 with the vendor name in usbcfg.c fixed to LeafLabs.
Post Reply