Skip to content

Commit efb7b47

Browse files
Added untested FrankenMaple build target and binary
1 parent acb87b7 commit efb7b47

File tree

4 files changed

+18
-122
lines changed

4 files changed

+18
-122
lines changed

GD32F1/Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ ELFSIZE = $(SIZE) -A $(TARGET).elf
114114
all: begin gccversion build sizeafter finished end
115115

116116
generic-pc13: begin gccversion build_generic-pc13 sizeafter finished copy_generic-pc13 end
117-
117+
frankenmaple: begin gccversion build_frankenmaple sizeafter finished copy_frankenmaple end
118118

119119
build: elf bin lss sym
120120

@@ -131,6 +131,16 @@ copy_generic-pc13:
131131
cp $(TARGET).bin binaries/generic_boot20_pc13.bin
132132
@echo
133133

134+
build_frankenmaple: TARGETFLAGS= -DTARGET_FRANKENMAPLE
135+
# Set the linker script
136+
build_frankenmaple: LDFLAGS +=-T$(ST_LIB)/c_only_md_high_density.ld
137+
build_frankenmaple: elf bin lss sym
138+
copy_frankenmaple:
139+
@echo
140+
@echo "Copying to binaries folder"
141+
@echo
142+
cp $(TARGET).bin binaries/frankenmaple.bin
143+
@echo
134144

135145

136146
bin: $(TARGET).bin

GD32F1/binaries/frankenmaple.bin

6.83 KB
Binary file not shown.

GD32F1/config.h

Lines changed: 7 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -89,59 +89,26 @@
8989
#define BUTTON_PRESSED_STATE 1
9090
*/
9191

92-
#if defined TARGET_MAPLE_MINI
92+
#if defined TARGET_FRANKENMAPLE
9393

9494
#define HAS_MAPLE_HARDWARE 1
9595

96-
#define LED_BANK GPIOB
97-
#define LED_PIN 1
96+
#define LED_BANK GPIOC
97+
#define LED_PIN 13
9898
#define LED_ON_STATE 1
9999

100-
/* On the Mini, BUT is PB8 */
100+
101+
/*
101102
#define BUTTON_BANK GPIOB
102103
#define BUTTON_PIN 8
103104
#define BUTTON_PRESSED_STATE 1
105+
*/
104106

105107
/* USB Disc Pin Setup. USB DISC is PB9 */
106108
#define USB_DISC_BANK GPIOB
107109
#define USB_DISC 9
108110

109-
#elif defined TARGET_MAPLE_REV3
110-
111-
#warning "Target MAPLE_REV3"
112-
113-
// Flag that this type of board has the custom maple disconnect hardware
114-
#define HAS_MAPLE_HARDWARE 1
115-
116-
#define LED_BANK GPIOB
117-
#define LED_PIN 1
118-
#define LED_ON_STATE 1
119-
120-
#define BUTTON_BANK GPIOB
121-
#define BUTTON_PIN 8
122-
#define BUTTON_PRESSED_STATE 1
123-
124-
/* USB Disc Pin Setup. USB DISC is PB9 */
125-
#define USB_DISC_BANK GPIOB
126-
#define USB_DISC 9
127-
128-
#elif defined TARGET_MAPLE_REV5
129111

130-
// Flag that this type of board has the custom maple disconnect hardware
131-
#define HAS_MAPLE_HARDWARE 1
132-
133-
#define LED_BANK GPIOA
134-
#define LED_PIN 5
135-
#define LED_ON_STATE 0
136-
137-
/* On the Mini, BUT is PB8 */
138-
#define BUTTON_BANK GPIOC
139-
#define BUTTON_PIN 9
140-
141-
/* USB Disc Pin Setup. USB DISC is PB9 */
142-
#define USB_DISC_BANK GPIOB
143-
#define USB_DISC 9
144-
145112
#elif defined TARGET_GENERIC_F103_PC13
146113

147114
#define LED_BANK GPIOC
@@ -153,69 +120,7 @@
153120
// #define BUTTON_BANK GPIOC
154121
// #define BUTTON_PIN 14
155122
// #define BUTTON_PRESSED_STATE 1
156-
157-
158-
#elif defined TARGET_GENERIC_F103_PG15
159-
160-
#define LED_BANK GPIOG
161-
#define LED_PIN 15
162-
#define LED_ON_STATE 1
163-
164-
// Button (if you have one)
165-
#define BUTTON_BANK GPIOC
166-
#define BUTTON_PIN 14
167-
#define BUTTON_PRESSED_STATE 1
168-
169-
#elif defined TARGET_GENERIC_F103_PD2
170-
171-
#define LED_BANK GPIOD
172-
#define LED_PIN 2
173-
#define LED_ON_STATE 1
174-
175-
// Button (if you have one)
176-
#define BUTTON_BANK GPIOC
177-
#define BUTTON_PIN 14
178-
#define BUTTON_PRESSED_STATE 1
179-
180-
#elif defined TARGET_GENERIC_F103_PD1
181-
182-
#define LED_BANK GPIOD
183-
#define LED_PIN 1
184-
#define LED_ON_STATE 1
185-
186-
// Button (if you have one)
187-
#define BUTTON_BANK GPIOC
188-
#define BUTTON_PIN 14
189-
#define BUTTON_PRESSED_STATE 1
190-
191-
#elif defined TARGET_GENERIC_F103_PA1
192-
193-
#define LED_BANK GPIOA
194-
#define LED_PIN 1
195-
#define LED_ON_STATE 1
196-
197-
// Button (if you have one)
198-
#define BUTTON_BANK GPIOC
199-
#define BUTTON_PIN 14
200-
#define BUTTON_PRESSED_STATE 1
201-
202-
#elif defined TARGET_GENERIC_F103_PB9
203-
204-
#define LED_BANK GPIOB
205-
#define LED_PIN 9
206-
#define LED_ON_STATE 1
207-
208-
// Button (if you have one)
209-
#define BUTTON_BANK GPIOC
210-
#define BUTTON_PIN 14
211-
#define BUTTON_PRESSED_STATE 1
212-
213-
#elif defined TARGET_GENERIC_F103_PE2
214-
215-
#define LED_BANK GPIOE
216-
#define LED_PIN 2
217-
#define LED_ON_STATE 1
218-
123+
219124
#else
220125
#error "No config for this target"
221126
#endif

GD32F1/make_all.bat

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)