Skip to content

Commit d414c13

Browse files
add genesis v1.8 build
1 parent b064fb1 commit d414c13

File tree

6 files changed

+61
-12
lines changed

6 files changed

+61
-12
lines changed

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@ jobs:
4545
command: make dep_core dep_Servo dep_SPI dep_EEPROM target_farmduino_k15 remove_temp
4646
when: always
4747
- run:
48-
name: Compile Genesis v1.6 (FARMDUINO_V32)
48+
name: Compile Genesis v1.6 (FARMDUINO_V32 K16)
4949
command: make dep_core dep_Servo dep_SPI dep_EEPROM target_farmduino_k16 remove_temp
5050
when: always
5151
- run:
5252
name: Compile Genesis v1.7 (FARMDUINO_V32 K17)
5353
command: make dep_core dep_Servo dep_SPI dep_EEPROM target_farmduino_k17 remove_temp
5454
when: always
55+
- run:
56+
name: Compile Genesis v1.8 (FARMDUINO_V32 K18)
57+
command: make dep_core dep_Servo dep_SPI dep_EEPROM target_farmduino_k18 remove_temp
58+
when: always
5559
- run:
5660
name: Compile Express v1.0 (FARMDUINO_EXP_V20)
5761
command: make dep_core dep_Servo dep_SPI dep_EEPROM target_express_k10 remove_temp

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ include lib/targets/farmduino_k14.Makefile
4949
include lib/targets/farmduino_k15.Makefile
5050
include lib/targets/farmduino_k16.Makefile
5151
include lib/targets/farmduino_k17.Makefile
52+
include lib/targets/farmduino_k18.Makefile
5253
include lib/targets/express_k10.Makefile
5354
include lib/targets/express_k11.Makefile
5455
include lib/targets/express_k12.Makefile
@@ -64,6 +65,7 @@ include lib/targets/express_k12.Makefile
6465
target_farmduino_k15 target_farmduino_k15_clean \
6566
target_farmduino_k16 target_farmduino_k16_clean \
6667
target_farmduino_k17 target_farmduino_k17_clean \
68+
target_farmduino_k18 target_farmduino_k18_clean \
6769
target_express_k10 target_express_k10_clean \
6870
target_express_k11 target_express_k11_clean
6971
target_express_k12 target_express_k12_clean
@@ -79,6 +81,7 @@ all: $(BIN_DIR) $(DEPS) \
7981
target_farmduino_k15 \
8082
target_farmduino_k16 \
8183
target_farmduino_k17 \
84+
target_farmduino_k18 \
8285
target_express_k10 \
8386
target_express_k11 \
8487
target_express_k12 \
@@ -91,6 +94,7 @@ clean: remove_temp \
9194
target_farmduino_k15_clean \
9295
target_farmduino_k16_clean \
9396
target_farmduino_k17_clean \
97+
target_farmduino_k18_clean \
9498
target_express_k10_clean \
9599
target_express_k1_clean \
96100
target_express_k12_clean
@@ -102,6 +106,7 @@ strings_test: all
102106
$(OBJ_COPY) -I ihex $(TARGET_farmduino_k15_HEX) -O binary $(TARGET_farmduino_k15_HEX).bin
103107
$(OBJ_COPY) -I ihex $(TARGET_farmduino_k16_HEX) -O binary $(TARGET_farmduino_k16_HEX).bin
104108
$(OBJ_COPY) -I ihex $(TARGET_farmduino_k17_HEX) -O binary $(TARGET_farmduino_k17_HEX).bin
109+
$(OBJ_COPY) -I ihex $(TARGET_farmduino_k18_HEX) -O binary $(TARGET_farmduino_k18_HEX).bin
105110
$(OBJ_COPY) -I ihex $(TARGET_express_k10_HEX) -O binary $(TARGET_express_k10_HEX).bin
106111
$(OBJ_COPY) -I ihex $(TARGET_express_k11_HEX) -O binary $(TARGET_express_k11_HEX).bin
107112
$(OBJ_COPY) -I ihex $(TARGET_express_k12_HEX) -O binary $(TARGET_express_k12_HEX).bin
@@ -111,6 +116,7 @@ strings_test: all
111116
@strings $(TARGET_farmduino_k15_HEX).bin | grep -q ".H.genesisK15"
112117
@strings $(TARGET_farmduino_k16_HEX).bin | grep -q ".I.genesisK16"
113118
@strings $(TARGET_farmduino_k17_HEX).bin | grep -q ".J.genesisK17"
119+
@strings $(TARGET_farmduino_k18_HEX).bin | grep -q ".K.genesisK18"
114120
@strings $(TARGET_express_k10_HEX).bin | grep -q ".E.expressK10"
115121
@strings $(TARGET_express_k11_HEX).bin | grep -q ".D.expressK11"
116122
@strings $(TARGET_express_k12_HEX).bin | grep -q ".C.expressK12"

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ All files are in `/src`
8686

8787
Board Feature Overview
8888
======================
89-
| board | kit | pin encoders | SPI encoders | SPI motors | SPI stall detection | peripheral current sensors |
90-
|:----------------- |:------------------- |:------------:|:------------:|:----------:|:-------------------:|:--------------------------:|
91-
| RAMPS_V14 | Genesis v1.2 | x | | | | |
92-
| FARMDUINO_V10 | Genesis v1.3 | x | | | | |
93-
| FARMDUINO_V14 | Genesis v1.4 | | x | | | |
94-
| FARMDUINO_V30 | Genesis v1.5 | | x | x | | x |
95-
| FARMDUINO_V32 | Genesis v1.6 & v1.7 | | x | x | | x |
96-
| FARMDUINO_EXP_V20 | Express v1.0 | | | x | x | |
97-
| FARMDUINO_EXP_V22 | Express v1.1 & v1.2 | | | x | x | |
89+
| board | kit | pin encoders | SPI encoders | SPI motors | SPI stall detection | peripheral current sensors |
90+
|:----------------- |:------------------------ |:------------:|:------------:|:----------:|:-------------------:|:--------------------------:|
91+
| RAMPS_V14 | Genesis v1.2 | x | | | | |
92+
| FARMDUINO_V10 | Genesis v1.3 | x | | | | |
93+
| FARMDUINO_V14 | Genesis v1.4 | | x | | | |
94+
| FARMDUINO_V30 | Genesis v1.5 | | x | x | | x |
95+
| FARMDUINO_V32 | Genesis v1.6, v1.7, v1.8 | | x | x | | x |
96+
| FARMDUINO_EXP_V20 | Express v1.0 | | | x | x | |
97+
| FARMDUINO_EXP_V22 | Express v1.1 & v1.2 | | | x | x | |
9898

9999
Codes used for communication
100100
============================

lib/targets/farmduino_k18.Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
TARGET_farmduino_k18_BUILD_DIR := $(BUILD_DIR)/farmduino_k18
2+
TARGET_farmduino_k18_HEX := $(BIN_DIR)/farmduino_k18.hex
3+
4+
TARGET_farmduino_k18_OBJ := $(patsubst $(FBARDUINO_FIRMWARE_SRC_DIR)/%,$(TARGET_farmduino_k18_BUILD_DIR)/%,$(CXX_OBJ))
5+
6+
$(TARGET_farmduino_k18_HEX): $(TARGET_farmduino_k18_BUILD_DIR) $(TARGET_farmduino_k18_BUILD_DIR)/farmduino_k18.eep $(TARGET_farmduino_k18_BUILD_DIR)/farmduino_k18.elf
7+
$(OBJ_COPY) -O ihex -R .eeprom $(TARGET_farmduino_k18_BUILD_DIR)/farmduino_k18.elf $@
8+
9+
$(TARGET_farmduino_k18_BUILD_DIR)/farmduino_k18.eep: $(TARGET_farmduino_k18_BUILD_DIR)/farmduino_k18.elf
10+
$(OBJ_COPY) -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 $< $@
11+
12+
$(TARGET_farmduino_k18_BUILD_DIR)/farmduino_k18.elf: $(TARGET_farmduino_k18_OBJ)
13+
$(CC) -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o $@ $(TARGET_farmduino_k18_OBJ) $(DEPS_OBJ) $(DEP_CORE_LDFLAGS)
14+
15+
$(TARGET_farmduino_k18_BUILD_DIR)/%.o: $(FBARDUINO_FIRMWARE_SRC_DIR)/%.cpp $(HEADERS)
16+
$(CXX) $(CXX_FLAGS) -DFARMBOT_BOARD_ID=9 $(DEPS_CFLAGS) $< -o $@
17+
18+
$(TARGET_farmduino_k18_BUILD_DIR):
19+
$(MKDIR_P) $(TARGET_farmduino_k18_BUILD_DIR)
20+
21+
target_farmduino_k18: $(TARGET_farmduino_k18_HEX)
22+
23+
target_farmduino_k18_clean:
24+
$(RM) -r $(TARGET_farmduino_k18_BUILD_DIR)
25+
$(RM) $(TARGET_farmduino_k18_HEX)

src/Board.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@
1414

1515
// Farmbot Genesis 1.6
1616
//#define FARMDUINO_V32
17+
//#define K16
1718

1819
// Farmbot Genesis 1.7
1920
//#define FARMDUINO_V32
2021
//#define K17
2122

23+
// Farmbot Genesis 1.8
24+
//#define FARMDUINO_V32
25+
//#define K18
26+
2227
// Farmbot Express 1.0
2328
//#define FARMDUINO_EXP_V20
2429

@@ -36,7 +41,9 @@
3641
#undef FARMDUINO_V14
3742
#undef FARMDUINO_V30
3843
#undef FARMDUINO_V32
44+
#undef K16
3945
#undef K17
46+
#undef K18
4047
#undef FARMDUINO_EXP_V20
4148
#undef FARMDUINO_EXP_V22
4249
#undef K12
@@ -53,7 +60,7 @@
5360
#define FARMDUINO_V30
5461
#elif FARMBOT_BOARD_ID == 5
5562
#define FARMDUINO_V32
56-
#undef K17
63+
#define K16
5764
#elif FARMBOT_BOARD_ID == 6
5865
#define FARMDUINO_EXP_V22
5966
#undef K12
@@ -63,6 +70,9 @@
6370
#elif FARMBOT_BOARD_ID == 8
6471
#define FARMDUINO_EXP_V22
6572
#define K12
73+
#elif FARMBOT_BOARD_ID == 9
74+
#define FARMDUINO_V32
75+
#define K18
6676
#endif
6777

6878
#endif

src/Config.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,18 @@ enum MdlSpiEncoders
285285
#define SOFTWARE_VERSION_SUFFIX ".H.genesisK15\0"
286286
#endif
287287

288-
#if defined(FARMDUINO_V32) && !defined(K17) && !defined(SOFTWARE_VERSION_SUFFIX)
288+
#if defined(FARMDUINO_V32) && defined(K16) && !defined(SOFTWARE_VERSION_SUFFIX)
289289
#define SOFTWARE_VERSION_SUFFIX ".I.genesisK16\0"
290290
#endif
291291

292292
#if defined(FARMDUINO_V32) && defined(K17) && !defined(SOFTWARE_VERSION_SUFFIX)
293293
#define SOFTWARE_VERSION_SUFFIX ".J.genesisK17\0"
294294
#endif
295295

296+
#if defined(FARMDUINO_V32) && defined(K18) && !defined(SOFTWARE_VERSION_SUFFIX)
297+
#define SOFTWARE_VERSION_SUFFIX ".K.genesisK18\0"
298+
#endif
299+
296300
#if defined(FARMDUINO_EXP_V20) && !defined(SOFTWARE_VERSION_SUFFIX)
297301
#define SOFTWARE_VERSION_SUFFIX ".E.expressK10\0"
298302
#endif

0 commit comments

Comments
 (0)