Simply add a CMakeLists.txt to the directory. Setup WSL as a compiler (or mingw, cygwin). And then add a OpenOCD Launch Configuration pointing to the elf file. Debugging works too, it doesn't have the stack analyzer that ChibiStudio supports but I like having a modern IDE more

Content of the CMakeLists.txt:
Code: Select all
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project( VERSION )
macro (add_target name)
set(default_opt BUILD_DIR=${CMAKE_BINARY_DIR}/${name})
add_custom_target(${name}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND rm -rf compile_commands.json
COMMAND /home/julian/.local/bin/compiledb -n make ${default_opt} ${ARGN}
COMMAND make ${default_opt} ${ARGN})
endmacro()
add_target(masterf7)