rogerclarkmelbourne / Arduino_STM32

Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards
Other
2.52k stars 1.26k forks source link

recompile upload-reset for 64-bit systems #818

Closed midnight-wonderer closed 3 years ago

midnight-wonderer commented 4 years ago

The precompiled upload-reset in linux64 is actually for 32-bit systems.

Try file ./tools/linux64/upload-reset and you'll get

ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=dc8dc5ad6de94179a9d534b1a34aeb6d906640b1, not stripped

That's why it does not work.

Recompiled with

gcc -o ./upload-reset -O3 ./src/upload-reset/upload-reset.c
midnight-wonderer commented 4 years ago

Probably related: https://github.com/rogerclarkmelbourne/Arduino_STM32/issues/454

Credit: https://community.platformio.org/t/upload-reset-no-such-file-or-directory/8656/5

stevstrong commented 4 years ago

Can anyone else test it? I don't have Linux.

ddrown commented 4 years ago

Testing on Ubuntu 20.04.1 and Fedora 32, this looks good.

I verified:

+1 from me

stevstrong commented 3 years ago

I have no Linux distro where to check, but I trust the two testers, so I will merge this. It can be reopened if problems occur.