Skip to content

Commit

Permalink
sys/riotboot: move dependency resolution in its own Makefile.dep
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Jun 15, 2023
1 parent 1f4adb2 commit d617d86
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 35 deletions.
36 changes: 1 addition & 35 deletions sys/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -680,42 +680,8 @@ ifneq (,$(filter usbus_msc,$(USEMODULE)))
USEMODULE += mtd_write_page
endif

ifneq (,$(filter riotboot_flashwrite, $(USEMODULE)))
USEMODULE += riotboot_slot
FEATURES_REQUIRED += periph_flashpage
endif

ifneq (,$(filter riotboot_slot, $(USEMODULE)))
USEMODULE += riotboot_hdr
endif

ifneq (,$(filter riotboot_serial, $(USEMODULE)))
FEATURES_REQUIRED += periph_flashpage
FEATURES_REQUIRED += periph_uart
USEMODULE += riotboot_reset
USEMODULE += checksum
endif

ifneq (,$(filter riotboot_reset, $(USEMODULE)))
ifneq (,$(filter riotboot_%, $(USEMODULE)))
USEMODULE += riotboot
USEMODULE += usb_board_reset
endif

ifneq (,$(filter riotboot_hdr, $(USEMODULE)))
USEMODULE += checksum
USEMODULE += riotboot
endif

ifneq (,$(filter riotboot_usb_dfu, $(USEMODULE)))
USEMODULE += usbus_dfu
USEMODULE += riotboot_flashwrite
USEMODULE += ztimer_sec
FEATURES_REQUIRED += no_idle_thread
FEATURES_REQUIRED += periph_pm
endif

ifneq (,$(filter riotboot_tinyusb_dfu, $(USEMODULE)))
USEPKG += tinyusb
endif

ifneq (,$(filter irq_handler,$(USEMODULE)))
Expand Down
35 changes: 35 additions & 0 deletions sys/riotboot/Makefile.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ifneq (,$(filter riotboot_flashwrite, $(USEMODULE)))
USEMODULE += riotboot_slot
FEATURES_REQUIRED += periph_flashpage
endif

ifneq (,$(filter riotboot_slot, $(USEMODULE)))
USEMODULE += riotboot_hdr
endif

ifneq (,$(filter riotboot_serial, $(USEMODULE)))
FEATURES_REQUIRED += periph_flashpage
FEATURES_REQUIRED += periph_uart
USEMODULE += riotboot_reset
USEMODULE += checksum
endif

ifneq (,$(filter riotboot_reset, $(USEMODULE)))
USEMODULE += usb_board_reset
endif

ifneq (,$(filter riotboot_hdr, $(USEMODULE)))
USEMODULE += checksum
endif

ifneq (,$(filter riotboot_usb_dfu, $(USEMODULE)))
USEMODULE += usbus_dfu
USEMODULE += riotboot_flashwrite
USEMODULE += ztimer_sec
FEATURES_REQUIRED += no_idle_thread
FEATURES_REQUIRED += periph_pm
endif

ifneq (,$(filter riotboot_tinyusb_dfu, $(USEMODULE)))
USEPKG += tinyusb
endif

0 comments on commit d617d86

Please sign in to comment.