installing_gnu_on_osx
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
installing_gnu_on_osx [2011/05/21 20:41] – Improved MIOS32 toolchain doc for MacOS admin | 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 developer tools (Xcode) provided by Apple. You need them before going further. | + | |
- | Xcode is located | + | |
- | + | ||
- | ===steps: | + | |
- | 0- about the terminal\\ | + | |
- | 1- get the mios32 files from the repository server\\ | + | |
- | 2- install the MIOS32 toolchain\\ | + | |
- | 3- configure the paths\\ | + | |
- | 4- other derivatives\\ | + | |
- | + | ||
- | ===0- about the terminal=== | + | |
- | + | ||
- | Most of the things now will be done with the Terminal, if you don't know anything about it here are the basic commands you need:\\ | + | |
- | Launch it from your " | + | |
- | After each command, press " | + | |
- | + | ||
- | Type " | + | |
- | Type " | + | |
- | Type "cd aDirectoryName" | + | |
- | Type "cd aPath" to go to a particular path\\ | + | |
- | Type "cd .." to go to the parent directory\\ | + | |
- | Type "cd ~" to go to your home directory | + | |
- | + | ||
- | A nice shortcut if you want to go to a particular folder without having to type the full path is to type "cd " in the terminal, then open the parent directory of the one you want to go in with the finder, and drag and drop the folder icon inside the terminal. It's path will appear by magic, press " | + | |
- | + | ||
- | ===1- get the files from the repository server=== | + | |
- | + | ||
- | TK proposes to use the " | + | |
- | + | ||
- | After the installation just create a svn directory: | + | |
- | mkdir svn | + | |
- | thereafter checkout the repository with: | + | |
- | svn co svn:// | + | |
- | done! | + | |
- | Applications will be located under svn/ | + | |
- | + | ||
- | + | ||
- | If you prefer a GUI (but TK states that this will be more confusing), install a client like " | + | |
- | 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 MIOS32 toolchain=== | + | |
- | + | ||
- | The MIDIbox community have created a modified GNU Compiler Collection, ready for use with the ARM Cortex M3 platform. The toolchain contains all of the tools required to build MIOS32 applications including GCC and NEWLIB. | + | |
- | + | ||
- | The Toolchain has currently been compiled for Windows (2000+), Mac OS X (Leopard or newer) and Linux x86 (built on Ubuntu 10.10). | + | |
- | + | ||
- | The download directory for the toolchain is ftp:// | + | |
- | + | ||
- | Download the latest " | + | |
- | + | ||
- | You now need to set the path variable for the toolchain bin directory (/ | + | |
- | + | ||
- | ===3- set up the paths variables=== | + | |
- | + | ||
- | For those who don't know anything about Unix like me a few days ago, here's a quick explanation: | + | |
- | In Unix we call a shell the piece of software that provides an interface for users. For example, when you use the terminal in OS X, 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:\\ | + | |
- | '' | + | |
- | this will print what's inside the variable.\\ | + | |
- | For example, type\\ | + | |
- | '' | + | |
- | to set up the mios32 folder path, then type\\ | + | |
- | '' | + | |
- | to check that the path variable has been assigned. | + | |
- | + | ||
- | In our case, we need to set up the path variable for the MIOS32 toolchain for STM32: | + | |
- | 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\\ | + | |
- | '' | + | |
- | to go to the " | + | |
- | '' | + | |
- | 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:\\ | + | |
- | '' | + | |
- | then copy and paste these lines inside the pico editor:\\ | + | |
- | + | ||
- | '' | + | |
- | 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\\ | + | |
- | echo MIOS32 variables initialized.'' | + | |
- | + | ||
- | do " | + | |
- | do " | + | |
- | + | ||
- | Once you open a new terminal, the variables will be set automatically, | + | |
- | It isn't required to log off or shut down your computer to test this.\\ | + | |
- | Open a terminal window and check if the variables are all set up by typing:\\ | + | |
- | '' | + | |
- | If you don't see the messages (and MIOS32 variables don't exist), that's probably because a .bash_login or .bash_profile already exists (edit only an already existing file - of none exists, use .profile).\\ | + | |
- | Useful info about bash and initialisation files here:\\ | + | |
- | [[http:// | + | |
- | and here:\\ | + | |
- | [[http:// | + | |
- | + | ||
- | + | ||
- | ===4- other derivatives=== | + | |
- | + | ||
- | For STM32 running on a MBHP_CORE_STM32 board use following setup: | + | |
- | + | ||
- | '' | + | |
- | 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'' | + | |
- | + | ||
- | + | ||
- | For LPC17 running on a MBHP_CORE_LPC17 (or LPC1769 based LPCXPRESSO) board use following setup: | + | |
- | + | ||
- | '' | + | |
- | export MIOS32_BIN_PATH=$MIOS32_PATH/ | + | |
- | export MIOS32_GCC_PREFIX=arm-none-eabi\\ | + | |
- | export MIOS32_FAMILY=LPC17xx\\ | + | |
- | export MIOS32_PROCESSOR=LPC1769\\ | + | |
- | export MIOS32_BOARD=MBHP_CORE_LPC17\\ | + | |
- | export MIOS32_LCD=clcd'' | + | |
installing_gnu_on_osx.1306010519.txt.gz · Last modified: 2011/05/21 20:41 by admin