Skip to content

Commit 275db46

Browse files
author
m19936
committed
Merge remote-tracking branch 'origin/develop' into feature/low-power-module
2 parents 0b12b39 + eda1a6f commit 275db46

File tree

10 files changed

+158
-27
lines changed

10 files changed

+158
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ libcryptoauth.a
1010
.ccls-cache
1111
.vscode/c_cpp_properties.json
1212
.vscode/arduino.json
13+
deploy_sandbox

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414
"files.associations": {
1515
"*.cfgmap": "xml",
1616
"led_ctrl.h": "c"
17+
},
18+
"workbench.colorCustomizations": {
19+
"activityBar.background": "#4D1C30",
20+
"titleBar.activeBackground": "#6C2843",
21+
"titleBar.activeForeground": "#FEFCFD"
1722
}
1823
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# v0.1.0 (Pre-Release)
2+
3+
* Initial Pre-Release

Jenkinsfilek8s

Lines changed: 74 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,36 @@ pipeline {
1212
timeout(time: 30, unit: 'MINUTES')
1313
}
1414

15+
environment {
16+
DEPLOY_TOOL_URL = 'https://bitbucket.microchip.com/scm/citd/tool-github-deploy.git'
17+
DEPLOY_SCRIPT_FILE = 'tool-github-deploy/tool-github-deploy/tool-github-deploy.py'
18+
BITBUCKET_REPO = 'https://bitbucket.microchip.com/scm/mcu8mass/avr-iot-cellular-arduino-library.git'
19+
GITHUB_REPO = 'https://github.com/mchpTestArea/avr-iot-test'
20+
GITHUB_REPO_SHORT = 'avr-iot-test'
21+
GITHUB_ORG = 'mchpTestArea'
22+
TARGET_BRANCH = 'main'
23+
}
24+
1525
stages {
1626
stage('setup') {
1727
steps {
1828
checkout scm
1929
script {
20-
// See if we can use the git tag for the release name
21-
try {
22-
env.RELEASE_NAME = gitTagName()
23-
} catch (err) {
24-
// No tag exist, use the commit instead
25-
env.RELEASE_NAME = getCommit()
30+
env.GIT_TAG = gitTag()
31+
env.GIT_COMMIT = getCommit()
32+
33+
if(env.GIT_TAG != '') {
34+
currentBuild.displayName = "#${BUILD_NUMBER} | ${JOB_NAME} | RELEASE-CANDIDATE-${env.GIT_TAG}"
35+
env.RELEASE_NAME = env.GIT_TAG
36+
} else {
37+
currentBuild.displayName = "#${BUILD_NUMBER} | ${JOB_NAME} | ${env.GIT_COMMIT}"
38+
env.RELEASE_NAME = env.GIT_COMMIT
2639
}
27-
currentBuild.displayName = "#${BUILD_NUMBER}, ${JOB_NAME}, ${env.RELEASE_NAME}"
2840
}
2941
}
3042
}
3143

44+
3245
stage('build-cryptoauthlib') {
3346
steps {
3447
sh 'chmod +x ./scripts/inject_cryptoauthlib.sh'
@@ -49,6 +62,53 @@ pipeline {
4962
sh './scripts/bundle.sh $RELEASE_NAME'
5063
}
5164
}
65+
66+
stage('deploy'){
67+
// Only run if git tag exists and it's the master branch
68+
when {
69+
allOf {
70+
expression {
71+
env.GIT_TAG != ''
72+
}
73+
branch env.TARGET_BRANCH
74+
}
75+
}
76+
77+
// Multi-Stage Deploy
78+
stages {
79+
// Clone the deploy tool
80+
stage('GitHub-Setup') {
81+
steps {
82+
sh "git clone ${env.DEPLOY_TOOL_URL}"
83+
sh "pip3 install PyGithub atlassian-python-api jsonschema packaging lxml"
84+
sh "pwd"
85+
}
86+
}
87+
88+
// Sync the bitbucket repository with the github repository
89+
stage('GitHub-Sync') {
90+
steps {
91+
script {
92+
withCredentials([usernamePassword(credentialsId: 'github_mchptest', usernameVariable: 'USER_NAME', passwordVariable:'PASS' )]) {
93+
sh "python3 ${env.DEPLOY_SCRIPT_FILE} -deploy=true -gpat=${PASS} -dgid=${USER_NAME} -dburl=${env.BITBUCKET_REPO} -dgurl=${env.GITHUB_REPO} -dbranch=${env.TARGET_BRANCH} -def=\"cloudprovider.yaml, Jenkinsfilek8s, mini_port.md, internal_readme.md\""
94+
}
95+
}
96+
}
97+
}
98+
99+
// Create a new release
100+
stage('GitHub-Release') {
101+
steps {
102+
script {
103+
withCredentials([usernamePassword(credentialsId: 'github_mchptest', usernameVariable: 'USER_NAME', passwordVariable:'PASS' )]) {
104+
sh "python3 ${env.DEPLOY_SCRIPT_FILE} -rlo=true -gpat=${PASS} -dgid=${USER_NAME} -rpn=${GITHUB_REPO_SHORT} -rporg=${GITHUB_ORG} -rltt=\"${env.GIT_TAG}\" -rltv=\"${env.GIT_TAG}\" -rlua=\"avr-iot-cellular-${env.GIT_TAG}.zip\""
105+
}
106+
}
107+
}
108+
109+
}
110+
}
111+
}
52112
}
53113

54114
post {
@@ -58,26 +118,16 @@ pipeline {
58118
}
59119
}
60120

61-
String gitTagName() {
62-
commit = getCommit()
63-
if (commit) {
64-
desc = sh(script: "git describe --tags ${commit}", returnStdout:false)?.trim()
65-
}
66-
if (isTag(decs)) {
67-
return desc
68-
} else {
69-
return commit
70-
}
71-
}
72121

73122
String getCommit() {
74123
return sh(script: 'git rev-parse HEAD', returnStdout: true)?.trim()
75124
}
76125

77-
@NonCPS
78-
boolean isTag(String desc) {
79-
match = desc =~ /.+-[0-9]+-g[0-0A-Fa-f]{6,}$/
80-
result = !match
81-
match = null
82-
return result
126+
String gitTag(){
127+
return sh(script: "git tag --contains", returnStdout: true)?.trim()
83128
}
129+
130+
def initializeGitForDeployment() {
131+
execute("git config --global user.email 'microchip@microchip.com'")
132+
execute("git config --global user.name 'Microchip Technology'")
133+
}

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
(c) 2022 Microchip Technology Inc. and its subsidiaries.
2+
3+
Subject to your compliance with these terms, you may use Microchip software
4+
and any derivatives exclusively with Microchip products. You're responsible
5+
for complying with 3rd party license terms applicable to your use of 3rd
6+
party software (including open source software) that may accompany Microchip
7+
software.
8+
9+
SOFTWARE IS "AS IS." NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY,
10+
APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
11+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
12+
13+
IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
14+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
15+
WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
16+
HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
17+
THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
18+
CLAIMS RELATED TO THE SOFTWARE WILL NOT EXCEED AMOUNT OF FEES, IF ANY,
19+
YOU PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
20+
21+

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# AVR-IoT Cellular Arduino Library
2+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/mchpTestArea/avr-iot-test?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm%2B48GgAACc5JREFUaIHlmXtwVNUdxz%2B%2Fcze7ySbZPHkFoYENDwkwpVio2AqiolZ56tgZ30Jbp5axKAJCwfC2Su0gpeig0toi6piiFdTp0AFGRUWLVIsCgfCK8jIJkGSz2ce9p39s2Oyyrxsfnen0O3Nn7vnd3%2Fec3%2B%2Fc3%2F2d3zkX%2Fsch30QnurLS2RgIVFhKD1XoARZykYgUobXRPkibFk6LliNoc09QG%2F%2FqfvBgvYD%2BumN%2FZQd0ZaWzIRy4Dm3d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ayzhgBFAKZNofBoFjAm8Dm8M5vr93%2F%2BSUvSOKJPjGwuBARYWrQOteWkyvIBeJqGK0dhM55msWdL0lHBWHdaB079HTduL7%2FwL%2FAZqJ1CYE5LswAAAAAElFTkSuQmCC&style=flat-square)
3+
4+
<p align="center">
5+
<img width="50%" style={{paddingTop: "10px", paddingBottom: "10px"}} src="./readme_images/mini-board-2.png" />
6+
</p>
7+
The AVR-IoT Cellular Mini is a development board from Microchip to develop cellular IoT applications.
8+
9+
📓 Full Arduino support through a library built on top of the open-source [DxCore](https://github.com/SpenceKonde/DxCore)
10+
11+
🔒 All the basic building blocks to create secure IoT applications (AVR Microcontroller, Secure Element and a Cellular Modem)
12+
13+
⚡ Free 150MB 90-Day SIM Card from [Truphone](https://truphone.com), providing coverage across many countries
14+
15+
📡 Bundled Antenna in the Box
16+
17+
🐞 On-Board Debugger, no need for any external tools
18+
19+
🔋 Battery Charging Circuitry with Connectors
20+
21+
🤝 Built & Designed to be Familiar to Makers, featuring a [Adafruit Feather](https://learn.adafruit.com/adafruit-feather) form-factor and a [Qwiic](https://www.sparkfun.com/qwiic) / [Stemma](https://learn.adafruit.com/introducing-adafruit-stemma-qt) Connector
22+
23+
<p align="center">
24+
25+
<span style="font-size:2em;">👉 <u>Documentation: https://iot.microchip.com/docs/</u> 👈</span>
26+
27+
</p>
28+
29+
## Examples
30+
31+
A set of examples can be in [src/examples](./src/examples/), and in the respective user guides on the [documentation website](https://iot.microchip.com/docs/arduino/userguide/architecture).
32+
33+
![](./readme_images/examples.png)
34+
35+
## Build Instructions
36+
37+
**A pre-built library can be downloaded from the releases tab. This section explains how to build the library locally for Linux. The process for Windows is similar. Most users do not need to build from source.**
38+
39+
The library depends on [MicrochipTech/cryptoauthlib](https://github.com/MicrochipTech/cryptoauthlib) to communicate with the ECC608B (Secure Element). It is added to this repository as a submodule. A CMake build configuration exists in [lib/cryptoauth](./lib/cryptoauth/), which builds `libcryptoauth.a`. Said file must be added to [./src/avr128db48](./src/avr128db48). The cryptoauth header files must be added to [./src](./src).
40+
41+
A script, [inject_cryptoauthlib.sh](./scripts/inject_cryptoauthlib.sh), builds the library and inserts the .a file together with the header files into the correct location.
42+
43+
### TLDR; How to build
44+
45+
1. Download and install all dependencies
46+
- CMake
47+
* `apt install cmake`
48+
- AVR Toolchain
49+
* `apt install gcc-avr avr-libc`
50+
2. Clone this repository with the `--recursive` flag
51+
3. Run [./scripts/inject_cryptoauthlib.sh](./scripts/inject_cryptoauthlib.sh)
File renamed without changes.

readme_images/examples.png

16.2 KB
Loading

readme_images/mini-board-2.png

3.13 MB
Loading

scripts/bundle.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
mkdir release
4-
cp src release/src -r
5-
cp library.properties release
3+
mkdir -p release/avr-iot-cellular-library
4+
cp src release/avr-iot-cellular-library -r
5+
cp library.properties release/avr-iot-cellular-library
66
cd release
77

88
echo $1

0 commit comments

Comments
 (0)