]> git.earman.xyz Git - sensor-watch.git/commitdiff
add tinyusb as a git submodule
authorWillian Paixao <willian@ufpa.br>
Sun, 5 Dec 2021 18:35:29 +0000 (19:35 +0100)
committerWillian Paixao <willian@ufpa.br>
Sun, 5 Dec 2021 18:35:29 +0000 (19:35 +0100)
.gitmodules [new file with mode: 0644]
rules.mk
tinyusb [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..89e424a
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "tinyusb"]
+       path = tinyusb
+       url = https://github.com/hathach/tinyusb.git
index cc442f674cede5f951f61787082dc4495b33dd9a..d993404ab543a603e688c3e13e57ee8eea65d686 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -2,7 +2,9 @@ CFLAGS += $(INCLUDES) $(DEFINES)
 
 OBJS = $(addprefix $(BUILD)/, $(notdir %/$(subst .c,.o, $(SRCS))))
 
-all: directory $(BUILD)/$(BIN).elf $(BUILD)/$(BIN).hex $(BUILD)/$(BIN).bin $(BUILD)/$(BIN).uf2 size
+SUBMODULES = tinyusb
+
+all: directory $(SUBMODULES) $(BUILD)/$(BIN).elf $(BUILD)/$(BIN).hex $(BUILD)/$(BIN).bin $(BUILD)/$(BIN).uf2 size
 
 $(BUILD)/$(BIN).elf: $(OBJS)
        @echo LD $@
@@ -20,6 +22,9 @@ $(BUILD)/$(BIN).uf2: $(BUILD)/$(BIN).bin
        @echo UF2CONV $@
        @$(UF2) $^ -co $@
 
+$(SUBMODULES):
+       git submodule update --init --recursive
+
 install:
        @$(UF2) -D $(BUILD)/$(BIN).uf2
 
diff --git a/tinyusb b/tinyusb
new file mode 160000 (submodule)
index 0000000..f8288be
--- /dev/null
+++ b/tinyusb
@@ -0,0 +1 @@
+Subproject commit f8288be03f28ad7b944e6925f49422dfa39202c5