Skip to content

Commit 50d5cd1

Browse files
author
Owen
authored
Merge pull request #285 from sparkfun/add-mm-artemis-pb
add artemis mm pb variant
2 parents 7c201c5 + c628e15 commit 50d5cd1

File tree

6 files changed

+140
-1
lines changed

6 files changed

+140
-1
lines changed

.github/workflows/generate-variants.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
{"name": "artemis-redboard-nano-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_ARTEMIS_NANO", "tool": "GCC_ARM"}, "user": {"variant": {"name": "ARTEMIS_NANO", "loc": "variants/SFE_ARTEMIS_NANO"}}},
2929
{"name": "artemis-thing-plus-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_ARTEMIS_THING_PLUS", "tool": "GCC_ARM"}, "user": {"variant": {"name": "ARTEMIS_THING_PLUS", "loc": "variants/SFE_ARTEMIS_THING_PLUS"}}},
3030
{"name": "edge-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_EDGE", "tool": "GCC_ARM"}, "user": {"variant": {"name": "EDGE", "loc": "variants/SFE_EDGE"}}},
31-
{"name": "edge2-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_EDGE2", "tool": "GCC_ARM"}, "user": {"variant": {"name": "EDGE2", "loc": "variants/SFE_EDGE2"}}}
31+
{"name": "edge2-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_EDGE2", "tool": "GCC_ARM"}, "user": {"variant": {"name": "EDGE2", "loc": "variants/SFE_EDGE2"}}},
32+
{"name": "artemis-mm-pb-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_ARTEMIS_MM_PB", "tool": "GCC_ARM"}, "user": {"variant": {"name": "ARTEMIS_MM_PB", "loc": "variants/SFE_ARTEMIS_MM_PB"}}}
3233
]
3334
mbed: |
3435
{"url": "https://github.com/sparkfun/mbed-os-ambiq-apollo3", "branch": "ambiq-apollo3-arduino"}

boards.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,40 @@ sfe_edge2.menu.loader.option_svl.build.ldscript={runtime.platform.path}/tools/up
231231

232232
###############################################################
233233

234+
sfe_artemis_mm_pb.name=Artemis Micro Mod Processor
235+
sfe_artemis_mm_pb.build.core=arduino
236+
sfe_artemis_mm_pb.build.variant=SFE_ARTEMIS_MM_PB
237+
sfe_artemis_mm_pb.build.arch=APOLLO3
238+
sfe_artemis_mm_pb.build.board=APOLLO3_SFE_ARTEMIS_MM_PB
239+
sfe_artemis_mm_pb.build.export_format=bin
240+
sfe_artemis_mm_pb.build.defines=
241+
sfe_artemis_mm_pb.build.includes=
242+
sfe_artemis_mm_pb.build.libs=
243+
244+
sfe_artemis_mm_pb.menu.svl_baud.921600=921600
245+
sfe_artemis_mm_pb.menu.svl_baud.460800=460800
246+
sfe_artemis_mm_pb.menu.svl_baud.230400=230400
247+
sfe_artemis_mm_pb.menu.svl_baud.115200=115200
248+
sfe_artemis_mm_pb.menu.svl_baud.57600=57600
249+
sfe_artemis_mm_pb.menu.loader.option_asb=Ambiq Secure Bootloader (Recommended)
250+
sfe_artemis_mm_pb.menu.loader.option_svl=SparkFun Variable Loader (Out of Order)
251+
252+
sfe_artemis_mm_pb.menu.svl_baud.57600.upload.svl_baud=57600
253+
sfe_artemis_mm_pb.menu.svl_baud.115200.upload.svl_baud=115200
254+
sfe_artemis_mm_pb.menu.svl_baud.230400.upload.svl_baud=230400
255+
sfe_artemis_mm_pb.menu.svl_baud.460800.upload.svl_baud=460800
256+
sfe_artemis_mm_pb.menu.svl_baud.921600.upload.svl_baud=921600
257+
258+
sfe_artemis_mm_pb.upload.asb_baud=115200
259+
260+
sfe_artemis_mm_pb.menu.loader.option_asb.upload.tool=asb
261+
sfe_artemis_mm_pb.menu.loader.option_asb.build.ldscript={runtime.platform.path}/tools/uploaders/asb/0xC000.ld
262+
263+
sfe_artemis_mm_pb.menu.loader.option_svl.upload.tool=svl
264+
sfe_artemis_mm_pb.menu.loader.option_svl.build.ldscript={runtime.platform.path}/tools/uploaders/svl/0x10000.ld
265+
266+
###############################################################
267+
234268
sfe_artemis_module.name=Artemis Module
235269
sfe_artemis_module.build.core=arduino
236270
sfe_artemis_module.build.variant=SFE_ARTEMIS_MODULE
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
// This file is subject to the terms and conditions defined in
3+
// file 'LICENSE.md', which is part of this source code package.
4+
*/
5+
6+
#include "bridge/pins.h"
7+
8+
const pin_size_t variantPinCount = 40;
9+
10+
PinState variantPinStates[variantPinCount] = {
11+
{AUD_OUT, 18, NULL, /*NULL, NULL, NULL,*/ NULL}, // only unique pins here, so AUD_MCLK == AUD_OUT on this board
12+
{AUD_IN, 11, NULL, /*NULL, NULL, NULL,*/ NULL},
13+
{AUD_LRCLK, 36, NULL, /*NULL, NULL, NULL,*/ NULL},
14+
{AUD_BCLK, 37, NULL, /*NULL, NULL, NULL,*/ NULL},
15+
{SCL, 39, NULL, /*NULL, NULL, NULL,*/ NULL},
16+
{SDA, 40, NULL, /*NULL, NULL, NULL,*/ NULL},
17+
{I2C_INT, 2, NULL, /*NULL, NULL, NULL,*/ NULL},
18+
{SCL1, 8, NULL, /*NULL, NULL, NULL,*/ NULL},
19+
{SDA1, 9, NULL, /*NULL, NULL, NULL,*/ NULL},
20+
{BATT_VIN, 31, NULL, /*NULL, NULL, NULL,*/ NULL},
21+
{SDIO_CLK, 5, NULL, /*NULL, NULL, NULL,*/ NULL},
22+
{SDIO_CMD, 7, NULL, /*NULL, NULL, NULL,*/ NULL},
23+
{SDIO_DATA0, 6, NULL, /*NULL, NULL, NULL,*/ NULL},
24+
{SDIO_DATA1, 26, NULL, /*NULL, NULL, NULL,*/ NULL},
25+
{SDIO_DATA2, 4, NULL, /*NULL, NULL, NULL,*/ NULL},
26+
{SDIO_DATA3, 23, NULL, /*NULL, NULL, NULL,*/ NULL},
27+
{SPI_SDI, 43, NULL, /*NULL, NULL, NULL,*/ NULL},
28+
{SPI_SDO, 38, NULL, /*NULL, NULL, NULL,*/ NULL},
29+
{SPI_SCK, 42, NULL, /*NULL, NULL, NULL,*/ NULL},
30+
{SPI_CS, 41, NULL, /*NULL, NULL, NULL,*/ NULL},
31+
{A0, 32, NULL, /*NULL, NULL, NULL,*/ NULL},
32+
{A1, 35, NULL, /*NULL, NULL, NULL,*/ NULL},
33+
{PWM0, 44, NULL, /*NULL, NULL, NULL,*/ NULL},
34+
{PWM1, 45, NULL, /*NULL, NULL, NULL,*/ NULL},
35+
{D0, 0, NULL, /*NULL, NULL, NULL,*/ NULL},
36+
{D1, 1, NULL, /*NULL, NULL, NULL,*/ NULL},
37+
{TX1, 12, NULL, /*NULL, NULL, NULL,*/ NULL},
38+
{RX1, 25, NULL, /*NULL, NULL, NULL,*/ NULL},
39+
{RTS1, 10, NULL, /*NULL, NULL, NULL,*/ NULL},
40+
{CTS1, 17, NULL, /*NULL, NULL, NULL,*/ NULL},
41+
{G0, 16, NULL, /*NULL, NULL, NULL,*/ NULL},
42+
{G1, 33, NULL, /*NULL, NULL, NULL,*/ NULL},
43+
{G2, 34, NULL, /*NULL, NULL, NULL,*/ NULL},
44+
{G3, 27, NULL, /*NULL, NULL, NULL,*/ NULL},
45+
{G4, 28, NULL, /*NULL, NULL, NULL,*/ NULL},
46+
{G5, 29, NULL, /*NULL, NULL, NULL,*/ NULL},
47+
{G6, 14, NULL, /*NULL, NULL, NULL,*/ NULL},
48+
{G7, 15, NULL, /*NULL, NULL, NULL,*/ NULL},
49+
{G9, 12, NULL, /*NULL, NULL, NULL,*/ NULL},
50+
{G10, 13, NULL, /*NULL, NULL, NULL,*/ NULL},
51+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
// This file is subject to the terms and conditions defined in
3+
// file 'LICENSE.md', which is part of this source code package.
4+
*/
5+
6+
#ifndef _VARIANT_PINS_H_
7+
#define _VARIANT_PINS_H_
8+
9+
#define LED_BUILTIN pinNumberByName(LED1)
10+
11+
#endif // _VARIANT_PINS_H_
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
// This file is subject to the terms and conditions defined in
3+
// file 'LICENSE.md', which is part of this source code package.
4+
*/
5+
6+
#include "variant.h"
7+
8+
void initVariant(void){
9+
10+
}

variants/SFE_ARTEMIS_MM_PB/variant.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
// This file is subject to the terms and conditions defined in
3+
// file 'LICENSE.md', which is part of this source code package.
4+
*/
5+
6+
#ifndef _VARIANT_H_
7+
#define _VARIANT_H_
8+
9+
#include "Arduino.h"
10+
11+
#include "config/pins.h"
12+
13+
#define VARIANT_SPI_INTFCS 2
14+
#define VARIANT_WIRE_INTFCS 2
15+
16+
// SPI
17+
#define VARIANT_SPI_SDI SPI_SDI
18+
#define VARIANT_SPI_SDO SPI_SDO
19+
#define VARIANT_SPI_CLK SPI_CLK
20+
21+
#define VARIANT_SPI1_SDI SPI1_SDI
22+
#define VARIANT_SPI1_SDO SPI1_SDO
23+
#define VARIANT_SPI1_CLK SPI1_CLK
24+
25+
// Wire
26+
#define VARIANT_Wire_SDA I2C_SDA
27+
#define VARIANT_Wire_SCL I2C_SCL
28+
29+
#define VARIANT_Wire1_SDA I2C1_SDA
30+
#define VARIANT_Wire1_SCL I2C1_SCL
31+
32+
#endif // _VARIANT_H_

0 commit comments

Comments
 (0)