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

Postby dpiegdon » Fri Jan 09, 2015 4:59 am

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 90 times

utzig
Posts: 355
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: full MapleMini support

Postby utzig » Fri Jan 09, 2015 12:57 pm

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: 13084
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: full MapleMini support

Postby Giovanni » Fri Jan 09, 2015 2:05 pm

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

Postby dpiegdon » Fri Jan 09, 2015 4:17 pm

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 87 times

utzig
Posts: 355
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: full MapleMini support

Postby utzig » Fri Jan 09, 2015 5:13 pm

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

Postby dpiegdon » Fri Jan 09, 2015 5:27 pm

ah excellent! lets use them, then.
Attachments
maplemini-port_v3.diff.gz
(13.78 KiB) Downloaded 102 times

utzig
Posts: 355
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: full MapleMini support

Postby utzig » Fri Jan 09, 2015 5:32 pm

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: 13084
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: full MapleMini support

Postby Giovanni » Fri Jan 09, 2015 8:59 pm

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

Giovanni

utzig
Posts: 355
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 19 times
Contact:

Re: full MapleMini support

Postby utzig » Fri Jan 09, 2015 9:47 pm

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

Postby dpiegdon » Fri Jan 09, 2015 10:18 pm

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


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 2 guests