From f3d7ce0dd3503328f5eb746f61eaf69dade509a3 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 2 May 2020 17:28:43 +0200 Subject: [PATCH] Boot-loader for tests --- USB-IDS | 2 ++ test-bootloader/Makefile | 7 +++++++ test-bootloader/config.h | 24 ++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 test-bootloader/Makefile create mode 100644 test-bootloader/config.h diff --git a/USB-IDS b/USB-IDS index 2dbf2ca..2e3b4bc 100644 --- a/USB-IDS +++ b/USB-IDS @@ -6,5 +6,7 @@ USB IDs used by our gadgets 4242:0004 BSB gateway bootloader 4242:0005 DMX512 interface 4242:0006 DMX512 interface bootloader +4242:0007 Test gadget +4242:0008 Test gadget bootloader cafe:cafe KSP Space Alert thermometer cafe:caff KSP Space Alert accelerometer diff --git a/test-bootloader/Makefile b/test-bootloader/Makefile new file mode 100644 index 0000000..f3aeef5 --- /dev/null +++ b/test-bootloader/Makefile @@ -0,0 +1,7 @@ +ROOT=.. +BINARY=bootloader +OBJS= +LIB_OBJS=util-debug.o dfu-bootloader.o +MAX_SIZE=8192 + +include $(ROOT)/mk/bluepill.mk diff --git a/test-bootloader/config.h b/test-bootloader/config.h new file mode 100644 index 0000000..45d0f7a --- /dev/null +++ b/test-bootloader/config.h @@ -0,0 +1,24 @@ +/* + * Test Gadget Bootloader -- Configuration + * + * (c) 2020 Martin Mareš + */ + +// Processor clock + +#define CPU_CLOCK_MHZ 48 + +// Debugging port + +#define DEBUG_USART USART1 +#define DEBUG_LED_BLUEPILL + +// Bootloader settings + +#define BOOTLOADER_DEBUG +#define BOOTLOADER_APP_START 0x08002000 +#define BOOTLOADER_MFG_ID 0x4242 +#define BOOTLOADER_PROD_ID 0x0008 +#define BOOTLOADER_PROD_VERSION 0x0100 +#define BOOTLOADER_MFG_NAME "United Computer Wizards" +#define BOOTLOADER_PROD_NAME "Test Gadget (boot-loader)" -- 2.39.2