stm32duino core with System Workbench for bluepill

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
Rick Kimball
Posts: 771
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Eclipse importable bluepill

Postby Rick Kimball » Fri Apr 29, 2016 11:42 am

Did you successfully debug with stlink?
-rick

User avatar
Slammer
Posts: 241
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: Eclipse importable bluepill

Postby Slammer » Fri Apr 29, 2016 11:50 am

Yes! I did it... thank you.
I am trying to make the HALMX version now....

User avatar
Rick Kimball
Posts: 771
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Eclipse importable bluepill project

Postby Rick Kimball » Fri Apr 29, 2016 3:06 pm

There is an annoying bug when running eclipse and the AC6 System WorkBench plugin on Ubuntu. The normal way to access the "Properties" dialog to make changes to the C/C++ Builder / Settings is to right click on the project in the Project Explorer. However, when running Ubuntu this will cause a hang for many tens of seconds. In the past, I've had problems with other gtk3 based apps so I tried my time honored env settings to solve the problem. I modified my Eclipse.desktop file like this:

Code: Select all

[Desktop Entry]
Type=Application
Version=0.9.4
Name=Eclipse
Comment=Eclipse Mars 2
Icon=/home/kimballr/opt/eclipse/icon.xpm
Exec=env SWT_GTK3=0 UBUNTU_MENUPROXY=0 /home/kimballr/opt64/eclipse/eclipse -showlocation
Terminal=false
Path=/home/kimballr/
Name[en_US]=Eclipse-Mars2(64bit)


The key env settings that solve the problem are on the "Exec=" line. Note the env SWT_GTK3=0 UBUNTU_MENUPROXY=0. These magic words fix the display issues for Ubuntu. After I had implemented this change, I searched around and found other people had the same problem. You can read more about the problem here: http://blog.vogella.com/2014/02/21/usin ... on-ubunbu/

-rick
-rick

zmemw16
Posts: 1097
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Eclipse importable bluepill project

Postby zmemw16 » Sat Apr 30, 2016 12:06 am

@rick
any recommendation on following the 'updates are available' pop-up?

i was seeing a message related to MaxPermSize as an unrecognized switch, eclipse.ini was modified deleting lines with XXMaxPermSize and the following line for each.

could you detail anywhere string *kimbal* needs to be edited away? i'm a stephen :D
in openocd path as well???

i use a modified 1.6.5r5 where it's dot dir is arduino165r5, similar for 1.78 etc etc
i ended up using a soft link to my arduino installed arm files and adding ~/stephen/arm to the path in eclipse.
i'm wondering will happen after the updates have installed?

i'm playing with nRF24's at the moment, adding in their includes as a see what happens, yields 'not found' messages.
where/how would i add local user libraries? is there a search path to be amended as well?
the libraries entry under the project lists the standard arduino_stm32 ones.

any tips on how i'd use a maple mini in this setup?
i suppose that using a bluepill programmed as a bmp might prove to be interesting?

you mentioned doing a write up somewhen? yes please.

stephen

User avatar
Rick Kimball
Posts: 771
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Eclipse importable bluepill project

Postby Rick Kimball » Sat Apr 30, 2016 4:34 am

zmemw16 wrote:any recommendation on following the 'updates are available' pop-up?

I always do the update, otherwise it keeps niggling me. Easier to just go along. With the AC6 stuff, it is probably a good thing to do. They seem to update it fairly frequently.

zmemw16 wrote:could you detail anywhere string *kimbal* needs to be edited away? i'm a stephen :D
in openocd path as well???

I thought I eliminated all references to my machine setup.

zmemw16 wrote:i ended up using a soft link to my arduino installed arm files and adding ~/stephen/arm to the path in eclipse.
i'm wondering will happen after the updates have installed?

The openocd path should come from the ac6 directory all the gcc toolchain should come from ${HOME}/.arduino15/.../arm-none-eabi-*

I made the assumption that your Eclipse.desktop file is configured to use your $HOME directory as the working directory. In the Eclipse Project Explorer, if you right click on the bluepill project icon and select "Properties" then navigate to the C/C++ Build/Settings section and then click on the "Tool Settings" tab, you should see where I set the "MCU Settings" Path entry to .arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin . You shouldn't have to set the path any place, it should just work.

zmemw16 wrote:i'm playing with nRF24's at the moment, adding in their includes as a see what happens, yields 'not found' messages.
where/how would i add local user libraries? is there a search path to be amended as well?
the libraries entry under the project lists the standard arduino_stm32 ones.

I need to write up how to do this properly. However if you right click on the .ino files, you can setup include paths per file and add the things you need.

Here is a picture till I write something:
includes.gif
includes.gif (108.17 KiB) Viewed 558 times

I added an entry for ${ProjDirPath}/src/local directory. The other includes are set at the project level so I didn't have to add them. I also included Arduino.h and SPI.h automatically in the c settings not the source code. Doing it this way, the code looks like a normal .ino file however you are explicitly selecting which files are actually used. I see myself copying library .h and .cpp files into ${ProjDirPath}/src/local. For this screenshot I was just using SPI so there is a src/tool/local/SPI.cpp and SPI.h in the directory.

The other way to do this would be set it at the project level and not fuss with each file. However, for the .ino files I wanted to automatically include the Arduino.h, so I was in there editing anyways. The other way to access properties is click on the project icon in the Project Explorer Window and press ALT+Enter
includes1.gif
includes1.gif (68.46 KiB) Viewed 554 times


zmemw16 wrote:any tips on how i'd use a maple mini in this setup?


You would need to go into the C++ Settings and change a few defines and include paths.

-rick
Last edited by Rick Kimball on Sat Apr 30, 2016 8:39 pm, edited 1 time in total.
-rick

zmemw16
Posts: 1097
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Eclipse importable bluepill project

Postby zmemw16 » Sat Apr 30, 2016 6:44 pm

i think i need another laptop for screen space! i'm either talking myself into or out of acquiring another, trouble is the price difference between a 'decent' i3 and not quite so decent i5 ain't a lot. now chuck in 8gb and 1tb hard disk.

ok i'll go off and firtle a bit with this ... ... ...

stephen

User avatar
Rick Kimball
Posts: 771
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Eclipse importable bluepill project

Postby Rick Kimball » Sat Apr 30, 2016 9:05 pm

Here is a good overview slideshow of the basics of how to create a project and debug with System Workbench:

http://www.stm32.eu/sites/default/files ... ench_0.pdf

-rick
-rick

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

Re: Eclipse importable bluepill project

Postby stevestrong » Sun Oct 02, 2016 5:00 pm

I decided to setup a project which enables debugging, and which allows me to build with or without Arduino IDE.
For this, I read about eclipse and I though I will try it out.

Well, it is not that simple because I am working on a Win10 computer.

First, I read about the Eclipse plugin for Arduino. After several unsuccessful tries and errors (two days of pain..) I wanted to give a try to Rick's project.

@Rick,
After I import the project and adapted the PATH variable to find the "make.exe" now I get the error message:
"make: no rule to make the target".
Which path should I include now?

User avatar
Rick Kimball
Posts: 771
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Eclipse importable bluepill project

Postby Rick Kimball » Sun Oct 02, 2016 5:41 pm

I can't say on windows, sorry.
-rick

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

Re: Eclipse importable bluepill project

Postby RogerClark » Sun Oct 02, 2016 9:20 pm

Steve

You could load linux in a VM.

I know that means doing another install and setup of Eclipse, which can be a pain, but the VM installation of Linux would be simple and quite quick


Return to “IDE's”

Who is online

Users browsing this forum: No registered users and 2 guests