diff options
| author | Ivo Popov <[email protected]> | 2021-02-10 00:48:58 -0500 |
|---|---|---|
| committer | Ivo Popov <[email protected]> | 2021-02-10 00:48:58 -0500 |
| commit | c8499c89dbdfec0a50b90130e49ea77df4a3ee98 (patch) | |
| tree | 23159ba960a35bcdfda6ed53d295470b034da43c /examples | |
| parent | a96ee8f1d850bbd645040e0f5d133e6c1c93a3a4 (diff) | |
Set -DCMAKE_BUILD_TYPE=Debug when building in debug for rp2040.
This ensures that the Pico SDK, too, is built in debug mode and with
nice debugging symbols.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rules.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/rules.mk b/examples/rules.mk index 66194dfcc..d248ed247 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -45,6 +45,10 @@ $(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin else ifeq ($(FAMILY),rp2040) +ifeq ($(DEBUG), 1) +CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug +endif + $(BUILD): cmake -S . -B $(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) -DPICO_BUILD_DOCS=0 $(CMAKE_DEFSYM) |
