Skip to content

Commit 4af34b9

Browse files
committed
Pull request #6: Public deploy CAN bootloader firmware examples
Merge in MCU16CE/pic24-dspic-can-canfd-bootloader from develop to master * commit '261a02aec1667261ff4a74395ca76a4c8861328f': Updating changelog removing errant link base. cleaning links Render links on separate lines and make relative. Update the readme documents to remove the PEAK DLL/driver installation. move to relative path for file redirection so it works once downloaded. adding index.html files and renaming help files to be consistent. review feedback. review feedback. limit keywords used. Update source path for build system. add top level documentation and filtering information. adding demo files to release. Initial commit
2 parents b65e78f + 261a02a commit 4af34b9

File tree

489 files changed

+193190
-9
lines changed

Some content is hidden

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

489 files changed

+193190
-9
lines changed

.citd/Jenkinsfilek8s

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
/*
2+
Jenkins Shared Library:
3+
----------------------
4+
shared-library-mcu16ce - https://bitbucket.microchip.com/scm/citd/shared-library-mcu16ce.git
5+
shared-library-common - https://bitbucket.microchip.com/scm/citd/shared-library-common.git
6+
*/
7+
@Library(['shared-library-mcu16ce@master', 'shared-library-common@master']) _
8+
9+
pipeline {
10+
agent {
11+
kubernetes {
12+
inheritFrom 'pic24-dspic-can-canfd-bootloader-github-deployment'
13+
defaultContainer 'xc16-mplabx-sonar-fmpp-python'
14+
yamlFile '.citd/cloudprovider.yml'
15+
}
16+
}
17+
18+
environment {
19+
/*
20+
Common Information
21+
*/
22+
NOTIFICATION_EMAIL = '[email protected]'
23+
// GitHub production organization name
24+
GITHUB_PRODUCTION_ORGANIZATION = "microchip-pic-avr-examples"
25+
26+
/*
27+
GitHub Deploy Stage Information
28+
*/
29+
//This is the BitBucket source repo URL to be deployed
30+
BITBUCKET_SOURCE_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/pic24-dspic-can-canfd-bootloader.git'
31+
//Files or folders to be excluded from deployment, if multiple files or folders use comma separator
32+
DEPLOY_EXCLUDE_FOLDER_FILE_LIST = 'mchp_private'
33+
//Branch(s) to be deployed, if multiple branches use comma separator. DEPLOY_BRANCH_LIST is the target branch of the PR.
34+
DEPLOY_BRANCH_LIST = "master"
35+
36+
/*
37+
GitHub Page Stage Information
38+
List of GitHub Page Options:
39+
----------------------------
40+
1. GITHUB_PAGES_NONE ( Branch: None, index file path: None )
41+
2. GITHUB_PAGES_MASTER_ROOT ( Branch: Master, index file path: /root )
42+
3. GITHUB_PAGES_MASTER_DOCS ( Branch: Master, index file path: /Docs )
43+
4. GITHUB_PAGES_DEVELOP_ROOT ( Branch: Develop, index file path: /root )
44+
5. GITHUB_PAGES_DEVELOP_DOCS ( Branch: Develop, index file path: /Docs )
45+
*/
46+
GITHUB_PAGES = 'GITHUB_PAGES_MASTER_ROOT'
47+
48+
/*
49+
Project Build Stage Information
50+
*/
51+
MPLABX_PROJECT_SOURCE = "../"
52+
}
53+
54+
options {
55+
timestamps()
56+
timeout(time: 20, unit: 'MINUTES')
57+
}
58+
59+
stages {
60+
stage('Checkout') {
61+
steps {
62+
checkout scm
63+
}
64+
}
65+
66+
stage('project config update') {
67+
steps {
68+
script {
69+
mplabxProjectConfigUpdate(
70+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
71+
)
72+
}
73+
}
74+
}
75+
76+
stage('Build') {
77+
steps {
78+
script {
79+
mplabxProjectBuild(
80+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
81+
)
82+
}
83+
}
84+
}
85+
86+
// Validate main.json file
87+
stage('Validate main.json') {
88+
steps {
89+
script {
90+
validateMetaData()
91+
}
92+
}
93+
}
94+
95+
// Creating tag in Bitbucket repo
96+
stage('Bitbucket Tag Creation') {
97+
when {
98+
anyOf {
99+
allOf {
100+
not { changeRequest() }
101+
anyOf {branch 'master';}
102+
}
103+
}
104+
}
105+
106+
steps {
107+
script {
108+
bitbucketTagCreation()
109+
}
110+
}
111+
}
112+
113+
// GitHub repo creation
114+
stage('GitHub Repo Creation') {
115+
when {
116+
anyOf {
117+
allOf {
118+
not { changeRequest() }
119+
}
120+
}
121+
}
122+
123+
steps {
124+
script {
125+
githubRepoCreate(
126+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
127+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
128+
)
129+
}
130+
}
131+
}
132+
133+
// Deploying the code to GitHub
134+
stage('GitHub Deploy Source') {
135+
when {
136+
anyOf {
137+
allOf {
138+
not { changeRequest() }
139+
}
140+
}
141+
}
142+
143+
steps {
144+
script {
145+
githubDeploySource(
146+
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}",
147+
deployBranchList: "${env.DEPLOY_BRANCH_LIST}",
148+
deployExcludeFileList: "${env.DEPLOY_EXCLUDE_FOLDER_FILE_LIST}",
149+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
150+
)
151+
}
152+
}
153+
}
154+
155+
// Creating GitHub release
156+
stage('GitHub release') {
157+
when {
158+
anyOf {
159+
allOf {
160+
not { changeRequest() }
161+
}
162+
}
163+
}
164+
165+
steps {
166+
script {
167+
githubReleaseCreate(
168+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
169+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
170+
)
171+
}
172+
}
173+
}
174+
175+
// Creating GitHub Page
176+
stage('GitHub Page Create') {
177+
when {
178+
anyOf {
179+
allOf {
180+
not { changeRequest() }
181+
anyOf {branch 'master';}
182+
}
183+
}
184+
}
185+
186+
steps {
187+
script {
188+
githubPageCreate(
189+
githubPage: "${env.GITHUB_PAGES}",
190+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
191+
)
192+
}
193+
}
194+
}
195+
196+
//Deploying the Github content to portal
197+
stage('Portal-Deploy') {
198+
when {
199+
allOf {
200+
not { changeRequest() }
201+
anyOf {branch 'master';}
202+
}
203+
}
204+
steps {
205+
script {
206+
portalDeploy(
207+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
208+
)
209+
}
210+
}
211+
}
212+
}
213+
214+
post {
215+
success{
216+
script {
217+
sendMail(
218+
mailId: "${env.NOTIFICATION_EMAIL}",
219+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
220+
body: "Something is right with ${env.BUILD_URL}"
221+
)
222+
}
223+
}
224+
failure {
225+
script {
226+
sendMail(
227+
mailId: "${env.NOTIFICATION_EMAIL}",
228+
subject: "Failure Pipeline: ${currentBuild.fullDisplayName}",
229+
body: "Something is right with ${env.BUILD_URL}"
230+
)
231+
}
232+
}
233+
}
234+
}

.citd/cloudprovider.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: xc16-mplabx-sonar-fmpp-python
5+
spec:
6+
containers:
7+
- name: xc16-mplabx-sonar-fmpp-python
8+
image: artifacts.microchip.com:7999/microchip/citd/bundles/xc16-mplabx-sonar-fmpp-python-yarn-node:latest
9+
imagePullPolicy: Always
10+
command: ['cat']
11+
tty: true
12+
resources:
13+
requests:
14+
cpu: 1
15+
memory: 1Gi
16+
limits:
17+
cpu: 2
18+
memory: 2Gi

.main-meta/main.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"metaDataVersion":"1.0.0",
3+
"category":"com.microchip.ide.project",
4+
"content":{
5+
"metaDataVersion":"1.0.0",
6+
"name":"com.microchip.mplabx.project.pic24-dspic-can-canfd-bootloader",
7+
"version":"x.x.x",
8+
"displayName":"PIC24/dsPIC CAN/CAN-FD Bootloader",
9+
"projectName":"pic24-dspic-can-canfd-bootloader",
10+
"shortDescription":"CAN and CAN-FD bootloader example using the ISO-15765-2 CAN transport layer for the PIC24 and dsPIC product lines.",
11+
"ide":{
12+
"name":"MPLABX",
13+
"semverRange":">=5.40.0"
14+
},
15+
"compiler":{
16+
"name":"XC16",
17+
"semverRange":"^1.61.0"
18+
},
19+
"dfp":{
20+
"name":"dsPIC33CK-MP_DFP",
21+
"semverRange":">=1.5.135"
22+
},
23+
"configurator": {
24+
"name": "MCC",
25+
"semverRange": ">=4.0.1"
26+
},
27+
"device":{
28+
"metaDataVersion":"1.0.0",
29+
"category":"com.microchip.portal.contentRef",
30+
"content":{
31+
"metaDataVersion":"1.0.0",
32+
"category":"com.microchip.device",
33+
"name":"dsPIC33CK256MP508",
34+
"versionRange":"*"
35+
}
36+
},
37+
"peripherals":[
38+
"CAN",
39+
"CAN FD"
40+
],
41+
"keywords":[
42+
"CAN",
43+
"Bootloader",
44+
"CAN-FD"
45+
]
46+
}
47+
}

LICENSE.txt

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

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
![image](images/microchip.jpg)
22

3-
## %repoDescritpion%
4-
5-
Board Image if any.
3+
## PIC24/dsPIC CAN/CAN-FD Bootloader Demo
64

75
## Summary
86

7+
An example bootloader using the 16-bit MCC bootloader and the CAN or CAN-FD peripheral.
98

109
## Related Documentation
1110

11+
https://www.microchip.com/16-bit-bootloader
1212

13-
## Software Used
14-
15-
16-
## Hardware Used
13+
## Setup And Operation
1714

15+
There are 3 configurations provided in this demo:
16+
1) Using CAN classic on a device with the CAN-FD module
17+
2) Using CAN-FD on a device with the CAN-FD module
18+
3) Using CAN classic on a device with the enhanced CAN controller
1819

19-
## Setup
20+
The hardware and software setup is different for each of these use cases. There are readme*.html files associated with each folder that describe the required hardware and software as well as how to setup and run each of the corresponding demos.
2021

22+
[dspic33ck-can](/dspic33ck-can "dsPIC33CK256MP508 CAN based bootloader example project")
2123

22-
## Operation
24+
[dspic33ck-canfd](/dspic33ck-canfd "dsPIC33CK256MP508 CAN-FD based bootloader example project")
2325

26+
[dspic33ep-can2.0b](/dspic33ep-can2.0b "dsPIC33EP512MU810 CAN based bootloader example project")
2427

2528

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PIC24/dsPIC CAN / CAN-FD Bootloader Firmware v1.0.0
2+
### Release Highlights
3+
4+
CAN and CAN-FD bootloader firmware
5+
Requires Unified Bootloader Host Application 1.17.0
6+
7+
### Features Added\Updated
8+
9+
Initial Release

0 commit comments

Comments
 (0)