-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in MCU16CE/an957-sensored-bldc-motor-control from develop to master * commit '5812b4703651078ab78c8d451ffe2471ff7f68f3': Minor modification to readme Six-Step Commutation PWM Switching Schemes for BLDC Motor using dsPIC33CK Curiosity Board and MATLAB SIMULINK link is added to readme.md Minor correction is done in Readme.md Updated README.md Updated changelog.md, README.md, main.json and image files Updated Jenkinsfilek8s file Initial commit
- Loading branch information
Showing
10 changed files
with
435 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,262 @@ | ||
/* | ||
Jenkins Shared Library: | ||
---------------------- | ||
shared-library-mcu16ce - https://bitbucket.microchip.com/scm/citd/shared-library-mcu16ce.git | ||
shared-library-common - https://bitbucket.microchip.com/scm/citd/shared-library-common.git | ||
*/ | ||
@Library(['shared-library-mcu16ce@master', 'shared-library-common@master']) _ | ||
|
||
pipeline { | ||
agent { | ||
kubernetes { | ||
inheritFrom 'an957-sensored-bldc-motor-control-github-deployment' | ||
defaultContainer 'xc16-mplabx-sonar-fmpp-python' | ||
yamlFile '.citd/cloudprovider.yml' | ||
} | ||
} | ||
|
||
environment { | ||
/* | ||
Common Information | ||
*/ | ||
NOTIFICATION_EMAIL = '[email protected]' | ||
// GitHub production organization name | ||
GITHUB_PRODUCTION_ORGANIZATION = "microchip-pic-avr-solutions" | ||
|
||
/* | ||
GitHub Deploy Stage Information | ||
*/ | ||
//This is the BitBucket source repo URL to be deployed | ||
BITBUCKET_SOURCE_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/an957-sensored-bldc-motor-control.git' | ||
//Files or folders to be excluded from deployment, if multiple files or folders use comma separator | ||
DEPLOY_EXCLUDE_FOLDER_FILE_LIST = 'mchp_private,.mchp_private,sandbox,.sandbox' | ||
//Branch(s) to be deployed, if multiple branches use comma separator. DEPLOY_BRANCH_LIST is the target branch of the PR. | ||
DEPLOY_BRANCH_LIST = "master" | ||
/*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. | ||
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.*/ | ||
UNAPPROVED_KEYWORDS_OVERRIDE_LIST="NONE" | ||
|
||
/* | ||
GitHub Page Stage Information | ||
List of GitHub Page Options: | ||
---------------------------- | ||
1. GITHUB_PAGES_NONE ( Branch: None, index file path: None ) | ||
2. GITHUB_PAGES_MASTER_ROOT ( Branch: Master, index file path: /root ) | ||
3. GITHUB_PAGES_MASTER_DOCS ( Branch: Master, index file path: /Docs ) | ||
4. GITHUB_PAGES_DEVELOP_ROOT ( Branch: Develop, index file path: /root ) | ||
5. GITHUB_PAGES_DEVELOP_DOCS ( Branch: Develop, index file path: /Docs ) | ||
*/ | ||
GITHUB_PAGES = 'GITHUB_PAGES_NONE' | ||
|
||
/* | ||
Project Build Stage Information | ||
*/ | ||
MPLABX_PROJECT_SOURCE = "../" | ||
} | ||
|
||
triggers { | ||
cron(env.BRANCH_NAME == 'develop' ? 'H H 1 * *': '') | ||
} | ||
|
||
options { | ||
timestamps() | ||
timeout(time: 30, unit: 'MINUTES') | ||
} | ||
|
||
stages { | ||
stage('Checkout') { | ||
steps { | ||
checkout scm | ||
sh "git submodule update --init" | ||
} | ||
} | ||
|
||
stage('project config update') { | ||
steps { | ||
script { | ||
mplabxProjectConfigUpdate( | ||
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}" | ||
) | ||
} | ||
} | ||
} | ||
|
||
stage('Build') { | ||
steps { | ||
script { | ||
sh("npm install -g xml2js") | ||
sh("npm link xml2js") | ||
mplabxProjectBuild( | ||
sourceFilePath: "${env.MPLABX_PROJECT_SOURCE}" | ||
) | ||
} | ||
} | ||
} | ||
|
||
|
||
//MisraCheck code analysis | ||
stage('MISRA Check') { | ||
steps { | ||
script { | ||
misraCheck( | ||
sourceProjectPath: "${env.MPLABX_PROJECT_SOURCE}" | ||
) | ||
} | ||
} | ||
} | ||
|
||
// Validate main.json file | ||
stage('Validate main.json') { | ||
steps { | ||
script { | ||
validateMetaData( | ||
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}" | ||
) | ||
} | ||
} | ||
} | ||
|
||
stage('Doxygen files generation') { | ||
when { | ||
anyOf { | ||
allOf { | ||
not { changeRequest() } | ||
} | ||
} | ||
} | ||
steps { | ||
container('buildtools') { | ||
script { | ||
doxygen() | ||
} | ||
} | ||
} | ||
} | ||
|
||
// GitHub repo creation | ||
stage('GitHub Repo Creation') { | ||
when { | ||
anyOf { | ||
allOf { | ||
not { changeRequest() } | ||
anyOf {branch 'master'; branch 'test_deploy';} | ||
} | ||
} | ||
} | ||
|
||
steps { | ||
script { | ||
githubRepoCreate( | ||
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}", | ||
deployBranchList: "${DEPLOY_BRANCH_LIST}" | ||
) | ||
} | ||
} | ||
} | ||
|
||
// Deploying the code to GitHub | ||
stage('GitHub Deploy Source') { | ||
when { | ||
anyOf { | ||
allOf { | ||
not { changeRequest() } | ||
anyOf {branch 'master'; branch 'test_deploy';} | ||
} | ||
} | ||
} | ||
|
||
steps { | ||
script { | ||
githubDeploySource( | ||
bitbucketUrl: "${env.BITBUCKET_SOURCE_URL}", | ||
deployBranchList: "${env.DEPLOY_BRANCH_LIST}", | ||
deployExcludeFileList: "${env.DEPLOY_EXCLUDE_FOLDER_FILE_LIST}", | ||
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}", | ||
includeSubmoduleCode: "true" | ||
) | ||
} | ||
} | ||
} | ||
|
||
// Creating GitHub release | ||
stage('GitHub release') { | ||
when { | ||
anyOf { | ||
allOf { | ||
not { changeRequest() } | ||
anyOf {branch 'master'; branch 'test_deploy';} | ||
} | ||
} | ||
} | ||
|
||
steps { | ||
script { | ||
githubReleaseCreate( | ||
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}", | ||
deployBranchList: "${DEPLOY_BRANCH_LIST}" | ||
) | ||
} | ||
} | ||
} | ||
|
||
// Creating GitHub Page | ||
stage('GitHub Page Create') { | ||
when { | ||
anyOf { | ||
allOf { | ||
not { changeRequest() } | ||
anyOf {branch 'master';} | ||
} | ||
} | ||
} | ||
|
||
steps { | ||
script { | ||
githubPageCreate( | ||
githubPage: "${env.GITHUB_PAGES}", | ||
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}" | ||
) | ||
} | ||
} | ||
} | ||
|
||
//Deploying the Github content to portal | ||
stage('Portal-Deploy') { | ||
when { | ||
allOf { | ||
not { changeRequest() } | ||
anyOf {branch 'master';} | ||
} | ||
} | ||
steps { | ||
script { | ||
portalDeploy( | ||
githubOrgName: "${env.GITHUB_PRODUCTION_ORGANIZATION}", | ||
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}" | ||
) | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
success{ | ||
script { | ||
sendMail( | ||
mailId: "${env.NOTIFICATION_EMAIL}", | ||
subject: "Successful Pipeline: ${currentBuild.fullDisplayName}", | ||
body: "Something is right with ${env.BUILD_URL}" | ||
) | ||
} | ||
} | ||
failure { | ||
script { | ||
sendMail( | ||
mailId: "${env.NOTIFICATION_EMAIL}", | ||
subject: "Failure Pipeline: ${currentBuild.fullDisplayName}", | ||
body: "Something is right with ${env.BUILD_URL}" | ||
) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: xc16-mplabx-sonar-fmpp-python | ||
spec: | ||
containers: | ||
- name: xc16-mplabx-sonar-fmpp-python | ||
image: artifacts.microchip.com:7999/microchip/citd/bundles/xc16-mplabx-sonar-fmpp-python-yarn-node:latest | ||
imagePullPolicy: Always | ||
command: ['cat'] | ||
tty: true | ||
resources: | ||
requests: | ||
cpu: 500m | ||
memory: 1500Mi | ||
limits: | ||
cpu: 1 | ||
memory: 2Gi | ||
- name: buildtools | ||
image: artifacts.microchip.com:7999/microchip/buildtools/doxygen:1.8.15-r0 | ||
imagePullPolicy: Always | ||
command: ['cat'] | ||
tty: true | ||
resources: | ||
requests: | ||
cpu: 500m | ||
memory: 750Mi | ||
limits: | ||
cpu: 1 | ||
memory: 1Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# .gitignore file | ||
# | ||
# Set up for Microchip/MPLAB X® development | ||
# | ||
# Default gitignore files for code examples, only removing/ignoring usual MPLAB X® clutter | ||
|
||
# Excluding object files | ||
*.o | ||
*.ko | ||
*.obj | ||
*.elf | ||
|
||
# Excluding documentation output directories | ||
#docs/ | ||
|
||
# Excluding any executables | ||
*.exe | ||
|
||
#Excluding Files/Folders Auto-Generated by Test Harness | ||
.generated_files/ | ||
|
||
# Excluding Netbeans specific build directories and file types | ||
~*.* | ||
.generated_files/ | ||
nbproject/build/ | ||
nbproject/dist/ | ||
nbproject/private/ | ||
nbproject/disassembly/ | ||
build/ | ||
dist/ | ||
private/ | ||
disassembly/ | ||
*.zip | ||
!code-templates.zip | ||
*.mk | ||
*.bash | ||
*.dump | ||
Makefile-genesis.properties | ||
|
||
# Excluding MPLAB X® Trace files | ||
*.log | ||
*.inx | ||
|
||
# KDE specific | ||
.directory | ||
|
||
# Misc | ||
.svn | ||
*.bak | ||
*.doc | ||
*.docx | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"metaDataVersion":"1.0.0", | ||
"category":"com.microchip.ide.project", | ||
"content":{ | ||
"metaDataVersion":"1.3.0", | ||
"name":"com.microchip.mplabx.project.an957-sensored-bldc-motor-control", | ||
"version":"1.0.0", | ||
"displayName":"AN957 Sensored BLDC motor control", | ||
"projectName":"an957-sensored-bldc-motor-control", | ||
"shortDescription":"Introduction to AN957 Application Note", | ||
"ide":{ | ||
"name":"MPLABX", | ||
"semverRange":">=6.10" | ||
}, | ||
"compiler":{ | ||
"name":"XC16", | ||
"semverRange":">=2.10" | ||
}, | ||
"dfp":{ | ||
"name":"dsPIC33CK-MP_DFP", | ||
"semverRange":"=1.11.346" | ||
}, | ||
"configurator": { | ||
"name": "MCC", | ||
"semverRange": ">=4.0.1" | ||
}, | ||
"device":{ | ||
"metaDataVersion":"1.0.0", | ||
"category":"com.microchip.portal.contentRef", | ||
"content":{ | ||
"metaDataVersion":"1.0.0", | ||
"category":"com.microchip.device", | ||
"name":"dsPIC33CK256MP508", | ||
"versionRange":"*" | ||
} | ||
}, | ||
"peripherals":[ | ||
"ADC", | ||
"PWM" | ||
], | ||
"keywords":[ | ||
"Motor Control", | ||
"BLDC", | ||
"Trapezoidal Control", | ||
"Hall Sensor", | ||
"dsPIC" | ||
] | ||
} | ||
} |
Oops, something went wrong.