[SOLVED] STM32 in Sublime 3 & multiple libs

Working libraries, libraries being ported and related hardware
Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

[SOLVED] STM32 in Sublime 3 & multiple libs

Post by Pararera » Fri Oct 05, 2018 4:05 pm

I installed STM32 package (STM32F1xx/GD32Fxx by stm32duino) from Boards Manager in Arduino IDE. Then I copied package from %appdata% into main Arduino folder in C:\ so I can use package in Sublime 3(Stino Sublime Package). Sublime found STM32 package and I can set board and board options. But problem is error I get while compaling code.

Code: Select all

[  1%] Creating C:\Users\silvi\AppData\Local\Temp\Stino_build\Sheme\Sheme.ino.cpp.o...
'"arm-none-eabi-g++"' is not recognized as an internal or external command,
operable program or batch file.
So I'm not sure how to fix this error. In Arduino IDE I can compile the code but I get error

Code: Select all

Multiple libraries were found for "Wire.h"
 Used: C:\Users\xxxx\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2018.9.24\libraries\Wire
 Not used: C:\Users\xxxx\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2018.9.24\libraries\WireSlave_old 
I renamed folder WireSlave to WireSlave_old but I still get this error and I'm not sure what I should do to fix error. I need IIC bus because my OLED display uses it(Adafruit GFX lib).
I hope that some solution exists so I can use IIC and Sublime 3 to program my STM32 board. Thanks!

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

Re: STM32 in Sublime 3 & multiple libs

Post by mrburnette » Fri Oct 05, 2018 7:27 pm

What core are you using, exact link, there are 3+ cores out in github-land.

I will not answer Sublime questions. Get blink or some canned example running under current ArduiniIDE. You are on your own with Sublime, however there are a few other users that have documented issues/fixes for alternate IDE's.
Available cores

1. The current STM32F1/F4 core files (Leaflabs-based core) for the latest version of ArduinoIDE for clone boards
https://github.com/rogerclarkmelbourne/Arduino_STM32
- The original documentation from Leaflabs ... the Maple commercial project that lasted only a few years
http://docs.leaflabs.com/docs.leaflabs.com/index.html
- WiKi resources
https://github.com/rogerclarkmelbourne/ ... STM32/wiki and
http://stm32duinoforum.com/forum/index.php?title=Main_Page

2. The current STM32 core files for STM32 based boards (official STM core, HAL based)
https://github.com/stm32duino/Arduino_Core_STM32
- Please address all hardware or core questions for Nucleo boards in this sub-forum: http://stm32duinoforum.com/forum/viewforum.php?f=29

3. An alternative generic core: *OUTDATED not under development anymore * edited: 23.08.2013
https://github.com/danieleff/STM32GENERIC

Note:
- do not forget that when you install the core per the online instructions, you will get many examples. I expect you to review examples and hopefully even bring them up and play a bit. Understanding example code can go a long way to help you acclimate to the STM32duino way of doing things. We do try and keep ourselves "arduino-centric" but sometimes it is necessary to deviate or invent new ways to use functions within the 32-bit ARM architecture that just does not exist in the 8-bit Arduino introductory world.

Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

Re: STM32 in Sublime 3 & multiple libs

Post by Pararera » Fri Oct 05, 2018 7:48 pm

I'm not sure. I just installed from board manager. F103C is set witnin board menu.

I think I should add path to arm-none-eabi-g. I'll fix it somehow

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

Re: STM32 in Sublime 3 & multiple libs

Post by mrburnette » Fri Oct 05, 2018 8:44 pm

STOP.

If you do not know what core you have... then what STM32 board do you have?
Pararera wrote:
Fri Oct 05, 2018 4:03 pm
Hi guys,
just bought STM32 generic bord for my Onboard Computer for bicycle project.
I'm from Croatia and 19 yo
Generic ... like this http://stm32duinoforum.com/forum/index.php?title=Blue_Pill ???

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

Re: STM32 in Sublime 3 & multiple libs

Post by RogerClark » Fri Oct 05, 2018 9:01 pm

Just tell us what line you added to the preferences I.e the link to the JSON file.

I suspect that’s it’s the LibMaple Core or STM32 GENERIC if the Arm compiler was not installed

Also

Since all cores are originally stored in GitHub , you could have been better off manually installing by downloading or cloning from github

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

Re: STM32 in Sublime 3 & multiple libs

Post by RogerClark » Fri Oct 05, 2018 9:03 pm

One other note.

ALL the cores are only designed to run on the Arduino IDE.

There are thousands of differnt text editors and programming environments and IDEs etc, so it’s impossible to support anything other than the official Arduino IDE.

Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

Re: STM32 in Sublime 3 & multiple libs

Post by Pararera » Fri Oct 05, 2018 11:53 pm

I fixed problem with Sublime(just added path to compiler). Now it Works but I have problem with libs(Wire.h exactly). It says

Code: Select all

fatal error: Wire.h: No such file or directory
So I guess that the problem is again in Sublime because Arduino IDE says

Code: Select all

Multiple libraries were found for "Wire.h"
And I use generic "Blue Pill" STM32F103C board.
Link is http://dan.drown.org/stm32duino/package ... index.json

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

Re: STM32 in Sublime 3 & multiple libs

Post by RogerClark » Sat Oct 06, 2018 1:14 am

What you are using is DDrown's board manager files for the LibMaple core

https://github.com/rogerclarkmelbourne/arduino_stm32

I'm not sure if anyone is else is using Sublime, so you are likely to be on your own getting this to work.

Pararera
Posts: 16
Joined: Fri Oct 05, 2018 3:55 pm

Re: STM32 in Sublime 3 & multiple libs

Post by Pararera » Sat Oct 06, 2018 9:46 am

I'll try with that link.
I hope it will solve problem with multiple libs in ArduinoIDE so I can compile code.

stevestrong
Posts: 3053
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: STM32 in Sublime 3 & multiple libs

Post by stevestrong » Sat Oct 06, 2018 9:57 am

That is just a warning/info regarding the multiple libraries, and is caused by your action to rename the old one.
Remove the old one entirely from that directory, or zip and delete the dir.
Compile should be anyway successful, unless you have other errors.

Post Reply