@@ -101,7 +101,7 @@ endif
101
101
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
102
102
CFLAGS += $(OPTIMIZATION_FLAGS )
103
103
104
- CFLAGS += $(INC ) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS ) $(CFLAGS_MOD ) $(COPT )
104
+ CFLAGS += $(INC ) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS ) $(CFLAGS_MOD ) $(COPT ) -Werror=missing-prototypes
105
105
106
106
# Nordic Softdevice SDK header files contains inline assembler that has
107
107
# broken constraints. As a result the IPA-modref pass, introduced in gcc-11,
@@ -173,25 +173,32 @@ SRC_C += \
173
173
bluetooth/ble_drv.c \
174
174
common-hal/_bleio/bonding.c \
175
175
nrfx/mdk/system_$(MCU_SUB_VARIANT ) .c \
176
+ sd_mutex.c \
177
+
178
+ SRC_PERIPHERALS := \
176
179
peripherals/nrf/cache.c \
177
180
peripherals/nrf/clocks.c \
178
181
peripherals/nrf/$(MCU_CHIP ) /pins.c \
179
182
peripherals/nrf/$(MCU_CHIP ) /power.c \
180
183
peripherals/nrf/nvm.c \
181
184
peripherals/nrf/timers.c \
182
- sd_mutex.c
183
185
186
+ $(patsubst % .c,$(BUILD ) /% .o,$(SRC_PERIPHERALS ) ) : CFLAGS += -Wno-missing-prototypes
187
+
188
+ SRC_C += $(SRC_PERIPHERALS )
184
189
ifneq ($(CIRCUITPY_USB ) ,0)
185
190
# USB source files for nrf52840
186
191
ifeq ($(MCU_SUB_VARIANT ) ,nrf52840)
187
- SRC_C + = \
192
+ SRC_DCD = \
188
193
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c
189
194
endif
190
195
191
196
ifeq ($(MCU_SUB_VARIANT ) ,nrf52833)
192
- SRC_C += \
197
+ SRC_DCD += \
193
198
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c
194
199
endif
200
+ SRC_C += $(SRC_DCD )
201
+ $(patsubst % .c,$(BUILD ) /% .o,$(SRC_DCD ) ) : CFLAGS += -Wno-missing-prototypes
195
202
endif # CIRCUITPY_USB
196
203
197
204
SRC_COMMON_HAL_EXPANDED = $(addprefix shared-bindings/, $(SRC_COMMON_HAL ) ) \
0 commit comments