Setup STM32 Development Environment in Linux
Setup STM32 Development Environment in Linux
1. Download Tools
1.1 Toolchain: GCC ARM Embedded
Website: https://launchpad.net/gcc-arm-embedded
This toolchain for linux is 32bit. We need lib32 packages for ubuntu 64bit
# sudo dpkg --add-architecture i386
This toolchain for linux is 32bit. We need lib32 packages for ubuntu 64bit
# sudo dpkg --add-architecture i386
# sudo apt-get install lib32ncurses5
1.2 STLink utility
Source: https://github.com/texane/stlink
Requirement: automake, libusb-1.0-dev
Install:
- ./autogen.sh
- ./configure
- make; sudo make install
Restart udev without reboot
udevadm control --reload-rules ; udevadm trigger
Unplug and plug usb cable to STM32 board.
1.3 GNU ARM Eclipse plugin
Website: http://gnuarmeclipse.github.io/
Recommended Eclipse version is 4.4 SR2 (Luna)
Install: Eclipse -> Help -> Install New Software
- name: GNU ARM Eclipse Plug-ins
1.4 OpenOCD
Website: http://openocd.org/
Requirement: libftdi-dev
Install:
- ./configure --enable-verbose --enable-vernose-jtag-io --enable-ftdi --enable-stlink
- make; sudo make install
2. Create a New Project
Project -> New -> STM32F4xx C/C++ ProjectSet "Flash size" and "External clock" for your board. STM32F429 Discovery has 2MB flash and 8MHz clock. Use "semihosting DEBUG channel"for trace output (or use "None" for smaller code size).
3. Debug Settings
- add an openocd debug session
- set openocd executale location
- set gdb executable location
0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁