Problem with Arduino IDE and STM32F103C

rsc
Mon Oct 10, 2016 2:50 am
Hi all! I’m new with STM32(I come from pic micro’s) after follow the steps for installing stm32 in arduino IDE on linux, I can’t compile on board “Generic STM32F103C”
the output compiler is
fork/exec /bin/arm-none-eabi-g++: no such file or directory

Rick Kimball
Mon Oct 10, 2016 4:33 am
https://github.com/rogerclarkmelbourne/ … on#all-oss

Step 2:

“Run the IDE, and on the Tools menu, select the Boards manager, and install the Arduino Zero from the list of available boards. You must do this step, it installs the arm-none-eabi-g++ toolchain!”


rsc
Mon Oct 10, 2016 2:23 pm
now is working! thanks, I’ve forgotten step 2

RogerClark
Mon Oct 10, 2016 9:24 pm
I added a specific FAQ for this, as its cropped up 2 or 3 times recently.

( Not that anyone reads the FAQ either ;-)


edogaldo
Tue Oct 11, 2016 8:55 am
RogerClark wrote:I added a specific FAQ for this, as its cropped up 2 or 3 times recently.

( Not that anyone reads the FAQ either ;-)


RogerClark
Tue Oct 11, 2016 8:58 am
I changed the title to “Welcome and FAQs”

stevestrong
Tue Oct 11, 2016 9:08 am
+1 for putting the FAQ on wiki, gihub or wiki.stm32duino.

RogerClark
Tue Oct 11, 2016 9:58 am
Steve

Please feel free to copy and paste it in ;-)

I can change the existing forum page to reference the wiki page


edogaldo
Tue Oct 11, 2016 10:06 am
A couple of suggestions about the wiki:

  • I think it would deserve better visibility within the forum
  • Would it be possible to improve the Navigation experience within the sidebar? At the moment there is only a link to the start page and a bunch of “technical” links not very friendly for content navigation..

RogerClark
Tue Oct 11, 2016 10:36 am
The Wiki uses MediaWiki (same as Wikipedia), so I can install any standard Mediawiki plugin.

So please let me know if you have any specific suggestions and have a link about how to implement etc.

Note. I find with Mediwiki that it does not have a good UI to make configuration changes, most changes are by editing PHP files e.g. localsettings.php , and by copying plugin’s into folders etc


rsc
Wed Oct 12, 2016 6:30 pm
I can’t upload “blink” of examples, it compile but get error
etRTS(): TIOCMSET: Broken pipe
Failed to open serial device.

/home/rsc/aa/arduino-1.6.12/hardware/Arduino_STM32/tools/linux/maple_upload: líne 40: /home/rsc/aa/arduino-1.6.12/hardware/Arduino_STM32/tools/linux/dfu-util/dfu-util: cannot execute binary file: Incorrect executable format


zmemw16
Wed Oct 12, 2016 6:43 pm
from your directory names and slashes, i suspect you’re running a linux

messages about include files usually mean you’ll need to install the dev files.
for this one under Debian at least; are these
libusb-dev
libusb-1.0-0-dev


zmemw16
Wed Oct 12, 2016 7:15 pm
from your directory names and slashes, i suspect you’re running a linux
that’s the cause of your first issue, 32bits or 64bits. executables of the wrong bits give that message
i’ve just checked my download Arduino_STM32-011016-1730.zip, both sets of dfu files are the same size
and all are 64bit format. :(

it’s back again, both linux and linux64 are compiled for 64bit
i had this problem about this time last year. it was most frustrating :P
seems it’s supplied from a 64bit system; it was suggested a virtualbox 32bit linux install could be used to produce them.

if you are 32bit, it’s an easy enough recompile, you’ll need the relevant support files.

if you contemplate moving to 64bit its not that difficult, one essential is having a separate home partition.
you will also need the files to allow 32bit executables.
debian jessie 8.x 64bit is definitely recommended :D

messages about include files usually mean you’ll need to install the dev files.
for this one under Debian at least; are these
libusb-dev
libusb-1.0-0-dev


rsc
Wed Oct 12, 2016 7:19 pm
yes I have installed libusb but I think the problem is in dfu-util
building build_dfu-util.sh in “tools/linux/src” began well but at last, get this error

make[2]:It exits the directory «/home/rsc/aa/arduino-1.6.12/hardware/Arduino_STM32/tools/linux/src/dfu-util»
make[1]:It exits the directory «/home/rsc/aa/arduino-1.6.12/hardware/Arduino_STM32/tools/linux/src/dfu-util»
cp:You can not create regular file«../../linux/dfu-util»: No such file or directory
cp:You can not create regular file«../../linux/dfu-util»: No such file or directory
cp:You can not create regular file«../../linux/dfu-util»: No such file or directory

then I think the binaries created not successfully
I use the next commands
chmod +X build_dfu-util.sh
./build_dfu-util.sh

regards :?


RogerClark
Wed Oct 12, 2016 8:00 pm
arrgghhh

This keeps cropping up.

I originally compiled for 32 bit, as my 64 bit system seemed able to run 32 binaries.

But then I found that not all 64 bit distros will run 32 bit binaries by default.

I though the binaries where then compiled separately, so that there were both sets, but I found the Arduino IDE does not have any built in system to differentiate between 32 and 64 bit Linuxes.

So the only way to do his would be to have a wrapper script for each upload method script which detected the architecture and ran the appropriate sub script or binary.
But as virtually no one still seems to use 32 bit linux, There was little interest in the community in writing all these scripts.
Hence the current situation.

So…

As a stopgap, perhaps we should rename the linux folders to linux and linux32.
Leave the 64 bit bins where they are, and if someone can compile 32 bit bins, I will stick them in the linux32 folder.

But by default the linux32 folder would not be used. People would have to copy the files to the linux folder if that are still on an old 32 bit system


rsc
Wed Oct 12, 2016 10:27 pm
so… use windows :mrgreen:
now stm32 is working :lol: 8-) what’s the LED pin? PC13 or 13? anyway not blink, but serial port is running
thanks!!

RogerClark
Wed Oct 12, 2016 10:42 pm
Pin number is partially dependant on which board you select

If you don’t use the official name, e.g. PC13 and just use 13, the code just references PIN_MAP[13] which is not necessarily PC13, e.g. the Maple and Maple mini have a totally different pin mapping where the pin numbers printed on the silkscreen of the board don’t map in a logical way to the Port / Pin number of the STM32

Where possible I’d advise people to use the official style name e.g. PC13, but I know this is difficult on the Maple mini because that’s not whats written on it.


keypunch
Tue Oct 25, 2016 10:19 am
I was reading this posting before I was going to post a “Does anyone know” type question that does not apply to this OP. It was mentioned not many use 32 bit Linux. Some of us do for specific purposes and in some ways dovetails *rduion type boards. I often use thin clients for specific tasks that do not distract from or would be distracted from what I do on the other main systems I have. I can get into some challenging OS things that can stall otehr projects big time. Weeks at time actually.

Does one have to have a “board” and/or specific to the binaries to compile the 32 bit binaries, or just install the cross compiler on a system and compile? If latter I would be willing to take a crack at doing some compiles. If I am successful, then I could compile binaries in an order that makes sense on frequency of use until all are done. I may even be able to automate the process with the bias I have to automating to make rebuilds of all sorts of matters easy.

Regards,

John L. Males
Toronto, Ontario
Canada
25 October 2016 06:20


Rintin
Tue Oct 25, 2016 7:56 pm
RogerClark wrote:arrgghhh

This keeps cropping up.

I originally compiled for 32 bit, as my 64 bit system seemed able to run 32 binaries.


RogerClark
Tue Oct 25, 2016 8:10 pm
You need to post questions about the Arduino IDE to Arduino.cc, as this software product is produced by the Arduino organisation.

But, last time I looked on Arduino.cc’s website, I think it said there was experimental RPi support.
However I have no idea whether it extends to all boards e.g. whether the ARM boards are supported.

Additionally, we do not have RPi tools binaries, so if you want to try the experimental RPi Arduino IDE you would need to recompile the Linux tools binaries as well.
We use tools from other projects e.g. DFU-Util, which may or may not compile or work on RPi, so you would need to contact members of those projects if the external tools dont compile or run on RPi


Leave a Reply

Your email address will not be published. Required fields are marked *