Hardware
The device which will be used in this project is Silicon Labs EFM32PG22 board. For cross compiling and firmware development in general - Thinkpad T470s with Kubutu OS (22.04.3 LTS).
ARM Toolchain
Download the ARM toolchain. Check their website for the newest release:
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
Then extract:
tar -xvf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
Make a directory in /opt and move the downloaded files:
cd /
cd opt
sudo mkdir gcc-arm
cd ~
cd Downloads/
sudo mv arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/* /opt/gcc-arm
cd /
cd opt
sudo mkdir gcc-arm
It is good to setup a path in order to execute the compiler commands from anywhere:
nano ~/.bashrc
export PATH="/opt/gcc-arm/bin/:$PATH"
source ~/.bashrc
Always is good idea to check if everything is installed properly:
arm-none-eabi-gcc --version
arm-none-eabi-g++ --version
JLink
Download from this location. Then, extract the files:
tar xf ~/Downloads/Jlink_Linux_V810c_x86_64.tgz
Make a directory in /opt and move the downloaded files:
cd /
cd opt
sudo mkdir SEGGER
sudo mv ~/Downloads/JLink_Linux_V810c_x86_64 /opt/SEGGER/
Copy the rules file:
sudo cp /opt/SEGGER/JLink_Linux_V810c_*/99-jlink.rules /etc/udev/rules.d/99-jlink.rules
Path setup:
nano ~/.bashrc
export PATH="/opt/SEGGER/Jlink_Linux_V810c_x86_64/:$PATH"
source ~/.bashrc
Now, this command should be executed from anywhere:
JlinkGDBServer
