Skip to content

how to build flash and use hydrafw on linux

Abdelkader Boudih edited this page Oct 13, 2024 · 36 revisions

How to build, flash and use hydrafw on Linux (Debian/Ubuntu):

Prerequisites for Linux:

    cd ~
    sudo apt-get install gcc make git dfu-util putty
    wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
    tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
    rm -rf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
    echo 'PATH=$PATH:~/gcc-arm-none-eabi-4_9-2015q3/bin' >> ~/.bashrc
    source ~/.bashrc
    git clone https://github.com/hydrabus/hydrafw.git hydrafw
    cd ~/hydrafw
    git submodule init
    git submodule update
    cd src/build-scripts
    make clean all
  • For Debian / Ubuntu on 64bits/amd64 system see https://wiki.debian.org/Multiarch/HOWTO in order to enable multi architecture for i386 support.
  • When multiarch is enabled you shall also install libc6-i686:i386 (Debian) or libc6:i386 (Ubuntu)

Build hydrafw on Linux:

    cd ~/hydrafw/src
    make clean
    make

Flash and use hydrafw on Linux:

See the Wiki Getting-Started-with-HydraBus-flash-and-use-hydrafw-on-linux

Alternative simplified way to Build & Flash hydrafw on Linux Debian (thanks to Mashu):

    sudo su
    apt-get install git dfu-util make gcc gcc-arm-none-eabi binutils-arm-none-eabi
    git clone https://github.com/hydrabus/hydrafw
    cd hydrafw/src/build-scripts
    make clean all
    cd ..
    cd hydrafw/src
    git submodule init
    git submodule update
    make
    dfu-util -d 0483:df11 -a 0 -D build/hydrafw.dfu

On Fedora

sudo dnf install git dfu-util make gcc arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib
git clone https://github.com/hydrabus/hydrafw --recursive
cd hydrafw/src
make
dfu-util -d 0483:df11 -a 0 -D build/hydrafw.dfu

LTO errors

There is a bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69866 and here https://bugs.launchpad.net/gcc-arm-embedded/+bug/1570613) that prevents ChibiOS to be compiled with ARM GCC in versions 5.x, 6.x and 7.x. If the build fails with a message like :

lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:xxx

Update: https://bugs.launchpad.net/gcc-arm-embedded/+bug/1570613

  • In GCC Bugzilla #69866, Rguenth (rguenth) wrote on 2021-12-07: Fixed.
  • Bug Watch Updater (bug-watch-updater) on 2021-12-09 Changed in gcc: status: Confirmed → Fix Released

Issue fixed in https://launchpad.net/gcc-arm-embedded/+milestone/8-2018-q4-major

Solution: Use GCC ARM 4.9 2015q3(GNU_ARM_4_9_2015q3) or ARM GCC >= 8-2018-q4-major (https://bugs.launchpad.net/gcc-arm-embedded/+bug/1570613)

How to Flash/Use HydraFW

How to Build/Flash/Use HydraFW

Developer Getting-Started with HydraBus and STM32CubeIDE

Hardware

Firmware (hydrafw) performances

Firmware (hydrafw) Application guides

Firmware (hydrafw) guides

How to Help

Clone this wiki locally