installing_gnu_on_osx
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
installing_gnu_on_osx [2009/11/03 09:25] – baptistou | installing_gnu_on_osx [2011/05/21 20:52] (current) – moved page admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | How to set up the toolchain for coding MIOS32 apps with OS X | + | Now located under [[macos_mios32_toolchain_core]] |
- | + | ||
- | You have probably already installed the developper tools provided by apple. You need them before going further. (if you have installed XCode, that's fine). | + | |
- | + | ||
- | steps: | + | |
- | 1- get the mios32 files from the repository server | + | |
- | 2- install the STM32 toolchain | + | |
- | 3- configure the paths | + | |
- | + | ||
- | 1- get the files from the repository server | + | |
- | + | ||
- | The simplest way to do this is to get the " | + | |
- | Then you are able to drag and drop the " | + | |
- | Now the Unix path of your mios32 files is " | + | |
- | + | ||
- | You can also do this from Xcode itself:\\ | + | |
- | In the " | + | |
- | Under the repositories list clic on the " | + | |
- | Then in the " | + | |
- | In the " | + | |
- | + | ||
- | 2- install the STM32 toolchain | + | |
- | + | ||
- | A nice pre-built binaries archive can be found at this page: " | + | |
- | You don't need to do everything written on this page as we won't use Circle OS and FatFryer.\\ | + | |
- | Just download the pre-built binaries in the section " | + | |
- | Expand the archive, you will then have a " | + | |
- | Check that all the files expanded properly in your /usr folder.\\ | + | |
- | The trick is that the /usr folder is hidden by the finder so if you want to open it, in the finder' | + | |
- | Personally I tried to expand the files with the terminal as said in the " | + | |
- | You now need to set the path variable for the toolchain, see the next section about this | + | |
- | + | ||
- | 3- set up the paths variables | + | |
- | + | ||
- | For those who doesn' | + | |
- | In Unix we call a shell the piece of software that provides an interface for users. For example, when you use the terminal, you are talking to the computer through the " | + | |
- | Your compiler also uses the shell to access to the different files involved. Thus, it has to know where to find these files. | + | |
- | + | ||
- | Setting up path variables in the shell is quite easy: in a terminal window just type " | + | |
- | and if you want to check to what the variable has been assigned, type:\\ | + | |
- | "echo $VARIABLE_NAME" | + | |
- | this will print what's inside the variable.\\ | + | |
- | For example, type\\ | + | |
- | " | + | |
- | to set up the mios32 folder path, then type\\ | + | |
- | "echo $MIOS32_PATH" | + | |
- | to check that the path variable has been assigned. | + | |
- | + | ||
- | In our case, we need to set up the path variable for the STM32 toolchain: | + | |
- | type in the terminal\\ | + | |
- | " | + | |
- | and then we need to set up variables for mios32 itself:\\ | + | |
- | " | + | |
- | export MIOS32_BIN_PATH=$MIOS32_PATH/ | + | |
- | export MIOS32_GCC_PREFIX=arm-none-eabi\\ | + | |
- | export MIOS32_FAMILY=STM32F10x\\ | + | |
- | export MIOS32_PROCESSOR=STM32F103RE\\ | + | |
- | export MIOS32_BOARD=MBHP_CORE_STM32\\ | + | |
- | export MIOS32_LCD=clcd" | + | |
- | Here I considered that you have put all the files downloaded from the svn server in the directory " | + | |
- | + | ||
- | Now everything is set up to compile properly your projects. Test if everything is OK, open a terminal window, type\\ | + | |
- | "cd $MIOS32_PATH/ | + | |
- | to go to the " | + | |
- | "make -s"\\ | + | |
- | you should have a return looking like this:\\ | + | |
- | -------------------------------------------------------------------------------\\ | + | |
- | Application successfully built for:\\ | + | |
- | Processor: STM32F103RE\\ | + | |
- | Family: | + | |
- | Board: | + | |
- | LCD: | + | |
- | -------------------------------------------------------------------------------\\ | + | |
- | and with the finder, go to this tutorial folder, you should have now a .hex file uploadable to your core32 with " | + | |
- | + | ||
- | The annoying point there is that the variables you set up in the shell just disappear when you shut down or log off your computer. That means you have to set them up again when you power on your computer again. There' | + | |
- | The shell will always read particular files before starting up. If you put these variables there they will always be set up. I didn't really understood if the proper file was " | + | |
- | Moreover, all these files are hidden from the finder, so the best way to edit them is to open a terminal window and edit them with the " | + | |
- | If you don't understand what's going on, here's what I did: | + | |
- | + | ||
- | in a terminal window, type:\\ | + | |
- | "pico ~/ | + | |
- | then copy and paste these lines inside the pico editor:\\ | + | |
- | + | ||
- | export PATH=$PATH:/ | + | |
- | export MIOS32_PATH=~/ | + | |
- | export MIOS32_BIN_PATH=$MIOS32_PATH/ | + | |
- | export MIOS32_GCC_PREFIX=arm-none-eabi\\ | + | |
- | export MIOS32_FAMILY=STM32F10x\\ | + | |
- | export MIOS32_PROCESSOR=STM32F103RE\\ | + | |
- | export MIOS32_BOARD=MBHP_CORE_STM32\\ | + | |
- | export MIOS32_LCD=clcd\\ | + | |
- | + | ||
- | do " | + | |
- | do " | + | |
- | + | ||
- | log off or shut down your computer\\ | + | |
- | login of start up the computer\\ | + | |
- | open a terminal window and check if the variables are all set up:\\ | + | |
- | "echo MIOS32_PATH" | + | |
- | if they are not, that's probably another file you need to edit.\\ | + | |
- | Useful info about bash and initialisation files here:\\ | + | |
- | http:// | + | |
- | and here:\\ | + | |
- | http:// | + | |
installing_gnu_on_osx.1257240326.txt.gz · Last modified: 2009/11/03 09:25 by baptistou