|
|
|
|
|
|
Germany, BY, Gestratz
Joined Oct 2008
244 Posts
|
Howto: STM32 Toolchain
For those, who need a recipe for a stm32 toolchain to compile baseflight (updated instructions made by CrazyLittle)
Arm Toolchain STM32: Install CodeSourcery ARM G++ Lite toolchain. During the installation, set the PATH variable for all users when prompted. http://www.mentor.com/embedded-softw.../lite-edition/ Follow these instructions to install Eclipse and some Plugins (rest not neccessary) http://www.stf12.org/developers/ODeV.html Eclipse: http://www.eclipse.org/downloads/ Get the one for C/C++ (For Windows user: get the win32 version, unless you know, that you have a 64 bit java version on your computer) Import the project using "Project from SVN" from http://afrodevices.googlecode.com/svn/trunk/baseflight as a "project configured using New Project Wizard" * C-project * ARM Cross Target App / Empty / Sourcery G++ Lite I went ahead and deleted the "debug" build configuration because I'm not going to be using a JTAG or doing any on-board debug or sim-debugging. Once the project is checked out from the SVN, here's the project properties that need to be changed in order to setup the environment properly: Do a "Properties" on the linker script "stm32_flash.ld" that's in the main folder. Copy down the full file path to it in the Resource page. You'll need it for the next step. Open up the properties on the main project folder. C/C++ Build/Settings/Target Processor cortex-m3 Check Thumb(-mthumb) C/C++ Build/Settings/ARM Sourcery Windows GCC C Linker / General: Script File: <absolute-file-path-to>\stm32_flash.ld Uncheck [_] Do not use standard start files Check [X] Remove unused sections C/C++ Build/Settings/ARM Sourcery Windows GCC C Linker / Libraries: m (Yes, just "m" as one line in the libraries list since that's the math library.) C/C++ Build/Settings/Add to ARM Sourcery Windows GCC C Compiler / Preprocessor - Defined symbols: STM32F10X_MD USE_STDPERIPH_DRIVER ARM Sourcery Windows GCC C Compiler / Directories: ${workspace_loc:/${ProjName}/lib/CMSIS/CM3/CoreSupport} ${workspace_loc:/${ProjName}/lib/CMSIS/CM3/DeviceSupport/ST/STM32F10x} ${workspace_loc:/${ProjName}/lib/STM32F10x_StdPeriph_Driver/inc} ARM Sourcery Windows GCC C Compiler / Micellaneous: Under "Other flags" add -fomit-frame-pointer Part of the SVN checkout includes stuff from other projects that's not relevant to compiling baseflight. Tell Eclipse to ignore the contents of the /support folder: Right click on Folder "support" Choose Resource Configuration-> Exclude from build Press CTRL+B to build and compile everything. Look inside the /Release folder to find your finished baseflight.hex file. |
|
|
|
|
|
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Product zeroGravity - An STM32 Flightcontroller based on PIPO32 hardware | Jessestr | Multirotor Talk | 40 | Jun 25, 2012 08:18 PM |
| Question Question: Howto cut slot in boom for rudder? | topgun300 | Hand Launch | 14 | May 29, 2012 10:15 AM |