diff --git a/arch/cpu/arm/Makefile.arm b/arch/cpu/arm/Makefile.arm index 285031e82..83f9b8a36 100644 --- a/arch/cpu/arm/Makefile.arm +++ b/arch/cpu/arm/Makefile.arm @@ -29,10 +29,17 @@ else CFLAGS += -O2 endif -### Use CMSIS and the existing dbg-io from arch/cpu/arm/common -CONTIKI_ARM_DIRS += . common/dbg-io +### Use CMSIS from arch/cpu/arm/common +CONTIKI_ARM_DIRS += . CONTIKI_CPU_DIRS += $(addprefix ../arm/, $(CONTIKI_ARM_DIRS)) +### Default to use os/lib/dbg-io unless configured to do otherwise +MAKE_WITH_LIB_DBG_IO ?= 1 + +ifeq ($(MAKE_WITH_LIB_DBG_IO),1) + MODULES += os/lib/dbg-io +endif + ### CPU-dependent cleanup files CLEAN += *.elf *.bin *.lst *.hex *.i16hex diff --git a/arch/cpu/cc2538/Makefile.cc2538 b/arch/cpu/cc2538/Makefile.cc2538 index 891215093..51a5c40c7 100644 --- a/arch/cpu/cc2538/Makefile.cc2538 +++ b/arch/cpu/cc2538/Makefile.cc2538 @@ -28,8 +28,6 @@ CONTIKI_CPU_SOURCEFILES += slip-arch.c slip.c CONTIKI_CPU_SOURCEFILES += i2c.c cc2538-temp-sensor.c vdd3-sensor.c CONTIKI_CPU_SOURCEFILES += cfs-coffee.c cfs-coffee-arch.c pwm.c -MODULES += os/lib/dbg-io - USB_SOURCEFILES += usb-core.c cdc-acm.c usb-arch.c usb-serial.c cdc-acm-descriptors.c CPU_START_SOURCEFILES = startup-gcc.c diff --git a/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx b/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx index f54a8d72d..00f9ae232 100644 --- a/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx +++ b/arch/cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx @@ -45,8 +45,6 @@ CONTIKI_CPU_SOURCEFILES += ble-cc2650.c ble-hal-cc26xx.c ble-addr.c rf-ble-cmd.c CONTIKI_CPU_SOURCEFILES += random.c soc-trng.c int-master.c CONTIKI_CPU_SOURCEFILES += spi-arch.c -MODULES += os/lib/dbg-io - CONTIKI_SOURCEFILES += $(CONTIKI_CPU_SOURCEFILES) CPU_START_SOURCEFILES += fault-handlers.c $(TI_XXWARE_STARTUP_SRCS) diff --git a/arch/cpu/simplelink-cc13xx-cc26xx/Makefile.cc13xx-cc26xx b/arch/cpu/simplelink-cc13xx-cc26xx/Makefile.cc13xx-cc26xx index 3eb11182d..dfd14637e 100644 --- a/arch/cpu/simplelink-cc13xx-cc26xx/Makefile.cc13xx-cc26xx +++ b/arch/cpu/simplelink-cc13xx-cc26xx/Makefile.cc13xx-cc26xx @@ -91,9 +91,6 @@ SDK_DEVICES := $(CORE_SDK)/source/ti/devices/$(SDK_DEVICES_NAME) EXTERNALDIRS += $(SDK_SOURCE) $(SDK_NORTOS) -# CPU-dependent debug source files -MODULES += os/lib/dbg-io - # CPU-dependent directories CONTIKI_CPU_DIRS += . dev $(SUBFAMILY) CONTIKI_CPU_DIRS += rf rf-settings rf-settings/$(DEVICE_FAMILY_LC) diff --git a/arch/platform/jn516x/Makefile.jn516x b/arch/platform/jn516x/Makefile.jn516x index 6cff59c65..9ad9488d5 100644 --- a/arch/platform/jn516x/Makefile.jn516x +++ b/arch/platform/jn516x/Makefile.jn516x @@ -103,8 +103,6 @@ endif CONTIKI_TARGET_DIRS = . dev CONTIKI_TARGET_MAIN = platform.c -MODULES += os/lib/dbg-io - ifeq ($(JN516x_WITH_DR1175),1) JN516x_WITH_DR1174 = 1 CFLAGS += -DSENSOR_BOARD_DR1175 diff --git a/arch/platform/nrf52dk/Makefile.nrf52dk b/arch/platform/nrf52dk/Makefile.nrf52dk index 7e931880a..e1d56c090 100644 --- a/arch/platform/nrf52dk/Makefile.nrf52dk +++ b/arch/platform/nrf52dk/Makefile.nrf52dk @@ -9,12 +9,12 @@ CONTIKI_TARGET_DIRS += . dev config CONTIKI_SOURCEFILES += platform.c leds-arch.c nrf52dk-sensors.c button-sensor.c temperature-sensor.c ifeq ($(NRF52_USE_RTT),1) -### Use the existing debug I/O in arch/cpu/arm/common +### Suppress the existing debug I/O in os/lib +MAKE_WITH_LIB_DBG_IO = 0 CONTIKI_TARGET_DIRS += rtt CONTIKI_SOURCEFILES += rtt-printf.c segger-rtt.c segger-rtt-printf.c else CONTIKI_SOURCEFILES += dbg.c -MODULES += os/lib/dbg-io endif ### Unless the example dictates otherwise, build with code size optimisations switched off