Skip to content

Commit b581755

Browse files
committed
2 parents e8c0bd4 + 2ed99a0 commit b581755

File tree

21 files changed

+4424
-35
lines changed

21 files changed

+4424
-35
lines changed

boards.txt

Lines changed: 70 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@
2020

2121
###############################################################
2222

23-
artemis.name=SparkFun Artemis Module
24-
artemis.build.variant=SparkFun_Artemis
25-
artemis.build.board=SFE_ARTEMIS
26-
artemis.upload.tool=ap3Loader
27-
artemis.upload.maximum_size=960000
28-
artemis.build.arch=APOLLO3
29-
artemis.build.mcu=cortex-m4
30-
artemis.build.f_cpu=48000000L
31-
artemis.build.core=arduino
32-
artemis.build.defs=
33-
artemis.build.includes=-I{build.variant.path}/bsp -I{build.variant.path}/config
34-
artemis.build.libs=
35-
artemis.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
36-
artemis.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
37-
artemis.upload.maximum_size=960000
23+
amap3blackboard.name=SparkFun BlackBoard Artemis
24+
amap3blackboard.build.variant=SparkFun_BlackBoard_Artemis
25+
amap3blackboard.build.board=AM_AP3_SFE_BB_ARTEMIS
26+
amap3blackboard.upload.tool=ap3Loader
27+
amap3blackboard.upload.maximum_size=960000
28+
amap3blackboard.build.arch=APOLLO3
29+
amap3blackboard.build.mcu=cortex-m4
30+
amap3blackboard.build.f_cpu=48000000L
31+
amap3blackboard.build.core=arduino
32+
amap3blackboard.build.defs=
33+
amap3blackboard.build.includes=-I{build.variant.path}/bsp -I{build.variant.path}/config
34+
amap3blackboard.build.libs=
35+
amap3blackboard.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
36+
amap3blackboard.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
37+
amap3blackboard.upload.maximum_size=960000
3838

3939
###############################################################
4040

41-
amap3nano.name=SparkFun Artemis Nano
42-
amap3nano.build.variant=SparkFun_Artemis_Nano
43-
amap3nano.build.board=AM_AP3_SFE_ARTEMIS_NANO
41+
amap3nano.name=SparkFun BlackBoard Artemis Nano
42+
amap3nano.build.variant=SparkFun_BlackBoard_Artemis_Nano
43+
amap3nano.build.board=AM_AP3_SFE_BB_ARTEMIS_NANO
4444
amap3nano.upload.tool=ap3Loader
4545
amap3nano.upload.maximum_size=960000
4646
amap3nano.build.arch=APOLLO3
@@ -56,21 +56,39 @@ amap3nano.upload.maximum_size=960000
5656

5757
###############################################################
5858

59-
amap3bare.name=SparkFun BlackBoard Artemis
60-
amap3bare.build.variant=SparkFun_BlackBoard_Artemis
61-
amap3bare.build.board=AM_AP3_SFE_BB_ARTEMIS
62-
amap3bare.upload.tool=ap3Loader
63-
amap3bare.upload.maximum_size=960000
64-
amap3bare.build.arch=APOLLO3
65-
amap3bare.build.mcu=cortex-m4
66-
amap3bare.build.f_cpu=48000000L
67-
amap3bare.build.core=arduino
68-
amap3bare.build.defs=
69-
amap3bare.build.includes=-I{build.variant.path}/bsp -I{build.variant.path}/config
70-
amap3bare.build.libs=
71-
amap3bare.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
72-
amap3bare.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
73-
amap3bare.upload.maximum_size=960000
59+
amap3mega.name=SparkFun BlackBoard Artemis Mega
60+
amap3mega.build.variant=SparkFun_BlackBoard_Artemis_Mega
61+
amap3mega.build.board=AM_AP3_SFE_BB_ARTEMIS_MEGA
62+
amap3mega.upload.tool=ap3Loader
63+
amap3mega.upload.maximum_size=960000
64+
amap3mega.build.arch=APOLLO3
65+
amap3mega.build.mcu=cortex-m4
66+
amap3mega.build.f_cpu=48000000L
67+
amap3mega.build.core=arduino
68+
amap3mega.build.defs=
69+
amap3mega.build.includes=-I{build.variant.path}/bsp -I{build.variant.path}/config
70+
amap3mega.build.libs=
71+
amap3mega.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
72+
amap3mega.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
73+
amap3mega.upload.maximum_size=960000
74+
75+
###############################################################
76+
77+
artemis.name=SparkFun Artemis Module
78+
artemis.build.variant=SparkFun_Artemis
79+
artemis.build.board=SFE_ARTEMIS
80+
artemis.upload.tool=ap3Loader
81+
artemis.upload.maximum_size=960000
82+
artemis.build.arch=APOLLO3
83+
artemis.build.mcu=cortex-m4
84+
artemis.build.f_cpu=48000000L
85+
artemis.build.core=arduino
86+
artemis.build.defs=
87+
artemis.build.includes=-I{build.variant.path}/bsp -I{build.variant.path}/config
88+
artemis.build.libs=
89+
artemis.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
90+
artemis.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
91+
artemis.upload.maximum_size=960000
7492

7593
###############################################################
7694

@@ -89,4 +107,22 @@ edge.build.libs=
89107
edge.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
90108
edge.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
91109

92-
###############################################################
110+
###############################################################
111+
112+
amap3evb.name=Ambiq Apollo3 Evaluation Board
113+
amap3evb.build.variant=Ambiq_Apollo3_EVB
114+
amap3evb.build.board=AM_AP3_EVB
115+
amap3evb.upload.tool=ap3Loader
116+
amap3evb.upload.maximum_size=960000
117+
amap3evb.build.arch=APOLLO3
118+
amap3evb.build.mcu=cortex-m4
119+
amap3evb.build.f_cpu=48000000L
120+
amap3evb.build.core=arduino
121+
amap3evb.build.defs=
122+
amap3evb.build.includes=-I{build.variant.path}/bsp -I{build.variant.path}/config
123+
amap3evb.build.libs=
124+
amap3evb.build.extra_flags=-DPART_apollo3 -DAM_PACKAGE_BGA -DAM_PART_APOLLO3
125+
amap3evb.build.ldscript={build.variant.path}/linker_scripts/gcc/flash_with_bootloader.ld
126+
amap3evb.upload.maximum_size=960000
127+
128+
###############################################################

variants/SparkFun_BlackBoard_Artemis/config/variant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOFTWARE.
2424

2525
const ap3_gpio_pad_t ap3_variant_pinmap[AP3_VARIANT_NUM_PINS] = {
2626
//~ = PWM, A = ADC
27-
//Apollo Pad, //Silkscreen indicator
27+
//Apollo Pad, //Silkscreen indicator - Pin functions
2828
25, //0 - ~RX1/SDA2/MISO2
2929
24, //1 - ~TX1/32kHz/SWO
3030
35, //2/A6 - ~A/TX1/I2SDAT/PDMCLK

variants/SparkFun_BlackBoard_Artemis/config/variant.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,6 @@ extern Uart Serial1;
6464
#define ADC_DIV3 35
6565
#define ADC_VSS 36
6666

67+
#define LED_BUILTIN 13
68+
6769
#endif // _AP3_VARIANT_H_
File renamed without changes.
File renamed without changes.

variants/SparkFun_Artemis_Nano/bsp/am_bsp_pins.c renamed to variants/SparkFun_BlackBoard_Artemis_Mega/bsp/am_bsp_pins.c

File renamed without changes.

variants/SparkFun_Artemis_Nano/bsp/am_bsp_pins.h renamed to variants/SparkFun_BlackBoard_Artemis_Mega/bsp/am_bsp_pins.h

File renamed without changes.
File renamed without changes.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
Copyright (c) 2019 SparkFun Electronics
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.
21+
*/
22+
23+
#include "variant.h"
24+
25+
const ap3_gpio_pad_t ap3_variant_pinmap[AP3_VARIANT_NUM_PINS] = {
26+
//On the Artemis Mega, what you see is what you get pin-to-pad on the Apollo3
27+
0,
28+
1,
29+
2,
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+
16,
44+
17,
45+
18,
46+
19,
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, //The one pad not broken out of the Apollo3 on the Artemis
58+
31,
59+
32,
60+
33,
61+
34,
62+
35,
63+
36,
64+
37,
65+
38,
66+
39,
67+
40,
68+
41,
69+
42,
70+
43,
71+
44,
72+
45,
73+
46,
74+
47,
75+
48,
76+
49,
77+
AP3_ADC_DIFF0_PAD, //50 - Not a real pad, ADC_DIFF0
78+
AP3_ADC_DIFF1_PAD, //51 - Not a real pad, ADC_DIFF1
79+
AP3_ADC_TEMP_PAD, //52 - Not a real pad, ADC_TEMP
80+
AP3_ADC_DIV3_PAD, //53 - Not a real pad, ADC_DIV3
81+
AP3_ADC_VSS_PAD, //54 - Not a real pad, ADC_VSS
82+
};
83+
84+
// Uart Definitions
85+
//Serial(instance, RX, TX)
86+
Uart Serial(0, 49, 48); // Declares a Uart object called Serial using instance 0 of Apollo3 UART peripherals with RX on variant 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)
87+
Uart Serial1(1, 25, 24); // Declares a Uart object called Serial1 using instance 1 of Apollo3 UART peripherals with RX on pin 25 and TX on pin 24 (note, you specify *pins* not Apollo3 pads. This uses the variant's pin map to determine the Apollo3 pad)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
Copyright (c) 2019 SparkFun Electronics
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.
21+
*/
22+
#ifndef _AP3_VARIANT_H_
23+
#define _AP3_VARIANT_H_
24+
25+
#include "Arduino.h"
26+
27+
#define AP3_VARIANT_NUM_PINS (55)
28+
29+
// Pin map declaration
30+
extern const ap3_gpio_pad_t ap3_variant_pinmap[AP3_VARIANT_NUM_PINS];
31+
32+
// Uart declarations
33+
class Uart; // Forward declaration of Uart
34+
extern Uart Serial;
35+
extern Uart Serial1;
36+
37+
// Wire defines
38+
#define WIRE_INTERFACES_COUNT 6
39+
40+
#define WireQwiic Wire // Giving Wire an alias of "WireQwiic" in case people want to use it
41+
#define AP3_Wire_IOM 4 // Secify that Wire uses IOMaster instance 4
42+
43+
// SPI Defines
44+
#define SPI_INTERFACES_COUNT 6
45+
46+
#define AP3_SPI_IOM 0 // Specify that SPI uses IOMaster 0
47+
#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)
48+
49+
// Mapping of analog pins to digital pins of variant
50+
#define A29 29
51+
#define A11 11
52+
#define A34 34
53+
#define A33 33
54+
#define A16 16
55+
#define A31 31
56+
#define A13 13
57+
#define A12 12
58+
#define A33 33
59+
#define A35 35
60+
61+
#define ADC_DIFF0 50 //Not legal pins. Used for pad lookup
62+
#define ADC_DIFF1 51
63+
#define ADC_TEMP 52
64+
#define ADC_DIV3 53
65+
#define ADC_VSS 54
66+
67+
#define LED_BUILTIN 5
68+
69+
#endif // _AP3_VARIANT_H_

0 commit comments

Comments
 (0)