Skip to content

Instantly share code, notes, and snippets.

@MarrekNozka
Last active January 12, 2023 18:45
Show Gist options
  • Select an option

  • Save MarrekNozka/06c59056c4d7dc148044111a73c5d8ab to your computer and use it in GitHub Desktop.

Select an option

Save MarrekNozka/06c59056c4d7dc148044111a73c5d8ab to your computer and use it in GitHub Desktop.
Build STM8S toolchain
#!/bin/sh
mkdir src
cd src
sudo apt install stow
sudo apt build-dep sdcc
#sdcc-gas
git clone --depth 1 https://github.com/XaviDCR92/sdcc-gas.git
cd sdcc-gas
./configure --prefix=/usr/local/stow/sdcc-gas --program-suffix=-gas
make -j`nproc`
sudo make install
#STM8-binutils
git clone --depth 1 https://github.com/XaviDCR92/stm8-binutils-gdb.git
cd stm8-binutils-gdb
export PREFIX=/usr/local/stow/stm8-binutils-gdb
./patch_binutils.sh
./configure_binutils.sh
cd binutils-2.30/
make -j`nproc`
sudo make install
# stow
cd /usr/local/stow
sudo stow sdcc-gas
sudo stow stm8-binutils-gdb
echo "Done :)"
@peoblouk
Copy link

peoblouk commented Jan 12, 2023

#!/bin/sh

sudo mkdir src
cd src
sudo apt install stow
sudo apt build-dep sdcc

#sdcc-gas
sudo git clone --depth 1 https://github.com/XaviDCR92/sdcc-gas.git
cd sdcc-gas
./configure --prefix=/usr/local/stow/sdcc-gas --program-suffix=-gas
make -jnproc
sudo make install

#STM8-binutils
git clone --depth 1 https://github.com/XaviDCR92/stm8-binutils-gdb.git
cd stm8-binutils-gdb
export PREFIX=/usr/local/stow/stm8-binutils-gdb
./patch_binutils.sh
./configure_binutils.sh
cd binutils-2.30/
make -jnproc
sudo make install

#stow
sudo cd /usr/local/stow
sudo stow sdcc-gas
sudo stow stm8-binutils-gdb

echo "Done :)"
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment