Browse Source

Add JGAurora A5S and A1 (STM32F103ZET6) (#14291)

- Now compiles and works correctly with changes to HAL timers and watchdog.
- Does NOT include awesome work on touch screen function.
- Does have working LCD and SD-based EEPROM.
pinchies 5 years ago
parent
commit
3021097888

+ 1
- 0
Marlin/src/core/boards.h View File

247
 #define BOARD_MORPHEUS         1806   // STM32F103C8/STM32F103CB Libmaple based stm32f1 controller
247
 #define BOARD_MORPHEUS         1806   // STM32F103C8/STM32F103CB Libmaple based stm32f1 controller
248
 #define BOARD_MKS_ROBIN        1808   // MKS Robin / STM32F103ZET6
248
 #define BOARD_MKS_ROBIN        1808   // MKS Robin / STM32F103ZET6
249
 #define BOARD_BIGTREE_SKR_MINI_V1_1 1814 // STM32F103RC
249
 #define BOARD_BIGTREE_SKR_MINI_V1_1 1814 // STM32F103RC
250
+#define BOARD_JGAURORA_A5S_A1  1810   // JGAurora A5S A1 / STM32F103ZET6
250
 
251
 
251
 //
252
 //
252
 // STM32 ARM Cortex-M4F
253
 // STM32 ARM Cortex-M4F

+ 2
- 0
Marlin/src/pins/pins.h View File

428
   #include "pins_MORPHEUS.h"          // STM32F1                                    env:STM32F1
428
   #include "pins_MORPHEUS.h"          // STM32F1                                    env:STM32F1
429
 #elif MB(MKS_ROBIN)
429
 #elif MB(MKS_ROBIN)
430
   #include "pins_MKS_ROBIN.h"         // STM32F1                                    env:mks_robin
430
   #include "pins_MKS_ROBIN.h"         // STM32F1                                    env:mks_robin
431
+#elif MB(JGAURORA_A5S_A1)
432
+  #include "pins_JGAURORA_A5S_A1.h"   // STM32F1                                    env:JGAURORA_A5S_A1
431
 
433
 
432
 //
434
 //
433
 // STM32 ARM Cortex-M4F
435
 // STM32 ARM Cortex-M4F

+ 125
- 0
Marlin/src/pins/pins_JGAURORA_A5S_A1.h View File

1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+ /**
24
+  * 2017 Victor Perez Marlin for stm32f1 test
25
+  * 2018 Modified by Pablo Crespo for Morpheus Board (https://github.com/pscrespo/Morpheus-STM32)
26
+  * 2019 Modified by Roberto Mariani & Samuel Pinches for JGAurora A5S & A1 Board.
27
+  */
28
+
29
+/**
30
+ * JGAurora A5S A1 Board pin assignments
31
+ */
32
+
33
+#ifndef __STM32F1__
34
+  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
35
+#endif
36
+
37
+#define BOARD_NAME "JGAurora A5S A1 board"
38
+
39
+// #define STM32_XL_DENSITY // required, but should be set by platformio flags, not here! (why? not sure.)
40
+
41
+//#define MCU_STM32F103ZE // not yet required
42
+
43
+// // I2C EEPROM with 64K of space - AT24C64
44
+// #define I2C_EEPROM
45
+// #define E2END 0x7FFF
46
+
47
+// Enable EEPROM Emulation for this board
48
+
49
+//#define FLASH_EEPROM_EMULATION 1
50
+//#define E2END  0xFFF //((uint32)(EEPROM_START_ADDRESS + EEPROM_PAGE_SIZE + EEPROM_PAGE_SIZE)) // 	 not 0xFFF
51
+//#define EEPROM_CHITCHAT
52
+//#define DEBUG_EEPROM_READWRITE
53
+
54
+//
55
+// Limit Switches
56
+//
57
+#define X_STOP_PIN         PC6
58
+#define Y_STOP_PIN         PG8
59
+#define Z_STOP_PIN         PG7
60
+
61
+//
62
+// Steppers
63
+//
64
+#define X_STEP_PIN         PD6
65
+#define X_DIR_PIN          PD3
66
+#define X_ENABLE_PIN       PG9
67
+
68
+#define Y_STEP_PIN         PG12
69
+#define Y_DIR_PIN          PG11
70
+#define Y_ENABLE_PIN       PG13
71
+
72
+#define Z_STEP_PIN         PG15
73
+#define Z_DIR_PIN          PG14
74
+#define Z_ENABLE_PIN       PB8
75
+
76
+#define E0_STEP_PIN        PE2
77
+#define E0_DIR_PIN         PB9
78
+#define E0_ENABLE_PIN      PE3
79
+
80
+#define E1_STEP_PIN        PE5
81
+#define E1_DIR_PIN         PE4
82
+#define E1_ENABLE_PIN      PE6
83
+
84
+//
85
+// Temperature Sensors
86
+//
87
+#define TEMP_0_PIN         PC2
88
+#define TEMP_BED_PIN       PC1
89
+
90
+//
91
+// Heaters / Fans
92
+//
93
+#define HEATER_0_PIN       PA2
94
+#define HEATER_BED_PIN     PA3
95
+
96
+#define FAN_PIN            PA1
97
+
98
+#define PS_ON_PIN          PA0
99
+#define FIL_RUNOUT_PIN     PC7
100
+
101
+//
102
+// LCD
103
+//
104
+#define LCD_BACKLIGHT_PIN  PF11
105
+#define FSMC_CS_PIN        PD7
106
+#define FSMC_RS_PIN        PG0
107
+
108
+//
109
+// SD Card
110
+//
111
+#define SD_DETECT_PIN      PF10
112
+
113
+//
114
+// Misc.
115
+//
116
+#define BEEPER_PIN         PC3    // use PB7 to shut up if desired
117
+#define LED_PIN            PC13
118
+
119
+// Touch support
120
+#define BTN_ENC            PA11   // Real pin is needed to enable encoder's push button functionality used by touch screen. PA11 gives stable value.
121
+
122
+#define TOUCH_CS           PA4
123
+//#define TOUCH_INTERRUPT    PC4    // Not yet implemented
124
+
125
+#define NO_PAUSE_AFTER_PRINT

+ 14
- 0
buildroot/share/PlatformIO/ldscripts/jgaurora_a5s_a1.ld View File

1
+MEMORY
2
+{
3
+  ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 64K - 3K
4
+  rom (rx)  : ORIGIN = 0x0800A000, LENGTH = 512K - 40K
5
+}
6
+
7
+/* Provide memory region aliases for common.inc */
8
+REGION_ALIAS("REGION_TEXT", rom);
9
+REGION_ALIAS("REGION_DATA", ram);
10
+REGION_ALIAS("REGION_BSS", ram);
11
+REGION_ALIAS("REGION_RODATA", rom);
12
+
13
+/* Let common.inc handle the real work. */
14
+INCLUDE common.inc

+ 43
- 0
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py View File

1
+Import("env")
2
+
3
+# Relocate firmware from 0x08000000 to 0x0800A000
4
+env['CPPDEFINES'].remove(("VECT_TAB_ADDR", "0x8000000")) 
5
+#alternatively, for STSTM <=5.1.0 use line below
6
+#env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728))
7
+env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x0800A000"))
8
+env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/jgaurora_a5s_a1.ld")
9
+
10
+#append ${PROGNAME}.bin firmware after bootloader and save it as 'jgaurora_firmware.bin'
11
+def addboot(source,target,env):
12
+	import os	
13
+
14
+	firmware = open(target[0].path, "rb")
15
+	lengthfirmware = os.path.getsize(target[0].path)
16
+	bootloader_dir = "buildroot/share/PlatformIO/scripts/jgaurora_bootloader.bin"
17
+	bootloader = open(bootloader_dir, "rb")
18
+	lengthbootloader = os.path.getsize(bootloader_dir)
19
+	firmware_with_boothloader_dir = target[0].dir.path +'/firmware_with_bootloader.bin'
20
+	if os.path.exists(firmware_with_boothloader_dir):
21
+		os.remove(firmware_with_boothloader_dir)
22
+	firmwareimage = open(firmware_with_boothloader_dir, "wb")
23
+	position = 0
24
+	while position < lengthbootloader:
25
+		byte = bootloader.read(1)
26
+		firmwareimage.write(byte)
27
+		position += 1
28
+	position = 0
29
+	while position < lengthfirmware:
30
+		byte = firmware.read(1)
31
+		firmwareimage.write(byte)
32
+		position += 1	
33
+	bootloader.close()
34
+	firmware.close()
35
+	firmwareimage.close()
36
+	firmware_without_bootloader_dir = target[0].dir.path+'/firmware_for_sd_upload.bin'
37
+	if os.path.exists(firmware_without_bootloader_dir):
38
+		os.remove(firmware_without_bootloader_dir)
39
+	os.rename(target[0].path, firmware_without_bootloader_dir)
40
+	#os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin') 
41
+
42
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", addboot);
43
+

BIN
buildroot/share/PlatformIO/scripts/jgaurora_bootloader.bin View File


+ 2147
- 0
config/examples/JGAurora/A1/Configuration.h
File diff suppressed because it is too large
View File


+ 2514
- 0
config/examples/JGAurora/A1/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 2147
- 0
config/examples/JGAurora/A5S/Configuration.h
File diff suppressed because it is too large
View File


+ 2514
- 0
config/examples/JGAurora/A5S/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 22
- 0
platformio.ini View File

350
   U8glib-HAL
350
   U8glib-HAL
351
 
351
 
352
 #
352
 #
353
+# JGAurora A5S A1 (STM32F103ZET6)
354
+#
355
+[env:JGAURORA_A5S_A1]
356
+platform      = ststm32@5.3.0
357
+framework     = arduino
358
+board         = genericSTM32F103ZE
359
+extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
360
+build_flags   = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py
361
+  ${common.build_flags} -DSTM32_XL_DENSITY
362
+src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
363
+lib_deps      = ${common.lib_deps}
364
+lib_ignore    = c1921b4
365
+  libf3c
366
+  lib066
367
+  Adafruit NeoPixel_ID28
368
+  Adafruit NeoPixel
369
+  libf3e
370
+  TMC26XStepper
371
+lib_ldf_mode  = 1
372
+monitor_speed = 250000
373
+
374
+#
353
 # STM32F407VET6 with RAMPS-like shield
375
 # STM32F407VET6 with RAMPS-like shield
354
 # 'Black' STM32F407VET6 board - http://wiki.stm32duino.com/index.php?title=STM32F407
376
 # 'Black' STM32F407VET6 board - http://wiki.stm32duino.com/index.php?title=STM32F407
355
 # Shield - https://github.com/jmz52/Hardware
377
 # Shield - https://github.com/jmz52/Hardware

Loading…
Cancel
Save