This is a fork from the SystemC-linked GDB server from Embecosm.
It was modified to support more generic targets (e.g. MSP430, Cortex M0), using a C++ interface, and to remove the dependency on SystemC.
Install gabime/spdlog, e.g. by running:
git clone https://github.com/gabime/spdlog.git
cd spdlog && mkdir build && cd build
cmake .. && make -j
sudo make install
git clone https://github.com/UoS-EEC/gdb-server.git
cd gdb-server && mkdir build && cd build
cmake .. && make -j
sudo make install
Add the following to your CMakeLists.txt
file:
find_package(gdb-server REQUIRED)
# ...
target_link_libraries(myProject ... gdb-server::gdb-server)
Include the header in your source .cpp
file:
#include <gdb-server/GdbServer.hpp>
#include <chrono>
#include <thread>
#include <gdb-server/GdbServer.hpp>
// ...
GdbServer gdbServer(/*Simulation controller =*/&simCrtl, /*tcp port=*/51000);
std::thread gdbThread(&GdbServer::serverThread, gdbServer);
// ...