diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa2f3f9..10e9636 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,4 +18,4 @@ jobs: apt update apt install make gcc sdcc xxd python-is-python3 libjson-c-dev -y - name: Make project - run: make \ No newline at end of file + run: make MACHINE="KP_9000_6XHML_X2" \ No newline at end of file diff --git a/Makefile b/Makefile index a6a2bf5..51a0b29 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,11 @@ SUBDIRSCLEAN=$(addsuffix clean,$(SUBDIRS)) BUILDDIR = output/ VERSION_HEADER := version.h +ifeq ($(MACHINE),) +else + CC_FLAGS += -DMACHINE_$(MACHINE) +endif + all: create_build_dir $(VERSION_HEADER) $(SUBDIRS) $(BUILDDIR)rtlplayground.bin create_build_dir: diff --git a/machine.c b/machine.c index 73a0c7b..d48c2d6 100644 --- a/machine.c +++ b/machine.c @@ -97,6 +97,9 @@ __code const struct machine machine = { LEDS_2G5 | LEDS_LINK | LEDS_ACT }, }, }; + +void machine_custom_init(void) { } + #elif defined MACHINE_KP_9000_9XHML_X __code const struct machine machine = { .machine_name = "keepLink KP-9000-9XHML-X", diff --git a/machine.h b/machine.h index 06a2475..bf5aa0a 100644 --- a/machine.h +++ b/machine.h @@ -9,6 +9,7 @@ // #define MACHINE_KP_9000_6XHML_X2 // #define MACHINE_KP_9000_6XH_X // #define MACHINE_KP_9000_9XH_X_EU +// #define MACHINE_KP_9000_9XHML_X // #define MACHINE_SWGT024_V2_0 // #define MACHINE_HORACO_ZX_SG4T2 // #define MACHINE_TRENDNET_TEG_S562