Skip to content

Commit f7593cd

Browse files
committed
Pull request #25: Develop
Merge in MCU16CE/dspic33a-curiosity-oob from develop to master * commit 'b43694f63b0b8f7471e35f6ac0c2624f5570318b': (58 commits) adding back "com.microchip..." changing "name" field to be something that will be unique. making projectName match the project file name. Updated to include "GP" and "OOB" for project name and "GP" in description. add _gp to name add _gp review feedback. review feedback. Remove extraneous file that gets notification as missing. Update to publicly released tools missing "K" in device name. make pot 16-bit instead of 15. Coding Style Guide rule 4.2.4: https://confluence.microchip.com/display/SOLUTIONS/Coding+Style+Guide make print more clearing hex. fix issue of characters not being cleared out on each print. make local functions static. remove unused function. hide cursor moving parentheses Moved variable definitions * Refactored main to be simpler. * Added functions for terminal commands. buttons can now work together moved braces to new line according to coding guidelines ...
2 parents 0ab6ab1 + b43694f commit f7593cd

Some content is hidden

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

74 files changed

+6065
-18
lines changed

.citd/Jenkinsfilek8s

+276
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
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 'dspic33a-curiosity-oob-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 = '1f1319de.microchip.com@amer.teams.ms'
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/dspic33a-curiosity-oob.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,.mchp_private,sandbox,.sandbox'
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+
/*When using the main.json schema version 1.3.0 or higher, the PORTAL will first reject registration attempt when an unapproved keyword is found, but can be forced to accept.
36+
This argument is used to provide the list of unapproved keywords (also listed in main.json) which the deployment script will force the PORTAL to accept.*/
37+
UNAPPROVED_KEYWORDS_OVERRIDE_LIST="NONE"
38+
39+
/*
40+
GitHub Page Stage Information
41+
List of GitHub Page Options:
42+
----------------------------
43+
1. GITHUB_PAGES_NONE ( Branch: None, index file path: None )
44+
2. GITHUB_PAGES_MASTER_ROOT ( Branch: Master, index file path: /root )
45+
3. GITHUB_PAGES_MASTER_DOCS ( Branch: Master, index file path: /Docs )
46+
4. GITHUB_PAGES_DEVELOP_ROOT ( Branch: Develop, index file path: /root )
47+
5. GITHUB_PAGES_DEVELOP_DOCS ( Branch: Develop, index file path: /Docs )
48+
*/
49+
GITHUB_PAGES = 'GITHUB_PAGES_NONE'
50+
51+
/*
52+
Project Build Stage Information
53+
*/
54+
MPLABX_PROJECT_SOURCE = "../"
55+
}
56+
57+
triggers {
58+
cron(env.BRANCH_NAME == 'develop' ? 'H H 1 * *': '')
59+
}
60+
61+
options {
62+
timestamps()
63+
timeout(time: 30, unit: 'MINUTES')
64+
}
65+
66+
stages {
67+
stage('Checkout') {
68+
steps {
69+
checkout scm
70+
}
71+
}
72+
73+
stage('project config update') {
74+
steps {
75+
script {
76+
mplabxProjectConfigUpdate(
77+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
78+
)
79+
}
80+
}
81+
}
82+
83+
stage('Build') {
84+
steps {
85+
script {
86+
mplabxProjectBuild(
87+
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}"
88+
)
89+
}
90+
}
91+
}
92+
93+
94+
//MisraCheck code analysis
95+
stage('MISRA Check') {
96+
steps {
97+
script {
98+
misraCheck(
99+
sourceProjectPath: "${env.MPLABX_PROJECT_SOURCE}"
100+
)
101+
}
102+
}
103+
}
104+
105+
// Validate main.json file
106+
stage('Validate main.json') {
107+
steps {
108+
script {
109+
validateMetaData(
110+
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}"
111+
)
112+
}
113+
}
114+
}
115+
116+
// Creating tag in Bitbucket repo
117+
stage('Bitbucket Tag Creation') {
118+
when {
119+
anyOf {
120+
allOf {
121+
not { changeRequest() }
122+
anyOf {branch 'master';}
123+
}
124+
}
125+
}
126+
127+
steps {
128+
script {
129+
bitbucketTagCreation()
130+
}
131+
}
132+
}
133+
134+
stage('Doxygen files generation') {
135+
when {
136+
anyOf {
137+
allOf {
138+
not { changeRequest() }
139+
}
140+
}
141+
}
142+
steps {
143+
container('buildtools') {
144+
script {
145+
doxygen()
146+
}
147+
}
148+
}
149+
}
150+
151+
// GitHub repo creation
152+
stage('GitHub Repo Creation') {
153+
when {
154+
anyOf {
155+
allOf {
156+
not { changeRequest() }
157+
anyOf {branch 'master'; branch 'test_deploy';}
158+
}
159+
}
160+
}
161+
162+
steps {
163+
script {
164+
githubRepoCreate(
165+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
166+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
167+
)
168+
}
169+
}
170+
}
171+
172+
// Deploying the code to GitHub
173+
stage('GitHub Deploy Source') {
174+
when {
175+
anyOf {
176+
allOf {
177+
not { changeRequest() }
178+
anyOf {branch 'master'; branch 'test_deploy';}
179+
}
180+
}
181+
}
182+
183+
steps {
184+
script {
185+
githubDeploySource(
186+
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}",
187+
deployBranchList: "${env.DEPLOY_BRANCH_LIST}",
188+
deployExcludeFileList: "${env.DEPLOY_EXCLUDE_FOLDER_FILE_LIST}",
189+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
190+
)
191+
}
192+
}
193+
}
194+
195+
// Creating GitHub release
196+
stage('GitHub release') {
197+
when {
198+
anyOf {
199+
allOf {
200+
not { changeRequest() }
201+
anyOf {branch 'master'; branch 'test_deploy';}
202+
}
203+
}
204+
}
205+
206+
steps {
207+
script {
208+
githubReleaseCreate(
209+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
210+
deployBranchList: "${DEPLOY_BRANCH_LIST}"
211+
)
212+
}
213+
}
214+
}
215+
216+
// Creating GitHub Page
217+
stage('GitHub Page Create') {
218+
when {
219+
anyOf {
220+
allOf {
221+
not { changeRequest() }
222+
anyOf {branch 'master';}
223+
}
224+
}
225+
}
226+
227+
steps {
228+
script {
229+
githubPageCreate(
230+
githubPage: "${env.GITHUB_PAGES}",
231+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}"
232+
)
233+
}
234+
}
235+
}
236+
237+
//Deploying the Github content to portal
238+
stage('Portal-Deploy') {
239+
when {
240+
allOf {
241+
not { changeRequest() }
242+
anyOf {branch 'master';}
243+
}
244+
}
245+
steps {
246+
script {
247+
portalDeploy(
248+
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}",
249+
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}"
250+
)
251+
}
252+
}
253+
}
254+
}
255+
256+
post {
257+
success{
258+
script {
259+
sendMail(
260+
mailId: "${env.NOTIFICATION_EMAIL}",
261+
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}",
262+
body: "Something is right with ${env.BUILD_URL}"
263+
)
264+
}
265+
}
266+
failure {
267+
script {
268+
sendMail(
269+
mailId: "${env.NOTIFICATION_EMAIL}",
270+
subject: "Failure Pipeline: ${currentBuild.fullDisplayName}",
271+
body: "Something is right with ${env.BUILD_URL}"
272+
)
273+
}
274+
}
275+
}
276+
}

.citd/cloudprovider.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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: 500m
15+
memory: 1500Mi
16+
limits:
17+
cpu: 1
18+
memory: 2Gi
19+
- name: buildtools
20+
image: artifacts.microchip.com:7999/microchip/buildtools/doxygen:1.8.15-r0
21+
imagePullPolicy: Always
22+
command: ['cat']
23+
tty: true
24+
resources:
25+
requests:
26+
cpu: 500m
27+
memory: 750Mi
28+
limits:
29+
cpu: 1
30+
memory: 1Gi

.gitignore

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# .gitignore file
2+
#
3+
# Set up for Microchip/MPLAB X® development
4+
#
5+
# Default gitignore files for code examples, only removing/ignoring usual MPLAB X® clutter
6+
7+
# Excluding object files
8+
*.o
9+
*.ko
10+
*.obj
11+
*.elf
12+
13+
# Excluding documentation output directories
14+
#docs/
15+
16+
# Excluding any executables
17+
*.exe
18+
19+
#Excluding Files/Folders Auto-Generated by Test Harness
20+
.generated_files/
21+
22+
# Excluding Netbeans specific build directories and file types
23+
~*.*
24+
.generated_files/
25+
nbproject/build/
26+
nbproject/dist/
27+
nbproject/private/
28+
nbproject/disassembly/
29+
build/
30+
dist/
31+
private/
32+
disassembly/
33+
*.zip
34+
!code-templates.zip
35+
*.mk
36+
*.bash
37+
*.dump
38+
Makefile-genesis.properties
39+
40+
# Excluding MPLAB X® Trace files
41+
*.log
42+
*.inx
43+
44+
# KDE specific
45+
.directory
46+
47+
# Misc
48+
.svn
49+
*.bak
50+
*.doc
51+
*.docx
52+
53+
54+

0 commit comments

Comments
 (0)