From 121b8c3e4683832f71515c93db6e9395c1a096c8 Mon Sep 17 00:00:00 2001 From: Henny022p Date: Tue, 7 Jan 2025 22:55:46 +0100 Subject: [PATCH 1/6] introduce AGBCC_PATH config variable --- GBA.mk | 6 +++--- Toolchain.mk | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/GBA.mk b/GBA.mk index 87048ef9..9039bd8a 100644 --- a/GBA.mk +++ b/GBA.mk @@ -95,7 +95,7 @@ $(BUILD_DIR)/%.o: %.s $$(deps) $(ENUM_ASM_HEADERS) $(BUILD_DIR)/enum_include/%.inc: include/%.h @mkdir -p $(dir $@) - $(ENUM_PROCESSOR) $< $(CC) "-D__attribute__(x)=" "-D$(GAME_VERSION)" "-E" "-nostdinc" "-Itools/agbcc" "-Itools/agbcc/include" "-iquote include" > $@ + $(ENUM_PROCESSOR) $< $(CC) "-D__attribute__(x)=" "-D$(GAME_VERSION)" "-E" "-nostdinc" "-I$(AGBCC_PATH)" "-I$(AGBCC_PATH)/include" "-iquote include" > $@ # ============= # build C files @@ -103,7 +103,7 @@ $(BUILD_DIR)/enum_include/%.inc: include/%.h # agbcc includes are separate because we don't want dependency scanning on them CINCLUDE := -I include -I $(BUILD_DIR) -CPPFLAGS := -I tools/agbcc -I tools/agbcc/include $(CINCLUDE) -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE) +CPPFLAGS := -I $(AGBCC_PATH) -I $(AGBCC_PATH)/include $(CINCLUDE) -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE) CFLAGS := -O2 -Wimplicit -Wparentheses -Werror -Wno-multichar -g3 interwork := $(BUILD_DIR)/src/interrupts.o \ @@ -131,7 +131,7 @@ $(BUILD_DIR)/%.o : %.c $$(deps) # ============== LDFLAGS = -Map ../../$(BUILD_DIR)/$(BUILD_NAME).map -LIB := -L ../../tools/agbcc/lib -lc +LIB := -L $(AGBCC_PATH)/lib -lc $(ROM): $(ELF) $(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@ diff --git a/Toolchain.mk b/Toolchain.mk index 76e2a871..8c695da4 100644 --- a/Toolchain.mk +++ b/Toolchain.mk @@ -28,7 +28,9 @@ OBJCOPY := $(TOOLCHAIN_PATH)arm-none-eabi-objcopy # custom tools # ============ -CC1 := tools/agbcc/bin/agbcc +AGBCC_PATH ?= $(shell pwd)/tools/agbcc + +CC1 := $(AGBCC_PATH)/bin/agbcc SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c SCANINC := tools/bin/scaninc From cc06c58fb48253bcad3507ddd99620713e2e4efe Mon Sep 17 00:00:00 2001 From: Henny022p Date: Tue, 7 Jan 2025 22:55:58 +0100 Subject: [PATCH 2/6] add basic devcontainer setup --- .devcontainer/Containerfile | 21 +++++++++++++++++++++ .devcontainer/devcontainer.json | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 .devcontainer/Containerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile new file mode 100644 index 00000000..48fd6bae --- /dev/null +++ b/.devcontainer/Containerfile @@ -0,0 +1,21 @@ +FROM debian + +RUN apt update && apt upgrade && apt install -y --no-install-recommends \ + cmake \ + g++ \ + gcc \ + gcc-arm-none-eabi \ + libpng-dev \ + make \ + python3 \ + python3-pycparser \ + && rm -rf /var/lib/apt/lists/* + +ADD https://github.com/pret/agbcc.git /agbcc + +RUN cd /agbcc && \ + ./build.sh && \ + mkdir -p /agbcc-install && \ + ./install.sh /agbcc-install + +ENV AGBCC_PATH=/agbcc-install/tools/agbcc diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..52cc931e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,6 @@ +{ + "name": "zeldaret/tmc-dev", + "build": { + "dockerfile": "Containerfile" + } +} \ No newline at end of file From 40f67283ef32272a11eebe6f8ed76cd51d889217 Mon Sep 17 00:00:00 2001 From: Henny022p Date: Wed, 8 Jan 2025 02:38:41 +0100 Subject: [PATCH 3/6] add git to devcontainer --- .devcontainer/Containerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index 48fd6bae..7d023e77 100644 --- a/.devcontainer/Containerfile +++ b/.devcontainer/Containerfile @@ -1,10 +1,12 @@ FROM debian RUN apt update && apt upgrade && apt install -y --no-install-recommends \ + ca-certificates \ cmake \ g++ \ gcc \ gcc-arm-none-eabi \ + git \ libpng-dev \ make \ python3 \ From b833926d9b10575caee2d9ec64739824923ba096 Mon Sep 17 00:00:00 2001 From: Henny022p Date: Sun, 12 Jan 2025 02:17:42 +0000 Subject: [PATCH 4/6] add ssh-client to the devcontainer to allow git over ssh --- .devcontainer/Containerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index 7d023e77..d54e2f39 100644 --- a/.devcontainer/Containerfile +++ b/.devcontainer/Containerfile @@ -11,6 +11,7 @@ RUN apt update && apt upgrade && apt install -y --no-install-recommends \ make \ python3 \ python3-pycparser \ + ssh-client \ && rm -rf /var/lib/apt/lists/* ADD https://github.com/pret/agbcc.git /agbcc From 9ac014c5b0c27391778bba572012e82781844b81 Mon Sep 17 00:00:00 2001 From: Henny022p Date: Sun, 2 Mar 2025 16:28:09 +0100 Subject: [PATCH 5/6] use RUN instead of ADD to get agbcc --- .devcontainer/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index d54e2f39..34a25ca2 100644 --- a/.devcontainer/Containerfile +++ b/.devcontainer/Containerfile @@ -14,7 +14,7 @@ RUN apt update && apt upgrade && apt install -y --no-install-recommends \ ssh-client \ && rm -rf /var/lib/apt/lists/* -ADD https://github.com/pret/agbcc.git /agbcc +RUN git clone https://github.com/pret/agbcc.git /agbcc RUN cd /agbcc && \ ./build.sh && \ From 4aac8d88d2d91ba4391a7c9037e3ad1de47d3e89 Mon Sep 17 00:00:00 2001 From: Henny022p Date: Sun, 2 Mar 2025 16:43:53 +0100 Subject: [PATCH 6/6] confirm apt upgrade command --- .devcontainer/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index 34a25ca2..da259837 100644 --- a/.devcontainer/Containerfile +++ b/.devcontainer/Containerfile @@ -1,6 +1,6 @@ FROM debian -RUN apt update && apt upgrade && apt install -y --no-install-recommends \ +RUN apt update && apt upgrade -y && apt install -y --no-install-recommends \ ca-certificates \ cmake \ g++ \