Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for maple mini #22

Closed
maxpowel opened this issue Nov 9, 2016 · 6 comments
Closed

Support for maple mini #22

maxpowel opened this issue Nov 9, 2016 · 6 comments

Comments

@maxpowel
Copy link

maxpowel commented Nov 9, 2016

Hi, I'm wondering if it's viable to add mapple mini to the supported devices list. Using the arduino ide and arduino stm32 it's possible but I don't know how hard would be to do the same with platformio.

Thank you

@ivankravets
Copy link
Member

@ubis what should be done on our side?

Thanks!

@ubis
Copy link
Contributor

ubis commented Nov 18, 2016

I did a quick look at: https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/master/STM32F1/boards.txt and seems like that board config maple_mini.json should be created:

{ "build": { "core": "maple", "cpu": "cortex-m3", "extra_flags": "-DMCU_STM32F103CB", "f_cpu": "72000000L", "hwids": [ ["0x1EAF", "0x0003"], ["0x1EAF", "0x0004"] ], "ldscript": "flash.ld", "mcu": "stm32f103cb_maple_mini", "variant": "maple_mini" }, "frameworks": ["arduino"], "name": "Maple Mini (17k RAM, 108k Flash)", "upload": { "disable_flushing": false, "maximum_ram_size": 17408, "maximum_size": 110592, "protocol": "dfu", "boot_version": 1, "require_upload_port": true, "use_1200bps_touch": false, "wait_for_upload_port": false }, "url": "http://www.leaflabs.com/maple/", "vendor": "Leaflabs" }

or http://pastebin.com/mZRkRzPP (if above code indentation will be messed up).

Would be nice, if @maxpowel add this and test if it works. Also, maple_mini as maple, can use bootloader 1.0 or 2.0. When I did a quick look in arduino.py, i've noticed 87 line:

if "stm32f103rb_maple" in board.get("build.mcu", ""):

This line is used to check if it's maple board, similar check should be done for maple_mini aswell.
Sorry, I can't do anything much more, i'm busy with studies & other stuff.

@maxpowel
Copy link
Author

maxpowel commented Nov 19, 2016

@ubis that worked perfectly, thank you!
But as you said, there are bootloader v1 and v2. If you upload a sketch selecting the invalid bootloader you will have to use stlink and erase the flash.
You created the version for bootlader v1 (the original) but for version v2 the changes are just the name and version bootloader:

{
"build": {
"core": "maple",
"cpu": "cortex-m3",
"extra_flags": "-DMCU_STM32F103CB",
"f_cpu": "72000000L",
"hwids": [
["0x1EAF", "0x0003"],
["0x1EAF", "0x0004"]
],
"ldscript": "flash.ld",
"mcu": "stm32f103cb_maple_mini",
"variant": "maple_mini"
},
"frameworks": ["arduino"],
"name": "Maple Mini Bootloader 2 (20k RAM, 120k Flash)",
"upload": {
"disable_flushing": false,
"maximum_ram_size": 17408,
"maximum_size": 110592,
"protocol": "dfu",
"boot_version": 2,
"require_upload_port": true,
"use_1200bps_touch": false,
"wait_for_upload_port": false
},
"url": "http://www.leaflabs.com/maple/",
"vendor": "Leaflabs"
}

http://pastebin.com/4AqyhE4H

I created maple_mini_v2.json and the IDE looks like:

screenshot_20161119_163650

So cool!

@ivankravets
Copy link
Member

Thanks @ubis and @maxpowel

@maxpowel
Copy link
Author

Should I create a pull request with this changes?

@ivankravets
Copy link
Member

@maxpowel I've already added all confgis and updated buidl script. See 58858da

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants