Skip to content

Commit 8ad87f0

Browse files
author
Microchip Technology
committed
Deploy 1.0.0 to pic-avr-solutions github
0 parents  commit 8ad87f0

File tree

132 files changed

+15918
-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.

132 files changed

+15918
-0
lines changed

.main-meta/main.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"metaDataVersion": "1.0.0",
3+
"category": "com.microchip.ide.project",
4+
"content": {
5+
"metaDataVersion": "1.3.0",
6+
"name": "com.microchip.mcu8.mplabx.project.avr64du32-cnano-8bit-mdfu-solution-mplab-mcc",
7+
"version": "1.0.0",
8+
"displayName": "8-Bit Microchip Device Firmware Update (MDFU) Solution for the AVR64DU32 Curiosity Nano Evaluation Kit",
9+
"projectName": "avr64du32-cnano-8bit-mdfu-solution-mplab-mcc",
10+
"shortDescription": "This repository contains two MPLAB® X projects designed to showcase the 8-Bit MDFU Client library and the ecosystem it creates.",
11+
"ide": {
12+
"name": "MPLAB X",
13+
"semverRange": "^6.20.0"
14+
},
15+
"compiler": [
16+
{
17+
"name": "XC8",
18+
"semverRange": "^3.00.0"
19+
},
20+
{
21+
"name": "AVR GCC",
22+
"semverRange": "^7.3.0"
23+
}
24+
],
25+
"dfp": {
26+
"name": "AVR-Dx_DFP",
27+
"semverRange": "^2.6.303"
28+
},
29+
"configurator": {
30+
"name": "MCC",
31+
"semverRange": "^5.7.1"
32+
},
33+
"device": {
34+
"metaDataVersion": "1.0.0",
35+
"category": "com.microchip.portal.contentRef",
36+
"content": {
37+
"metaDataVersion": "1.0.0",
38+
"category": "com.microchip.device",
39+
"name": "AVR64DU32",
40+
"versionRange": "*"
41+
}
42+
},
43+
"author": "Microchip",
44+
"peripherals": [
45+
"Interrupt",
46+
"UART",
47+
"NVMCTRL",
48+
"Timer"
49+
],
50+
"keywords": [
51+
"Melody",
52+
"MCC Melody",
53+
"Curiosity",
54+
"Curiosity Nano",
55+
"Bootloader",
56+
"Memory",
57+
"Serial Communication",
58+
"8-bit MDFU Client",
59+
"Microchip Device Firmware Update",
60+
"MDFU",
61+
"Virtual COM Port",
62+
"File Transfer Protocol"
63+
],
64+
"additionalData": {
65+
"longDescription": {
66+
"metaDataVersion": "1.0.0",
67+
"category": "com.microchip.portal.fileRef",
68+
"content": {
69+
"metaDataVersion": "1.0.0",
70+
"fileName": "./README.md",
71+
"mimeType": "text/markdown"
72+
}
73+
}
74+
}
75+
}
76+
}

AVR64DU32_Application.X/AVR64DU32_Application.mc3

Lines changed: 277 additions & 0 deletions
Large diffs are not rendered by default.
4.12 KB
Binary file not shown.

AVR64DU32_Application.X/Makefile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#
2+
# There exist several targets which are by default empty and which can be
3+
# used for execution of your targets. These targets are usually executed
4+
# before and after some main targets. They are:
5+
#
6+
# .build-pre: called before 'build' target
7+
# .build-post: called after 'build' target
8+
# .clean-pre: called before 'clean' target
9+
# .clean-post: called after 'clean' target
10+
# .clobber-pre: called before 'clobber' target
11+
# .clobber-post: called after 'clobber' target
12+
# .all-pre: called before 'all' target
13+
# .all-post: called after 'all' target
14+
# .help-pre: called before 'help' target
15+
# .help-post: called after 'help' target
16+
#
17+
# Targets beginning with '.' are not intended to be called on their own.
18+
#
19+
# Main targets can be executed directly, and they are:
20+
#
21+
# build build a specific configuration
22+
# clean remove built files from a configuration
23+
# clobber remove all built files
24+
# all build all configurations
25+
# help print help mesage
26+
#
27+
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
28+
# .help-impl are implemented in nbproject/makefile-impl.mk.
29+
#
30+
# Available make variables:
31+
#
32+
# CND_BASEDIR base directory for relative paths
33+
# CND_DISTDIR default top distribution directory (build artifacts)
34+
# CND_BUILDDIR default top build directory (object files, ...)
35+
# CONF name of current configuration
36+
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
37+
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
38+
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
39+
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
40+
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
41+
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
42+
#
43+
# NOCDDL
44+
45+
46+
# Environment
47+
MKDIR=mkdir
48+
CP=cp
49+
CCADMIN=CCadmin
50+
RANLIB=ranlib
51+
52+
53+
# build
54+
build: .build-post
55+
56+
.build-pre:
57+
# Add your pre 'build' code here...
58+
59+
.build-post: .build-impl
60+
# Add your post 'build' code here...
61+
62+
63+
# clean
64+
clean: .clean-post
65+
66+
.clean-pre:
67+
# Add your pre 'clean' code here...
68+
# WARNING: the IDE does not call this target since it takes a long time to
69+
# simply run make. Instead, the IDE removes the configuration directories
70+
# under build and dist directly without calling make.
71+
# This target is left here so people can do a clean when running a clean
72+
# outside the IDE.
73+
74+
.clean-post: .clean-impl
75+
# Add your post 'clean' code here...
76+
77+
78+
# clobber
79+
clobber: .clobber-post
80+
81+
.clobber-pre:
82+
# Add your pre 'clobber' code here...
83+
84+
.clobber-post: .clobber-impl
85+
# Add your post 'clobber' code here...
86+
87+
88+
# all
89+
all: .all-post
90+
91+
.all-pre:
92+
# Add your pre 'all' code here...
93+
94+
.all-post: .all-impl
95+
# Add your post 'all' code here...
96+
97+
98+
# help
99+
help: .help-post
100+
101+
.help-pre:
102+
# Add your pre 'help' code here...
103+
104+
.help-post: .help-impl
105+
# Add your post 'help' code here...
106+
107+
108+
109+
# include project implementation makefile
110+
include nbproject/Makefile-impl.mk
111+
112+
# include project make variables
113+
include nbproject/Makefile-variables.mk

AVR64DU32_Application.X/main.c

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/*
2+
* MAIN Generated Driver File
3+
*
4+
* @file main.c
5+
*
6+
* @defgroup main MAIN
7+
*
8+
* @brief This is the generated driver implementation file for the MAIN driver.
9+
*
10+
* @version MAIN Driver Version 1.0.2
11+
*
12+
* @version Package Version: 3.1.2
13+
*/
14+
15+
/*
16+
� [2025] Microchip Technology Inc. and its subsidiaries.
17+
18+
Subject to your compliance with these terms, you may use Microchip
19+
software and any derivatives exclusively with Microchip products.
20+
You are responsible for complying with 3rd party license terms
21+
applicable to your use of 3rd party software (including open source
22+
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
23+
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
24+
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
25+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
26+
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
27+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
28+
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
29+
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
30+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
31+
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
32+
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
33+
THIS SOFTWARE.
34+
*/
35+
#include "mcc_generated_files/system/system.h"
36+
#include "mcc_generated_files/reset/rstctrl.h"
37+
#include <util/delay.h>
38+
39+
/*
40+
Main application
41+
*/
42+
#include <stdint.h>
43+
#ifdef __XC8__
44+
#include <xc.h>
45+
#endif
46+
volatile const uint32_t
47+
#ifdef __XC8__
48+
__at(0xFFFC)
49+
#endif
50+
applicationFooter __attribute__((used, section("application_footer"))) = 0xFFFFFFFF;
51+
52+
static flash_address_t footerSignatureLocation = 0xFFFC;
53+
54+
void BlinkLED(void)
55+
{
56+
LED_Toggle();
57+
}
58+
59+
int main(void)
60+
{
61+
SYSTEM_Initialize();
62+
// delay for some time to give the user some time to connect to a terminal
63+
_delay_ms(3000);
64+
65+
TCA0_OverflowCallbackRegister(&BlinkLED);
66+
ENABLE_INTERRUPTS();
67+
68+
printf("===================================================\r\n");
69+
printf("Hello and thank you for downloading and trying out the 8-Bit MDFU Client solution for the AVR64DU32 Curiosity Nano Development Board.\r\n");
70+
_delay_ms(150);
71+
printf("===================================================\r\n");
72+
printf("You should be able to see that the on-board LED is blinking at a continuous rate.\r\nThis blinking LED is being controlled by a timer interrupt.\r\n");
73+
_delay_ms(250);
74+
printf("\r\nTo pass control to the bootloader code, send the value 'r' over the Data Visualizer Terminal or press and hold the on-board switch.\r\n");
75+
76+
while (1)
77+
{
78+
if (UART1_IsRxReady())
79+
{
80+
if (UART1_Read() == 'r')
81+
{
82+
flash_address_t erasePageAddress = FLASH_PageAddressGet(footerSignatureLocation);
83+
84+
nvm_status_t result = FLASH_PageErase(erasePageAddress);
85+
86+
if (result == NVM_OK)
87+
{
88+
// In this example, we are erasing the footer data to force the bootloader to take control but this process can be customized to fit your needs.
89+
printf("Erasing the footer hash... \r\nResetting...\r\n");
90+
RSTCTRL_reset();
91+
}
92+
else
93+
{
94+
printf("Error: Could not erase the footer data.\r\n");
95+
}
96+
}
97+
}
98+
else if (BTN_GetValue() == 0U)
99+
{
100+
printf("Resetting...\r\n");
101+
_delay_ms(50);
102+
RSTCTRL_reset();
103+
}
104+
}
105+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This file has been autogenerated by MPLAB Code Configurator. Please do not edit this file.
2+
3+
manifest_file_version: 1.0.0
4+
project: AVR64DU32_Application
5+
creation_date: 2025-01-21T14:42:41.429-08:00[America/Los_Angeles]
6+
operating_system: Windows 10
7+
mcc_mode: IDE
8+
mcc_mode_version: v6.20
9+
device_name: AVR64DU32
10+
compiler: XC8 3.00
11+
mcc_version: 5.5.1
12+
mcc_core_version: 5.7.1
13+
content_manager_version: 5.0.1
14+
is_mcc_offline: false
15+
is_using_prerelease_versions: false
16+
mcc_content_registries: https://registry.npmjs.org/,https://artifacts.microchip.com/artifactory/api/npm/npm/
17+
device_library: {library_class: com.microchip.mcc.melody.Library, name: Melody, version: 2.8.0}
18+
packs: {name: AVR-Dx_DFP, version: 2.6.303}
19+
modules:
20+
- {name: '@mchp-mcc/avr-8bit', type: MELODY, version: 4.12.0}
21+
- {name: '@mchp-mcc/avr8-configuration-bits-v1', type: MELODY, version: 4.2.14}
22+
- {name: '@mchp-mcc/avr8-pin-manager', type: MELODY, version: 4.6.1}
23+
- {name: '@mchp-mcc/main-manager', type: MELODY, version: 3.1.2}
24+
- {name: '@mchp-mcc/pin-content-processor', type: MELODY, version: 3.9.0}
25+
- {name: '@mchp-mcc/scf-avr8-clkctrl-v3', type: MELODY, version: 2.0.10}
26+
- {name: '@mchp-mcc/scf-avr8-interrupt-v1', type: MELODY, version: 5.0.12}
27+
- {name: '@mchp-mcc/scf-avr8-memory-v1', type: MELODY, version: 7.0.2}
28+
- {name: '@mchp-mcc/scf-avr8-rstctrl-v1', type: MELODY, version: 4.0.7}
29+
- {name: '@mchp-mcc/scf-avr8-tca-v1', type: MELODY, version: 7.0.0}
30+
- {name: '@mchp-mcc/scf-avr8-usart-v1', type: MELODY, version: 10.2.1}
31+
- {name: '@mchp-mcc/uart-driver', type: MELODY, version: 1.10.2}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This file has been autogenerated by MPLAB Code Configurator. Please do not edit this file.
2+
3+
manifest_file_version: 1.0.0
4+
project: AVR64DU32_Application
5+
creation_date: 2025-01-21T14:42:41.410-08:00[America/Los_Angeles]
6+
operating_system: Windows 10
7+
mcc_mode: IDE
8+
mcc_mode_version: v6.20
9+
device_name: AVR64DU32
10+
compiler: XC8 3.00
11+
mcc_version: 5.5.1
12+
mcc_core_version: 5.7.1
13+
content_manager_version: 5.0.1
14+
is_mcc_offline: false
15+
is_using_prerelease_versions: false
16+
mcc_content_registries: https://registry.npmjs.org/,https://artifacts.microchip.com/artifactory/api/npm/npm/
17+
device_library: {library_class: com.microchip.mcc.melody.Library, name: Melody, version: 2.8.0}
18+
packs: {name: AVR-Dx_DFP, version: 2.6.303}
19+
modules:
20+
- {name: '@mchp-mcc/avr-8bit', type: MELODY, version: 4.12.0}
21+
- {name: '@mchp-mcc/avr8-configuration-bits-v1', type: MELODY, version: 4.2.14}
22+
- {name: '@mchp-mcc/avr8-pin-manager', type: MELODY, version: 4.6.1}
23+
- {name: '@mchp-mcc/main-manager', type: MELODY, version: 3.1.2}
24+
- {name: '@mchp-mcc/pin-content-processor', type: MELODY, version: 3.9.0}
25+
- {name: '@mchp-mcc/scf-avr8-clkctrl-v3', type: MELODY, version: 2.0.10}
26+
- {name: '@mchp-mcc/scf-avr8-interrupt-v1', type: MELODY, version: 5.0.12}
27+
- {name: '@mchp-mcc/scf-avr8-memory-v1', type: MELODY, version: 7.0.2}
28+
- {name: '@mchp-mcc/scf-avr8-rstctrl-v1', type: MELODY, version: 4.0.7}
29+
- {name: '@mchp-mcc/scf-avr8-tca-v1', type: MELODY, version: 7.0.0}
30+
- {name: '@mchp-mcc/scf-avr8-usart-v1', type: MELODY, version: 10.2.1}
31+
- {name: '@mchp-mcc/uart-driver', type: MELODY, version: 1.10.2}

0 commit comments

Comments
 (0)