🔨 Help for GDB remote debugging
This commit is contained in:
committed by
Scott Lahteine
parent
5a0166489e
commit
5cbb820e29
@ -29,10 +29,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
|
||||
#
|
||||
# Tested with Linux (Mint 20) : gcc [9.3.0, 10.2.0]: libsdl2-dev[2.0.10], libsdl2-net-dev[2.0.1], libglm-dev[0.9.9.7, 0.9.9.8]
|
||||
#
|
||||
# Debugging with gdb in vscode is as easy as adding the launch task as usual, but platformio
|
||||
# will randomly remove your task when it recreates its tasks from a template. Add your gdb
|
||||
# launch task to '~/.platformio/penv/lib/python{PYTHON_VERSION}/site-packages/platformio/ide/tpls/vscode/.vscode'
|
||||
# to avoid this until platformio updates.
|
||||
# For VSCode debugging see buildroot/share/PlatformIO/debugging/launch.json
|
||||
#
|
||||
[simulator_common]
|
||||
platform = native
|
||||
@ -43,7 +40,6 @@ release_flags = -g0 -O3 -flto
|
||||
debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
|
||||
lib_compat_mode = off
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/NATIVE_SIM>
|
||||
|
||||
lib_deps = ${common.lib_deps}
|
||||
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/master.zip
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip
|
||||
@ -51,7 +47,6 @@ lib_deps = ${common.lib_deps}
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/simulator.py
|
||||
|
||||
|
||||
[simulator_linux]
|
||||
extends = simulator_common
|
||||
build_flags = ${simulator_common.build_flags} -ldl -lpthread -lSDL2 -lSDL2_net -lGL
|
||||
@ -84,17 +79,6 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
|
||||
# Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
|
||||
# If Xcode is installed be sure to run `xcode-select --install` first.
|
||||
#
|
||||
# For VSCode debugging paste the block below near the top of launch.json.
|
||||
# NOTE: The PlatformIO VSCode extension will remove it when regenerating launch.json.
|
||||
#
|
||||
# { "name": "Debug Sim",
|
||||
# "type": "cppdbg",
|
||||
# "request": "launch",
|
||||
# "program": "${workspaceFolder}/.pio/build/simulator_macos/MarlinSimulator",
|
||||
# "miDebuggerPath": "/opt/local/bin/ggdb",
|
||||
# "MIMode": "gdb",
|
||||
# "cwd": "${workspaceFolder}/.pio/build/simulator_macos" },
|
||||
#
|
||||
[simulator_macos]
|
||||
build_unflags = -lGL
|
||||
custom_verbose = 0
|
||||
|
Reference in New Issue
Block a user