-
Notifications
You must be signed in to change notification settings - Fork 34
MCU development
趙 漠居(Zhao, Moju) edited this page Aug 10, 2018
·
7 revisions
Linux/Windows: https://atollic.com/resources/download/
-
Run SDK:
- Windows: nothing to say.
- Linux:
- general way:
$ cd /opt/Atollic_TrueSTUDIO_for_ARM_x86_64_x.x.x/ide/ & ./TrueSTUDIO
- another way: Add
/opt/Atollic_TrueSTUDIO_for_ARM_x86_64_x.x.x/ide/
to $PATH; move to your project directory where.project
exists, and run$ TrueSTUDIO .project
.
- general way:
-
Emacs Key-bindings
- Select "Help" -> "Install New Software", add following urls:
- change to emacs keybindings "Window" -> "Reference" -> "General" -> "Keys" -> "Scheme". Select "Emacs+ Scheme"
- General compile errors:
-
xxxx.su can not find
: Delete the "Debug/XXXX" directory in the explorer
-
Linux/Windows: http://www.st.com/ja/development-tools/stm32cubemx.html#getsoftware-scroll
- Windows: nothing to say
- Linux: run
$ ./SetupSTM32CubeMX-x.xx.x.linux
after extraction. Then run$ cd ~/STM32CubeMX & ./STM32CubeMX
- Stable version for d_board: Right now we only can use
STM32Cube FW_F7 V1.3.1
. The later version can not work with CAN system. - Delete
main.c
from theUsers
dir in TrueStudio - Linux: After generate project from STM32CubeMX in Ubuntu, please revert file:
.project
and.cproject
.$ git checkout -- .cproject .project
- Edit .project: add "org.eclipse.cdt.core.ccnature" to enable cpp files compile; Also have to change the
<location>
to the relative path. - Add source files(*.c, *.cpp) to project: drag the related folders directly into the "Application" in the Project Explorer. (e.g. "rosserial_stm/test/ros_lib", "Jsk_Lib"). Also note that please check to the "link to files and folders"
- Copy main.c to main.cpp and also drag into the "Application"/"User" in the Project Explorer. Delete mian.c in the Project Explorer
- Edit the properties of the project: right click the project in the Project Explorer, select "Properties". Select "C/C++ Build" / "Settings".
- change to arm-atollic-eabi-g++ -c for all command in "Assembler", "C Compiler", "C++ Compiler" and "C++ linker"
- General: change to "gnu++11(C++11 + nug extensions)" for C++ Comipler.
- add related symbols to "Symbols" of "C Compiler", (e.g. __USE_C99_MATH, __arm). Copy the same symbols to "C++ Compiler". Also note that do not add "__cplus_cplus" which is the default symbols of the project.
- add include path in "Directories" of "C Compiler". (e.g.: ../../../ros_lib/rosseial_stm/test/ros_lib, ../../../Jsk_Lib) Copy the same paths to "C++ Compiler".
- Optimization: optimize for debugging (-Og)
- Can also add lib in "C++ Linker", please check "jsk_ugv"