Last active
January 12, 2023 18:45
-
-
Save MarrekNozka/06c59056c4d7dc148044111a73c5d8ab to your computer and use it in GitHub Desktop.
Build STM8S toolchain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 :)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#!/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 -j
nprocsudo 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
nprocsudo make install
#stow
sudo cd /usr/local/stow
sudo stow sdcc-gas
sudo stow stm8-binutils-gdb
echo "Done :)"
