Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ target_compile_definitions (debugprobe PRIVATE
PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1
)

set(DEBUG_PROBE_BOARD "debug_probe" CACHE STRING "Debug Probe board to build for")

option (DEBUG_ON_PICO "Compile firmware for the Pico instead of Debug Probe" OFF)
if (DEBUG_ON_PICO)
target_compile_definitions (debugprobe PRIVATE
Expand All @@ -79,6 +81,10 @@ if (DEBUG_ON_PICO)
else ()
message(SEND_ERROR "Unsupported board ${PICO_BOARD}")
endif ()
else ()
target_compile_definitions(debugprobe PRIVATE
BOARD_CONFIG_HEADER=\"board_${DEBUG_PROBE_BOARD}_config.h\"
)
endif ()


Expand Down
2 changes: 1 addition & 1 deletion src/probe_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ do { \
#ifdef DEBUG_ON_PICO
#include "board_pico_config.h"
#else
#include "board_debug_probe_config.h"
#include BOARD_CONFIG_HEADER
#endif
//#include "board_example_config.h"

Expand Down