Skip to content
Peter Hollands edited this page Jun 3, 2015 · 1 revision

Introduction

There are two toolchain available for STM32F4 development that we are using. SystemWorkbech AC6 (based on Eclipse) and Em::Block (based on Code::Block)

Em:Block

We need to download and install the last version of Em::Block from their Web (currently 2.30 2015 april 7).

Next we will need STLink drivers. From this page. We need to choose acording to our OS, in my case I choose LINK0003 (For XP). Download the .zip file, unzip it and run st-link_v2_usbdriver.exe installer.

The next step is obtain a clean copy of MatrixPilot_beta branch. I use TortoiseSVN for it. So, download and install the last version of tortoise, create a folder on your PC, then rigth click on it and choose SVN Checkout. Use 'https://gentlenav.googlecode.com/svn/branches/MatrixPilot_beta' as URL of Repository.

Now it's time to create the Em Block project. There is a phyton script on \Tools\Build. We need phyton to run it. Download and install Phyton 2.7.9. Then run "make-build.bat". This script will create a new folder called "\build". There we could finde "MatrixPilot-PX4.ebp". On EmBlock select File->open and select MatrixPilot-PX4.ebp Now is time to build. Go to build->build target and after a few second we have to get something like this

bin\\Debug\\MatrixPilot-PX4.map|1|Program size (bytes):  145328|
||Data size    (bytes):     440|
||BSS size     (bytes):   35816|
||             ----------------|
||Total size   (bytes):  181584   (R/W Memory: 36256)|
||
||=== Build finished: 0 errors, 49 warnings (1 minutes, 2 seconds) ===|

If there is no error we can go on and try to flash and debug the code on a NUCLEO 401RE or 411RE.

Flash and debug

There is a known issue with GDB and 411RE chip we need to download this file Unzip with 7z (v 920) and replace the file on "program file path\EmBlocks\2.30\share\contrib

Then go to Debug->Start/Stop debug session (or press F8). And that's all, start to play putting BreakPoints and test the code!

Clone this wiki locally