You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Getting Started With the 8-bit MDFU Client for PIC18F56Q24 using MPLAB® X
5
+
# Getting Started With the 8-Bit MDFU Client for PIC18F56Q24 Using MPLAB® X
6
6
7
-
This is an example on how to use the MPLAB Code Configurator (MCC) generated code for configuring several basic Microchip Device Firmware Update (MDFU) bootloader solutions for the PIC18F56Q24 Curiosity Nano Evaluation Board.
7
+
This example demonstrates how to utilize MPLAB Code Configurator (MCC) generated code to set up various Microchip Device Firmware Update (MDFU) bootloader solutions for the PIC18F56Q24 Curiosity Nano Evaluation board.
8
8
9
-
The Microchip Device Firmware Update (MDFU) is a device firmware update ecosystem that uses a device agnostic host application to update the application firmware. The application image that is loaded into the host follows a custom file format that includes the device and application-specific parameters needed to perform the update. This repository provides the basic starting point to configure and customize the MCC Melody 8-Bit MDFU Client library on the PIC18F56Q24 Curiosity Nano Base for Click boards™ and also provides instructions for running the examples.
9
+
The MDFU is a firmware update system that employs a device-independent host application to update application firmware. The application image loaded into the host adheres to a custom file format, incorporating device and application-specific parameters necessary for the update. This repository offers a foundational setup to configure and customize the MCC Melody 8-Bit MDFU Client library on the PIC18F56Q24 Curiosity Nano Base for Click boards™, along with instructions for executing the examples.
10
10
11
-
This example will demonstrate:
11
+
This example demonstrates:
12
12
- How to configure the 8-Bit MDFU Client library in MCC Melody for different verification schemes
13
13
- How to create a simple Blinky LED application
14
-
- How to use the [`pyfwimagebuilder`](https://pypi.org/project/pyfwimagebuilder/) command line interface to convert application hex file into the application image
14
+
- How to use the [`pyfwimagebuilder`](https://pypi.org/project/pyfwimagebuilder/) command line interface to convert the application hex file into an application image
15
15
- How to use the [`pymdfu`](https://pypi.org/project/pymdfu/) command line interface to update the application firmware
16
-
---
16
+
17
17
## Related Documentation
18
18
19
19
-[PIC18F56Q24 Family Product Page](https://www.microchip.com/en-us/product/PIC18F56Q24)
-[Getting Started Document, API Reference and Update Image Specification](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=8BIT_MDFU_CLIENT&version=latest&redirect=true)
22
+
-[8-Bit MDFU Client Known Issues List](https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=KNOWN_ISSUES_8BIT_MDFU_CLIENT&version=latest&redirect=true)
24
23
25
-
---
26
24
## Software Used
27
25
28
26
-[MPLAB X IDE 6.20.0](https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide)
MDFU Client and Application projects have to be configured according to [Client Setup](#client-setup) and [Application Setup](#application-setup). The following project setup is the same for all the example project pairs. If something goes wrong while running these examples, confirm that the settings in the respective projects are consistent with the options seen in the following sections.
42
+
The following project setup steps demonstrate the basic configuration for setting up the 8-Bit MDFU Client with Universal Asynchronous Receiver-Transmitter (UART) communication. The configuration bits, clock, Non-Volatile Memory (NVM), and General Purpose Input/Output (GPIO) settings will be consistent across all examples in this repository and any deviations from this setup due to the chosen communication protocol will be described individually later in this section.
This section will guide you through the setup process for UART communication. For more details on configuring and operating other communication protocols, please refer to the pages listed below:
70
+
-[SPI Communication](spi/Readme.md)
71
+
72
+
**8-Bit MDFU Client with UART Communication**
73
+
74
+
- Communication Protocol: SERCOM
75
+
- Application Start Address: Different for each project based on the verification selected
76
+
- Device ID: 0x7920 (automatically added)
77
+
- I/O Pin Indicator: Enabled
78
+
- I/O Pin Entry: Enabled
79
+
- Memory Verification: Assigned based on the example project naming convention
80
+
81
+
> **Tip**: This example is for CRC32 verification.
- Application Start Address: Different for each project based on the verification selected
101
-
- Device ID: 0x7920
102
-
- I/O Pin Indicator: Enabled
103
-
- I/O Pin Entry: Enabled
104
-
- Memory Verification: Assigned Based on Example Project Naming Convention
105
-
106
-
**Tip**: The easiest way to get the correct device ID is to connect your device and use the **Refresh Debug Tool Status** button on the Dashboard left panel in MPLAB X IDE. Upon clicking the button and selecting the correct PKOB Nano, in the Output window it prints out the device ID and other information.
This is an important step to ensure that the bootloader and application FLASH sections are configured to provide maximum space for the application while decreasing the bootloader section to be as close to the memory consumed by the bootloader code as possible.
125
-
126
-
- At this point, as mentioned in the 8-Bit MDFU Client section, this depends on the verification method used in the project. Initially, configure the application start address to be closer to the MAXSIZE to allow sufficient memory for flashing the bootloader code. Do not exceed (MAXSIZE - 4)
4. Build the Application Image File using **pyfwimagebuilder**.
225
+
4. Build the Application Image File using [pyfwimagebuilder](https://pypi.org/project/pyfwimagebuilder/).
226
+
227
+
- To build the application image files, navigate to the Projects tab and right click *Important Files>`build_free_image.bat`* for Windows or *Important Files>`build_free_image.sh`* for Mac and Linux
228
+
- Select Run
231
229
232
-
*Hint: The configuration TOML file is generated by the MDFU Client project under \mcc_generated_files\bootloader\configurations*
5. Use the **pymdfu** host tool to transfer the application image file to the bootloader.
240
+
5. Use the [pymdfu](https://pypi.org/project/pymdfu/) host tool to transfer the application image file to the bootloader.
241
+
242
+
> **Tip**: You can find the COM port of the MCU using the MPLAB Data Visualizer.*
243
+
244
+
- To run the update with the examples, navigate to the project tab and right click, *Important Files>`pymdfu_update.bat`* for Windows or *Important Files>`pymdfu_update.sh`* for Mac and Linux. Double click to open the file.
245
+
- Edit the port number to the CDC port name that is assigned to the Curiosity Nano device
246
+
- Then right click on the script and select Run
241
247
242
-
*Hint: You can find the COM port of the MCU using the MPLAB Data Visualizer.*
2. Pressing the button on the Curiosity Nano and holding it down will force entry into the bootloader, allowing a new application to be transferred.
264
+
254
265
## Summary
255
266
256
267
This repository demonstrates how to configure the 8-Bit MDFU Client library in MCC to enable device firmware updates over UART on a PIC18F56Q24 Curiosity Nano.
@@ -263,4 +274,4 @@ This repository demonstrates how to configure the 8-Bit MDFU Client library in M
263
274
-[Back to Setup](#setup)
264
275
-[Back to Operation](#operation)
265
276
-[Back to Summary](#summary)
266
-
-[Back to Top](#getting-started-with-the-8-bit-mdfu-client-for-pic18f56q24-using-mplab®-x)
277
+
-[Back to Top](#getting-started-with-the-8-bit-mdfu-client-for-pic18f56q24-using-mplab-x)
0 commit comments