Skip to content

Commit 674ced3

Browse files
committed
Merge branch 'v2.0.0'
2 parents 9eb9685 + aef8a28 commit 674ced3

File tree

221 files changed

+12220
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+12220
-0
lines changed
+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
on:
2+
push:
3+
branches:
4+
- spoof-dev
5+
6+
name: Generate Variants
7+
8+
9+
jobs:
10+
build:
11+
name: Generate Variants
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: check out code
15+
uses: actions/[email protected]
16+
with:
17+
path: arduino-apollo3
18+
fetch-depth: 0
19+
20+
- name: build variant libs
21+
id: buildvariants
22+
uses: oclyke-actions/run-mbed-jobs@v1
23+
with:
24+
jobs: |
25+
[
26+
{"name": "artemis-redboard-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_ARTEMIS", "tool": "GCC_ARM"}, "user": {"variant": {"name": "ARTEMIS", "loc": "variants/SFE_ARTEMIS"}}},
27+
{"name": "artemis-redboard-atp-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_ARTEMIS_ATP", "tool": "GCC_ARM"}, "user": {"variant": {"name": "ARTEMIS_ATP", "loc": "variants/SFE_ARTEMIS_ATP"}}},
28+
{"name": "artemis-dev-kit-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_ARTEMIS_DK", "tool": "GCC_ARM"}, "user": {"variant": {"name": "ARTEMIS_DEV_KIT", "loc": "variants/SFE_ARTEMIS_DK"}}},
29+
{"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"}}},
30+
{"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"}}},
31+
{"name": "edge-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_EDGE", "tool": "GCC_ARM"}, "user": {"variant": {"name": "EDGE", "loc": "variants/SFE_EDGE"}}},
32+
{"name": "edge2-lib", "config": {"base": "compile --library --source=mbed-os", "tgt": "SFE_EDGE2", "tool": "GCC_ARM"}, "user": {"variant": {"name": "EDGE2", "loc": "variants/SFE_EDGE2"}}}
33+
]
34+
mbed: |
35+
{"url": "https://github.com/sparkfun/mbed-os-ambiq-apollo3", "branch": "ambiq-apollo3-arduino"}
36+
37+
- name: configure git
38+
run: |
39+
git config --global user.email "[email protected]"
40+
git config --global user.name "arduino-apollo3-builder"
41+
42+
- name: copy libs to variants
43+
run: |
44+
cd arduino-apollo3
45+
46+
git fetch --all
47+
git pull --all
48+
git checkout spoof-dev
49+
git checkout spoof-release-candidate
50+
git rebase spoof-dev
51+
52+
jobs='${{ steps.buildvariants.outputs.jobs }}'
53+
job_count=0
54+
55+
for row in $(echo ${jobs} | jq -r '.[] | @base64'); do
56+
name="$(echo ${row} | base64 --decode | jq -r '.name')"
57+
loc="$(echo ${row} | base64 --decode | jq -r '.loc')"
58+
config="$(echo ${row} | base64 --decode | jq -r '.config')"
59+
user="$(echo ${row} | base64 --decode | jq -r '.user')"
60+
61+
tgt="$(echo ${config} | jq -r -c '.tgt')"
62+
tool="$(echo ${config} | jq -r -c '.tool')"
63+
build_root="$(echo ${loc} | jq -r -c '.root')"
64+
build_id="$(echo ${loc} | jq -r -c '.id')"
65+
variant_root="$(echo ${user} | jq -r '.variant.loc')"
66+
67+
echo ""
68+
echo "${job_count}:"
69+
echo "'${name}'"
70+
71+
# copy the mbed static library
72+
src="./../${build_root}/BUILD/libraries/${build_id}/${tgt}/${tool}/libmbed-os.a"
73+
dest="./${variant_root}/mbed/libmbed-os.a"
74+
echo "copying '${src}' to '${dest}'"
75+
mkdir -p $(dirname $dest)
76+
cp $src $dest
77+
git add ${dest}
78+
79+
# copy mbed_config.h
80+
src="./../${build_root}/BUILD/libraries/${build_id}/${tgt}/${tool}/mbed_config.h"
81+
dest="./${variant_root}/mbed/mbed_config.h"
82+
echo "copying '${src}' to '${dest}'"
83+
mkdir -p $(dirname $dest)
84+
cp $src $dest
85+
git add ${dest}
86+
87+
# generate files from mbed profiles
88+
python3 ./tools/scripts/transmute-profiles.py -p ./../${build_root}/BUILD/libraries/${build_id}/${tgt}/${tool}/.profile-asm -d ./${variant_root}/mbed/. -t asm -b ./tools/config/blocklist.json -v
89+
python3 ./tools/scripts/transmute-profiles.py -p ./../${build_root}/BUILD/libraries/${build_id}/${tgt}/${tool}/.profile-c -d ./${variant_root}/mbed/. -t c -b ./tools/config/blocklist.json -v
90+
python3 ./tools/scripts/transmute-profiles.py -p ./../${build_root}/BUILD/libraries/${build_id}/${tgt}/${tool}/.profile-cxx -d ./${variant_root}/mbed/. -t cxx -b ./tools/config/blocklist.json -v
91+
python3 ./tools/scripts/transmute-profiles.py -p ./../${build_root}/BUILD/libraries/${build_id}/${tgt}/${tool}/.profile-ld -d ./${variant_root}/mbed/. -t ld -b ./tools/config/blocklist.json -v
92+
git add ./${variant_root}/mbed/.asm*
93+
git add ./${variant_root}/mbed/.c*
94+
git add ./${variant_root}/mbed/.cxx*
95+
git add ./${variant_root}/mbed/.ld*
96+
97+
# generate includes file
98+
python3 ./tools/scripts/transmute-includes.py -i ./../${build_root}/BUILD/libraries/${build_id}/${tgt}/${tool}/.includes_* -d ./${variant_root}/mbed/.includes -b ./tools/config/blocklist.json -v
99+
git add ./${variant_root}/mbed/.includes
100+
101+
job_count="$((job_count + 1))"
102+
done
103+
104+
git commit -a -m "generated variants mbed resources"
105+
git push -f
106+
cd ${GITHUB_WORKSPACE}

.github/workflows/post-release.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
release:
3+
types: [published]
4+
5+
name: Post Release
6+
7+
jobs:
8+
build:
9+
name: Post Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: check out code
13+
uses: actions/[email protected]
14+
with:
15+
path: arduino-apollo3
16+
fetch-depth: 0
17+
18+
- name: initialize submodules
19+
run: |
20+
cd arduino-apollo3
21+
git submodule update --init --recursive
22+
23+
- name: generate binaries
24+
run: echo "here's where I would generate tars / zips of the full item"
25+
- name: attach binaries
26+
run: echo "here's where I would attach binaries to the release"
27+
# - name: changelog
28+
# id: changelog
29+
# uses: scottbrenner/[email protected]
30+
# env:
31+
# REPO: ${{ github.repository }}
32+
33+
- name: create release
34+
id: create_release
35+
# run: echo "placeholder for release creation ${{steps.changelog.outputs.changelog}}"
36+
run: echo "placeholder for release creation ${{steps.changelog.outputs.changelog}}"
37+
# uses: actions/create-release@latest
38+
# env:
39+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
# with:
41+
# tag_name: ${{ github.ref }}
42+
# release_name: Release ${{ github.ref }}
43+
# body: |
44+
# ${{ steps.changelog.outputs.changelog }}
45+
# draft: false
46+
# prerelease: false

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# vscode configurations
2+
*.vscode*
3+
4+
# osx
5+
.DS_Store

.gitmodules

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[submodule "cores/mbed-os"]
2+
path = cores/mbed-os
3+
url = https://github.com/sparkfun/mbed-os-ambiq-apollo3
4+
branch = ambiq-apollo3-2
5+
[submodule "cores/arduino/mbed-bridge"]
6+
path = cores/arduino/mbed-bridge
7+
url = https://github.com/sparkfun/arduino-mbed-bridge
8+
[submodule "tools/keywords_gen"]
9+
path = tools/keywords_gen
10+
url = https://github.com/sparkfun/Keyword_File_Generator
11+
[submodule "tools/uploaders/svl"]
12+
path = tools/uploaders/svl
13+
url = https://github.com/sparkfun/Apollo3_Uploader_SVL
14+
[submodule "tools/uploaders/asb"]
15+
path = tools/uploaders/asb
16+
url = https://github.com/sparkfun/Apollo3_Uploader_ASB

README.MD

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
![Generate Variants Status Badge](https://github.com/sparkfun/Arduino_Apollo3/workflows/Generate%20Variants/badge.svg)
2+
3+
# SparkFun Ambiq Apollo3 Arduino Core
4+
An mbed-os enabled Arduino core for Ambiq Apollo3 based boards
5+
6+
## Contents
7+
- [SparkFun Ambiq Apollo3 Arduino Core](#sparkfun-ambiq-apollo3-arduino-core)
8+
- [Contents](#contents)
9+
- [Installation](#installation)
10+
- [**Arduino Boards Manager** (recommended)](#arduino-boards-manager-recommended)
11+
- [**Git** (development)](#git-development)
12+
- [Development Status](#development-status)
13+
- [Priorities](#priorities)
14+
- [More](#more)
15+
- [License](#license)
16+
- [Contributing](#contributing)
17+
- [Issue Template](#issue-template)
18+
- [Acknowledgements](#acknowledgements)
19+
20+
## Installation
21+
### **Arduino Boards Manager** (recommended)
22+
- Copy / paste the JSON package URL into the 'Additional Boards Manager URLs' field in Arduino preferences
23+
[https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json](https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json) (raw)
24+
- Open 'Boards Manager' and select 'SparkFun Apollo3 Boards' - install the latest version
25+
26+
### **Git** (development)
27+
- Ensure the proper directory structure exists by following the [Arduino Boards Manager](#arduino-boards-manager) instructions (install latest)
28+
- Locate and enter the ```Arduino15``` directory
29+
- ```cd ~/.../Arduino15```
30+
- Run the ```dev-install.sh``` script
31+
- ```./packages/SparkFun/hardware/apollo3/*/tools/scripts/dev-install.sh```
32+
33+
## Development Status
34+
35+
- v2.0.0 based on an [mbed-os](https://github.com/ARMmbed/mbed-os) framework
36+
37+
#### Priorities
38+
- support additional capabilities using Apollo3 peripherals
39+
40+
**Main Arduino Features**
41+
* Serial: ✅
42+
* GPIO: ✅
43+
* Analog / Servo Output: ✅
44+
* Analog Input: ✅
45+
* Timing / Delays: ✅
46+
47+
**Standard Libraries**
48+
* Wire
49+
* Controller: ✅
50+
* Peripheral: ❌
51+
* SPI
52+
* Controller: ✅
53+
* Peripheral: ❌
54+
* Software Serial: ✅
55+
56+
**Apollo3 Specialty Peripherals**
57+
* PDM Microphones / I2S: ✅
58+
* BLE: ✅
59+
* Multi-bit SPI: 🤔
60+
* I2C/SPI Peripheral: 🤔
61+
62+
## More
63+
### [License](./docs/ISSUES.md)
64+
### [Contributing](./docs/CONTRIBUTING.md)
65+
### [Issue Template](./docs/ISSUES.md)
66+
### [Acknowledgements](./docs/ACKNOWLEDGEMENTS.md)

0 commit comments

Comments
 (0)