us-irs / va108xx-cpp-base

C/C++ base project for VA108xx projects with CMake and Eclipse & VS Code support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C/C++ template project for VA108xx based projects

Prerequisites

  1. ARM Cross-compiler installed and added to system path
  2. CMake installed
  3. SEGGER J-Link tools installed
  4. Eclipse or VS Code for development recommended, project files provided

Build

Instructions for command line. Make sure you can call the cross-compiler from the command line, e.g. with arm-none-eabi-gcc -v.

  1. Create build directory

    make build && cd build
  2. Set up build system. Depending on the OS and desired build system, you might have to specify the build system explicitely (e.g. with -G "MinGW Makefiles" or -G "Ninja" on Windows) instead of using the defaults

    cmake ..
  3. Build the project

    cmake --build . -j

Flashing and Debugging

It is recommended to use Eclipse or VS code for convenient flashing, but the instructions here show how to do it in the commnand line

  1. Start the JLink GDB server.

  2. Run the GDB application, for example gdb-multiarch

    gdb-multiarch -q -x jlink.gdb build/va10820-template
  3. The debugger should now be stopped at the start of the application. Press C to continue

Using VS Code

The only requirement on the VS Code installation is the following plugin:

Another requirement is that you still need to set up the Eclipse build configuration at least once in the build folder like shown in the build section. After that, you can use the Run & Debug Tab of VS Code to debug your application.

Using Eclipse

The only requirement on the Eclipse installation is the following plugin:

  • Eclipse Embedded CDT. It is recommended to install the xPacks cross-compiler as it offers the best Eclipse support when used with this plugin

It is also recommended to install the following plugins

After installing all plugins, copy the .cproject and .project files from the eclipse folder to the repository root. Now open the folder in Eclipse as a project and make sure to deselect the eclipse folder in the selection Window.

Another requirement is that you still need to set up the Eclipse build configuration at least once in the build folder like shown in the build section. After that you should be able to build and debug with the hammer and debug button conveniently now.

About

C/C++ base project for VA108xx projects with CMake and Eclipse & VS Code support

License:Apache License 2.0


Languages

Language:C 97.2%Language:Assembly 1.5%Language:CMake 1.1%Language:C++ 0.1%Language:Shell 0.0%Language:GDB 0.0%