Skip to content

Commit 21d16e2

Browse files
committed
Add Edge V2 variant
1 parent d1f1e5f commit 21d16e2

File tree

3 files changed

+98
-98
lines changed

3 files changed

+98
-98
lines changed

boards.txt

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -185,38 +185,38 @@ edge.build.ldscript={build.variant.path}/linker_scripts/gcc/ambiq_sbl_app.ld
185185

186186
###############################################################
187187

188-
# edgeV2.name=SparkFun Edge V2
189-
# edgeV2.build.variant=SparkFun_Edge_V2
190-
# edgeV2.build.board=SFE_EDGE_V2
191-
# edgeV2.upload.maximum_size=960000
192-
# edgeV2.build.arch=APOLLO3
193-
# edgeV2.build.mcu=cortex-m4
194-
# edgeV2.build.f_cpu=48000000L
195-
# edgeV2.build.core=arduino
196-
# edgeV2.build.includes=-I{build.variant.path}/config
197-
# edgeV2.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
198-
# edgeV2.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
199-
# edgeV2.build.defs=
200-
# edgeV2.build.libs=
201-
# edgeV2.menu.svl_baud.921600=921600
202-
# edgeV2.menu.svl_baud.460800=460800
203-
# edgeV2.menu.svl_baud.230400=230400
204-
# edgeV2.menu.svl_baud.115200=115200
205-
# edgeV2.menu.svl_baud.57600=57600
206-
# edgeV2.menu.loader.sparkfun_svl=SparkFun Variable Loader (Recommended)
207-
# edgeV2.menu.loader.ambiq_sbl=Ambiq Secure Bootloader (Advanced)
208-
209-
# edgeV2.menu.svl_baud.57600.upload.baud=57600
210-
# edgeV2.menu.svl_baud.115200.upload.baud=115200
211-
# edgeV2.menu.svl_baud.230400.upload.baud=230400
212-
# edgeV2.menu.svl_baud.460800.upload.baud=460800
213-
# edgeV2.menu.svl_baud.921600.upload.baud=921600
214-
215-
# edgeV2.menu.loader.ambiq_sbl.upload.tool=ambiq_bin2board
216-
# edgeV2.menu.loader.ambiq_sbl.build.ldscript={build.variant.path}/linker_scripts/gcc/ambiq_sbl_app.ld
217-
218-
# edgeV2.menu.loader.sparkfun_svl.upload.tool=artemis_svl
219-
# edgeV2.menu.loader.sparkfun_svl.build.ldscript={build.variant.path}/linker_scripts/gcc/artemis_sbl_svl_app.ld
220-
221-
# ###############################################################
188+
edgeV2.name=SparkFun Edge V2
189+
edgeV2.build.variant=SparkFun_Edge_V2
190+
edgeV2.build.board=SFE_EDGE_V2
191+
edgeV2.upload.maximum_size=960000
192+
edgeV2.build.arch=APOLLO3
193+
edgeV2.build.mcu=cortex-m4
194+
edgeV2.build.f_cpu=48000000L
195+
edgeV2.build.core=arduino
196+
edgeV2.build.includes=-I{build.variant.path}/config
197+
edgeV2.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
198+
edgeV2.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
199+
edgeV2.build.defs=
200+
edgeV2.build.libs=
201+
edgeV2.menu.svl_baud.921600=921600
202+
edgeV2.menu.svl_baud.460800=460800
203+
edgeV2.menu.svl_baud.230400=230400
204+
edgeV2.menu.svl_baud.115200=115200
205+
edgeV2.menu.svl_baud.57600=57600
206+
edgeV2.menu.loader.sparkfun_svl=SparkFun Variable Loader (Recommended)
207+
edgeV2.menu.loader.ambiq_sbl=Ambiq Secure Bootloader (Advanced)
208+
209+
edgeV2.menu.svl_baud.57600.upload.baud=57600
210+
edgeV2.menu.svl_baud.115200.upload.baud=115200
211+
edgeV2.menu.svl_baud.230400.upload.baud=230400
212+
edgeV2.menu.svl_baud.460800.upload.baud=460800
213+
edgeV2.menu.svl_baud.921600.upload.baud=921600
214+
215+
edgeV2.menu.loader.ambiq_sbl.upload.tool=ambiq_bin2board
216+
edgeV2.menu.loader.ambiq_sbl.build.ldscript={build.variant.path}/linker_scripts/gcc/ambiq_sbl_app.ld
217+
218+
edgeV2.menu.loader.sparkfun_svl.upload.tool=artemis_svl
219+
edgeV2.menu.loader.sparkfun_svl.build.ldscript={build.variant.path}/linker_scripts/gcc/artemis_sbl_svl_app.ld
220+
221+
###############################################################
222222

variants/SparkFun_Edge_V2/config/variant.cpp

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -22,59 +22,58 @@ SOFTWARE.
2222

2323
#include "variant.h"
2424

25-
const ap3_gpio_pad_t ap3_variant_pinmap[AP3_VARIANT_NUM_PINS]; // todo: determine pin availabity of Edge V2
26-
// const ap3_gpio_pad_t ap3_variant_pinmap[AP3_VARIANT_NUM_PINS] = {
27-
// 0,
28-
// 1,
29-
// AP3_GPIO_PAD_UNUSED,
30-
// 3,
31-
// 4,
32-
// 5,
33-
// 6,
34-
// 7,
35-
// 8,
36-
// 9,
37-
// 10,
38-
// 11,
39-
// 12,
40-
// 13,
41-
// 14,
42-
// 15,
43-
// AP3_GPIO_PAD_UNUSED,
44-
// 17,
45-
// AP3_GPIO_PAD_UNUSED,
46-
// AP3_GPIO_PAD_UNUSED,
47-
// 20,
48-
// 21,
49-
// 22,
50-
// 23,
51-
// 24,
52-
// 25,
53-
// 26,
54-
// 27,
55-
// 28,
56-
// 29,
57-
// AP3_GPIO_PAD_UNUSED,
58-
// AP3_GPIO_PAD_UNUSED,
59-
// AP3_GPIO_PAD_UNUSED,
60-
// 33,
61-
// AP3_GPIO_PAD_UNUSED,
62-
// AP3_GPIO_PAD_UNUSED,
63-
// 36,
64-
// 37,
65-
// 38,
66-
// 39,
67-
// 40,
68-
// AP3_GPIO_PAD_UNUSED,
69-
// 42,
70-
// 43,
71-
// 44,
72-
// AP3_GPIO_PAD_UNUSED,
73-
// 46,
74-
// 47,
75-
// 48,
76-
// 49,
77-
// };
25+
const ap3_gpio_pad_t ap3_variant_pinmap[AP3_VARIANT_NUM_PINS] = {
26+
AP3_GPIO_PAD_UNUSED,
27+
AP3_GPIO_PAD_UNUSED,
28+
AP3_GPIO_PAD_UNUSED,
29+
AP3_GPIO_PAD_UNUSED,
30+
4,
31+
AP3_GPIO_PAD_UNUSED,
32+
6,
33+
7,
34+
AP3_GPIO_PAD_UNUSED,
35+
AP3_GPIO_PAD_UNUSED,
36+
AP3_GPIO_PAD_UNUSED,
37+
11,
38+
12,
39+
13,
40+
14,
41+
15,
42+
AP3_GPIO_PAD_UNUSED,
43+
17,
44+
AP3_GPIO_PAD_UNUSED,
45+
AP3_GPIO_PAD_UNUSED,
46+
20,
47+
21,
48+
22,
49+
23,
50+
24,
51+
25,
52+
26,
53+
27,
54+
28,
55+
29,
56+
AP3_GPIO_PAD_UNUSED,
57+
31,
58+
32,
59+
33,
60+
34,
61+
35,
62+
AP3_GPIO_PAD_UNUSED,
63+
37,
64+
AP3_GPIO_PAD_UNUSED,
65+
39,
66+
40,
67+
AP3_GPIO_PAD_UNUSED,
68+
42,
69+
43,
70+
44,
71+
45,
72+
AP3_GPIO_PAD_UNUSED,
73+
AP3_GPIO_PAD_UNUSED,
74+
48,
75+
49,
76+
};
7877

7978
// Uart Definitions
8079
Uart Serial(0, 49, 48);// declares a Uart object called Serial using instance 0 of Apollo3 UART peripherals with RX on pin 49 and TX on pin 48 (note, you specify *pins* not Apollo3 pads. This uses the variant's pin map to determine the Apollo3 pad)

variants/SparkFun_Edge_V2/config/variant.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,22 @@ class Uart; // Forward declaration of Uart
3434
extern Uart Serial;
3535

3636

37-
// Todo: determine IOMaster allocation for Edge V2
38-
// // Wire defines
39-
// #define WIRE_INTERFACES_COUNT 2
37+
Todo: determine IOMaster allocation for Edge V2
38+
// Wire defines
39+
#define WIRE_INTERFACES_COUNT 3
4040

41-
// #define WireQwiic Wire // Giving Wire an alias of "WireQwiic" in case people want to use it
42-
// #define AP3_Wire_IOM 4 // Secify that Wire uses IOMaster instance 4
41+
#define WireQwiic Wire // Giving Wire an alias of "WireQwiic" in case people want to use it
42+
#define AP3_Wire_IOM 4 // Secify that Wire uses IOMaster instance 4
4343

44-
// #define WireAccel Wire1
45-
// #define AP3_Wire1_IOM 3
44+
#define WireAccel Wire1
45+
#define AP3_Wire1_IOM 3
4646

47-
// // SPI Defines
48-
// #define SPI_INTERFACES_COUNT 1
47+
#define WireCamera Wire2
48+
#define AP3_Wire1_IOM 2
49+
50+
// SPI Defines
51+
#define SPI_INTERFACES_COUNT 0 //Edge V2 doesn't have any fully-exposed SPI ports
4952

50-
// #define AP3_SPI_IOM 0 // Speciy that SPI uses IOMaster 0
51-
// #define AP3_SPI_DUP ap3_spi_full_duplex // Specify that SPI is full-duplex (as opposed to ap3_spi_tx_only or ap3_spi_rx_only)
5253

5354
#define LED_BUILTIN 19
5455

0 commit comments

Comments
 (0)