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.
This commit is contained in:
Ivo Popov 2021-02-10 00:48:58 -05:00
parent a96ee8f1d8
commit c8499c89db
1 changed files with 4 additions and 0 deletions

View File

@ -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)