DELETE ME PLS rebuilt dfu-util for 32bit linux system

zmemw16
Thu Nov 19, 2015 12:14 am
did a bit more exploring, sorted
you may want to mention somewhere having to rebuild dfu-util to suit the system, 32bit or 64bit
maybe add a call to the dfu-util-build script to the install script

oh the gcc uploadmaple should be upload_maple
after seeing an usb maple post, thought i’d try it out; got this

sketchbook/hardware/Arduino_STM32/tools/linux/maple_upload: line 40: /home/stephen/sketchbook/hardware/Arduino_STM32/tools/linux/dfu-util/dfu-util: cannot execute binary file: Exec format error
stephen@i7:~$ file sketchbook/hardware/Arduino_STM32/tools/linux/dfu-util/dfu-util
sketchbook/hardware/Arduino_STM32/tools/linux/dfu-util/dfu-util: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=c58354ce3ca661a39bc97aacb5beffa73cf5dfb3, not stripped


mrburnette
Thu Nov 19, 2015 1:17 am
zmemw16 wrote:
<…>
you may want to mention somewhere having to rebuild dfu-util to suit the system, 32bit or 64bit
maybe add a call to the dfu-util-build script to the install script

<…>

now as i’m only 32bit…. x86-64 is not right

my hardware dir has it linked to Arduino_STM32-081115-1930 which is when i downloaded the master tree

stephen


RogerClark
Thu Nov 19, 2015 3:51 am
All the Linux tools binaries are compiled for Linux x32. This is because AFIK, Linux x64 will run x32 bins without any problems

I’ve not had any bug report about the Linux tools binaries problems


zmemw16
Thu Nov 19, 2015 4:11 pm
the point i was attempting to make was that the dfu-util executable was a 64bit version in the linux directory of the zip i pulled and
that i needed to rebuild it for 32bit
so i did.
subsequently i thought adding a call to compile it for the platform in the install script might be a good idea.
unfortunately i don’t know if the gcc packages to build it are installed by default in every linux based distro or in other secondary OS’s :D

i’ve just extracted the dfu-util from the zip file again and it is 64bit giving
bash: ./dfu-util: cannot execute binary file: Exec format error


RogerClark
Thu Nov 19, 2015 8:30 pm
umm

Thats odd

I intended for all binares to be 32 bit

I will double check how 64 bit version could have crept in


zmemw16
Sun Nov 22, 2015 4:23 pm
master branch as of 201115-1325
stephen@i7:~/sketchbook/hardware/Arduino_STM32/tools/linux/dfu-util$ ./dfu-util
bash: ./dfu-util: cannot execute binary file: Exec format error
stephen@i7:~/sketchbook/hardware/Arduino_STM32/tools/linux/dfu-util$

stephen@i7:~/sketchbook/hardware$ ls -l ~/sketchbook
lrwxrwxrwx 1 stephen stephen 17 Nov 9 17:04 /home/stephen/sketchbook -> sketchbook_stm32/
stephen@i7:~/sketchbook/hardware$ ls -l ~/sketchbook/hardware/
total 0
lrwxrwxrwx 1 stephen stephen 32 Nov 22 15:45 Arduino_STM32 -> ../../Arduino_STM32-201115-1325/

stephen@i7:~/sketchbook/hardware/Arduino_STM32/tools/src$ ./build_dfu-util.sh


RogerClark
Sun Nov 22, 2015 7:58 pm
We don’t store any files in the Arduino15 folder. Only Boards Manager installed boards go in that folder

Just4Fun
Wed Jan 13, 2016 2:46 pm
Same problem for me trying to use Arduino IDE + STM32 on linux (Kubuntu 14.04 32bit)…

Here is the steps I made to make things running, from the “hardware/Arduino_STM32-master/tools/src/dfu-util/” dir:

sudo apt-get build-dep dfu-util
./autogen.sh
./configure
make

now copy dfu-prefix, dfu-suffix and dfu-util from “hardware/Arduino_STM32-master/tools/src/dfu-util/src/”
to “hardware/Arduino_STM32-master/tools/linux/dfu-util/” and overwrite the old ones.

Now I can upload with autoreset on my “maple-mini” compatible board… :mrgreen:

Cheers

UPDATE

after close and reopen Arduino IDE again I’ve this error:
Sketch uses 11,324 bytes (9%) of program storage space. Maximum is 122,880 bytes.
Global variables use 2,560 bytes of dynamic memory.
Failed to open serial device.
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: No DFU capable USB device available

dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to [email protected]


zmemw16
Wed Jan 13, 2016 3:07 pm
my sanity is returning and paranoia receding, i’m not the only one.

my solution was to copy a working tools dir tree from a previous versions zip file.

stephen


RogerClark
Wed Jan 13, 2016 10:43 pm
Hey guys

I’m a bit confuses about the tread title. It sounds like someone wanted the tread to be deleted but it now looks like its an ongoing issue ???


zmemw16
Wed Jan 13, 2016 11:27 pm
apols, i’ve mentioned it at least a couple of times. istr it gives a binary format error.
not sure i’ve done an explicit post about it.

try this one:-
http://www.stm32duino.com/viewtopic.php … rmat#p4545

when i pull the archive as a zip file, i name them with Arduino_STM32{-devel}-ddmmyy-hhmm.zip
i can do a list of what i’ve got, with output from a zip list contents, for each if you wish.
not sure if i can just get the tools directory alone, maybe a bash script to write… …

stephen


zmemw16
Thu Jan 14, 2016 12:52 am
i did that bit of bash, one long line

results are attached

stephen

log.tar.gz
(3.96 KiB) Downloaded 147 times

Leave a Reply

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