I got a new Raspberry Pi complete with the sunfounder sensor kit for my birthday this year. I’ve been wanting to delve into the world of embedded programming so this was a great gift for me. To start I’ve decided to go back and begin with bare metal programming.
I’m following the lead of the tutorial series here
The first thing I needed to do was unpack and install the ARM cross compiler from gcc. link
I wanted a root level directory to manage where I put system level cross compilers so I created /local and moved the folder there.
Finally I needed to make sure that the binaries were in my PATH. I added this to the end of my .zshrc file. This would be .bashrc if you are not using ZSH or another alternative shell.
To test this working I simply type
arm-none-eabi-gcc at the command line.
The recommended optimization flags for Rpi