Problem with Arduino IDE and STM32F103C

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
rsc
Posts: 5
Joined: Thu Oct 06, 2016 12:03 pm

Re: Problem with Arduino IDE and STM32F103C

Post by rsc » Wed Oct 12, 2016 6:30 pm

I can't upload "blink" of examples, it compile but get error

Code: Select all

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
t try to compile dfu-util.c from "tools/linux/src/dfu-util/src" but

Code: Select all

#include <libusb.h> no such file or directory
edit: I use ubuntu 32 bit and USB-serial for upload
thanks

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

Re: Problem with Arduino IDE and STM32F103C

Post by 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

Code: Select all

libusb-dev
libusb-1.0-0-dev
one of them may well be there from installing something else :D

stephen

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

Re: Problem with Arduino IDE and STM32F103C

Post by 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

Code: Select all

libusb-dev
libusb-1.0-0-dev
one of them may well be there from installing something else :D

stephen

rsc
Posts: 5
Joined: Thu Oct 06, 2016 12:03 pm

Re: Problem with Arduino IDE and STM32F103C

Post by 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 :?

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

Re: Problem with Arduino IDE and STM32F103C

Post by 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
Posts: 5
Joined: Thu Oct 06, 2016 12:03 pm

Re: Problem with Arduino IDE and STM32F103C

Post by 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!!

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

Re: Problem with Arduino IDE and STM32F103C

Post by 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
Posts: 67
Joined: Tue Aug 02, 2016 2:26 am

Re: Problem with Arduino IDE and STM32F103C

Post by 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

User avatar
Rintin
Posts: 16
Joined: Sat Jan 23, 2016 11:20 am

Re: Problem with Arduino IDE and STM32F103C

Post by 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.
Does the Arduino IDE run on a raspberry pi?
Where are the instructions on how to compile the Linux binaries?
#legalizeawoo

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

Re: Problem with Arduino IDE and STM32F103C

Post by 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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest