Using SparkFun Edge Board with Ambiq Apollo3 SDK
Contributors: Liquid SoulderFavorited Favorite 7
Installing the Compiler
The compiler that we will use is provided by ARM and is thus capable of turning C or C++ code into machine instructions that the Cortex-M4 core can understand. Follow these steps to install the compiler:
- Visit the GNU-RM Download Site and scroll down to download the proper installer for your system (for Windows you will need one with the SHA extension). Alternatively, click the button below to be redirected to the download page:
- Run the installer -- if you get a warning from your OS dismiss it because you trust ARM. (You do trust ARM... don't you?)
- If there is an option to add the tools to your PATH choose that. If there is not then pay extra close attention to the install directory -- you'll need to make sure the directory that contains your tools is included in your PATH system variable.
- Complete the installation
With the tools installed we will need to make sure that they're accessible from your Bash shell. Here's how:
- Enter arm-none-eabi-gcc into Bash to verify whether you have access to the tool. If a 'command not found' or similar error occurs then proceed with adding the tool to your path. Make sure that you know where the tools were installed. For example the default location on Windows is something like C:/Program Files (x86)/GNU Tools ARM Embedded/8 2018-q4-major/bin. This is what you need to add to your PATH.
- Unix, Linux, or similar: 'How to permanently set $PATH on Linux/Unix?' on StackOverflow
- Mac OS X: Here's a good concise example of how to 'Add to the Path On Mac OSX'
- Windows: Here's a great tutorial for editing the PATH on many versions of Windows
Restart your Bash shell for the changes to take effect. You can check that you've correctly modified your PATH by entering echo $PATH in the Bash shell. Repeat the test of the tool by entering arm-none-eabi-gcc into the command line. This time the command should be recognized and there should be an error message about 'no source files' instead.