1.7.11 ST-LINK/V2 and Blue pill - lazy success

All distros
Post Reply
x0a
Posts: 1
Joined: Sat Oct 08, 2016 1:24 pm

1.7.11 ST-LINK/V2 and Blue pill - lazy success

Post by x0a » Sat Oct 08, 2016 1:47 pm

I don't Java and almost unfamiliar with microcontrollers as a dev, ordered BluePill and ST-LINKV2 usb whistle for my miserable purposes, fancy solution with even too high ds specs and almost free (all the stuff from china).
For those who are in situation with GNU/Linux box and willing latest for today release to work with attitude like: "mkay downloaded from .org now work.. pls! argh!11"
Can't see the boards manager? Me too, me too.

Back up original files before messing or be ready to checkout Roger's or related git, sane people who achieved PhD at this IDE's sorcery most probably won't need anything from this.

Error: "Cannot run program "{runtime.tools.arm-none-eabi-gcc.path}/bin/arm-none-eabi-g++": error=2, No such file or directory"
Your compiler is usually at: "[unpacked_root_folder]/arduino-1.7.11-linux64/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-g++"
Your platfom.txt is usually at: "~/Arduino/hardware/Arduino_STM32/STM32F1/platform.txt"
Solved like this:
#compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
compiler.path=/home/%username%/Ware/arduino-1.7.11-linux64/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/

Error: "arm-none-eabi-g++: error: core.a: No such file or directory"
Your platfom.txt is usually at: "~/Arduino/hardware/Arduino_STM32/STM32F1/platform.txt"
Solved like this:
#recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"

Error: "~/Arduino/hardware/Arduino_STM32/tools/linux/stlink/st-flash: error while loading shared libraries: libusb-1.0.so.0: cannot open shared objectle or directory"
Solution as for deb-based:
dpkg --add-architecture i386
apt-get install libusb-1.0-0:i386
# dirty, fast, contains reason for the error in it
# related, can be slightly different on your distro: "/etc/ld.so.conf.d/libc.conf" contents, you may need also libc6:i386
# if you know why it looks into "../linux" and not into "../linux64" subdir i'd be very thankful

Error: # libncurses.so.5
Helpers:
- At certain circumstances the filename can be "libncursesw.so.5" with exactly same contents - `cp` or `ln -s` it and look at at previous error stuff.
- Try fetching i386 version of the library.

Fatal warning: "... WARN src/stlink-usb.c: Error -3 (Permission denied) opening ST-Link/V2 device ..."
Read carefully and push forward from corresponding udev sections of https://github.com/rogerclarkmelbourne/ ... wiki/Linux and https://github.com/rogerclarkmelbourne/ ... bootloader
After install.sh is done - disconnect the st-link programmer from usb, run `sh -c "(udevadm control --reload-rules && udevadm trigger --action=change)"` as root. plug it back and it should be okay most probably.

Other:
- binaries preparation for various purposes (e.g. storing, working with a products like BeeProg directly, etc.):
arm-none-eabi-objcopy -O binary xxx.elf xxx.bin
arm-none-eabi-objcopy -I ihex -O binary xxx.hex xxx.bin

P.S. So you'd better use the recommended versions. Thanks http://www.stm32duino.com/memberlist.ph ... ofile&u=49 for making it all manageable to me and for his fancy look!

STM32 Arduino IDE ST-LINK/V2 Blue pill stm32f103 linux debian ubuntu
Surely this topic can be removed if it looks stupid, anyway was close to abandon it when registration form asked me: "On an Arduino Uno, what pin is the LED connected to (include the D in front of the number):", because i don't have any and never buy overpriced equipment, google picture search brought me here accidentally.

Post Reply