-
Notifications
You must be signed in to change notification settings - Fork 34
MCU development
趙 漠居(Zhao, Moju) edited this page Jun 12, 2019
·
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:
2. Emacs Key-bindings
1. Select "Help" -> "Install New Software", add following urls:
- http://www.mulgasoft.com/emacsplus/e4/update-site
- http://www.mulgasoft.com/emacsplus/update-site
2. 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
note: .cproject
is modified from TrueStudio, which has no business with STM32CubeMX. But, .project
is influenced by STM32CubeMX.
- ADD line:
"<nature>org.eclipse.cdt.core.ccnature</nature>"
in.project
to enable cpp files compile; - Change the
<location>
to the relative path in .project, if necessary. - 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. Or you can directly edit.project
to change frommain.c
tomain.cpp
- 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
in "Assembler" and "C++ Compiler", please remainarm-atollic-eabi-gcc -c
for "C Compiler", and change toarm-atollic-eabi-g++
for "C++ linker". Please read this for the meaning of option-c
. - Change to "gnu++11(C++11 + nug extensions)" for
C++ Comipler/General
. - Add related symbols to "Symbols" of "C Compiler", (e.g. __USE_C99_MATH, __arm). Copy all the symbols to "C++ Compiler". Also note that do not add "__cplus_cplus" which is the default symbols when running
g++
. - add include path in "Directories" of "C Compiler". (e.g.: ../../../ros_lib/rosseial_stm/test/ros_lib, ../../../Jsk_Lib). Copy all the paths to "C++ Compiler".
- change the optimize for debugging (-Og) in
Optimization
- Can also add lib in "C++ Linker", please check "jsk_ugv"
- Please use
extern C
to avoid the conflict C funtion in C++ files. Please read this carefully.
- change to