Project

General

Profile

Toolchain » History » Revision 20

Revision 19 (fixeria, 05/14/2019 08:44 AM) → Revision 20/23 (fixeria, 08/13/2020 10:28 AM)

h1. Toolchain 

 To compile the target firmware for [[OsmocomBB]] or [[SIMtrace:]], you need a GNU toolchain Toolchain for ARM. You can either use binary packages provided by your distribution (recommended), or build a toolchain from source code yourself. There are various pre-compiled toolchains available (e.g. Code Sourcery), available, but not all of them will produce working firmware. We're trying to support all these configurations, but it might take a while to identify the source of a problem. If you have persistent errors when compiling, try using a different package. 

 

 h3. Binary packages distribution 

 You can use a pre-compiled toolchain provided by your GNU/Linux distribution. 

 For Debian based distributions (Ubuntu, Linux Mint, etc.), use the following command: 

 <pre> 
 $ sudo apt install gcc-arm-none-eabi 
 </pre> 

 For ArchLinux (https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/): 

 <pre> 
 $ sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib 
 </pre> 

 The following versions are confirmed to work: 

 <pre> 
 Name              : arm-none-eabi-gcc 
 Version           : 10.2.0-1 
 --- 
 Name              : arm-none-eabi-binutils 
 Version           : 2.34-1 
 --- 
 Name              : arm-none-eabi-newlib 
 Version           : 3.3.0-1 
 </pre> 

 

 h3. Building Build one from source 

 If a pre-compiled toolchain provided by your distribution fails you want to produce working firmware images, you can build your own toolchain toolchain, known to be working with [[OsmocomBB]], see here: [[GnuArmToolchain]]. 

 This is the best option to get a fairly recent GCC, and this is the option used by several [[OsmocomBB]] developers. 

 h3. Building old branches 

 If you need to build the *firmware from old unmaintained branches* (sylvain/burst_ind, sylvain/testing, jolly/testing, etc.), an older version of toolchain is needed. 

 Please follow the build instructions at: https://github.com/axilirator/gnu-arm-installer/ 

 When using toolchain with GCC >=4.8, the firmware can be compiled, but will hang as soon as you want to sync to an ARFCN. 
 This issue has been fixed in master: http://cgit.osmocom.org/osmocom-bb/commit/?id=a903b3c1ee27047c79728b18ff6340d23d1aad2e. 

 

 h3. Mac OS X 

 Apparently the arm-elf-gcc 4.3.2 from ports for MacOS X can compile the firmware as well after symlinking _/opt/local/bin/arm-elf-ranlib_ to _/opt/local/bin/arm-elf-linux-ranlib_ and _/opt/local/bin/arm-elf-strip_ to _/opt/local/bin/arm-elf-linux-strip_. If you omit the links, there will be unresolvable references to symbols in the libraries.
Add picture from clipboard (Maximum size: 48.8 MB)