Skip to content

MCU development

趙 漠居 edited this page Apr 14, 2018 · 7 revisions

Beginner Level

SDK: True Studio

Install:

Linux/Windows: https://atollic.com/resources/download/

After Install:

  1. Run SDK:

    1. Windows: nothing to say.
    2. Linux:
      1. general way: $ cd /opt/Atollic_TrueSTUDIO_for_ARM_x86_64_x.x.x/ide/ & ./TrueSTUDIO
      2. 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.
  2. Emacs Key-bindings

    1. Select "Help" -> "Install New Software", add following urls:
    2. change to emacs keybindings "Window" -> "Reference" -> "General" -> "Keys" -> "Scheme". Select "Emacs+ Scheme"

Tips:

  1. General compile errors:
    1. xxxx.su can not find: Delete the "Debug/XXXX" directory in the explorer

Intermediate Level

Project Generator: STM32CubeMX

Install:

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

Tips:

  1. 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.
  2. Delete main.c from the Users dir in TrueStudio
  3. Linux: After generate project from STM32CubeMX in Ubuntu, please revert file: .project and .cproject. $ git checkout -- .cproject .project

SDK: TrueStudio

Initialization Process for first project building

  1. Edit .project: add "org.eclipse.cdt.core.ccnature" to enable cpp files compile; Also have to change the <location> to the relative path.
  2. 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"
  3. Copy main.c to main.cpp and also drag into the "Application"/"User" in the Project Explorer. Delete mian.c in the Project Explorer
  4. Edit the properties of the project: right click the project in the Project Explorer, select "Properties". Select "C/C++ Build" / "Settings".
    1. change to arm-atollic-eabi-g++ -c for all command in "Assembler", "C Compiler", "C++ Compiler" and "C++ linker"
    2. General: change to "gnu++11(C++11 + nug extensions)" for C++ Comipler.
    3. 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.
    4. 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".
    5. Optimization: optimize for debugging (-Og)
    6. Can also add lib in "C++ Linker", please check "jsk_ugv"

Advanced Level

Actuators:

dynamixel

Sensors:

GPS:

we use blox NEO-M8N series. The specific product is UBLOXマイクロM8N GPSコンパスモジュール But, the this one would be better:コンパスとUbloxネオM8N GPS

About UBLOXマイクロM8N GPSコンパスモジュール

I2C SLC(RED,COMPASS), I2C SDA(COMPASS), VCC (5V) RX, TX, GNG

Use u-center to reconfigure the u-blox module. The configuration is under preparation. Please use images in **screenshot**to explain.

euroc

Clone this wiki locally