Skip to content

Commit 1b388bc

Browse files
committed
Fix the entry address for CC16BOOT-8527 and CC16BOOT-8526
1 parent b5bc71c commit 1b388bc

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

.main-meta/main.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"content": {
55
"metaDataVersion": "1.3.0",
66
"name": "com.microchip.mplabx.project.dspic33-dsc-bootloader-code-examples",
7-
"version": "1.2.3",
7+
"version": "1.2.4",
88
"displayName": "dsPIC33 DSC Bootloader Code Examples",
99
"projectName": "dspic33-dsc-bootloader-code-examples",
1010
"shortDescription": "dsPIC33 DSC Bootloader Code Examples",

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# dsPIC33 DSC Bootloader Code Examples v1.2.4
2+
### Release Highlights
3+
* Corrected application/executable entry address in dspic33a_bootloader_and_firmware_upgrade_demo and dspic33a_secure_boot.
4+
5+
### Features Added\Updated
6+
* Corrected application/executable entry address in dspic33a_bootloader_and_firmware_upgrade_demo and dspic33a_secure_boot.
7+
18
# dsPIC33 DSC Bootloader Code Examples v1.2.3
29
### Release Highlights
310
* Updated instances of "dsPIC33a" to "dsPIC33A".

dspic33a_bootloader_and_firmware_upgrade_demo/.main-meta/main.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"content": {
55
"metaDataVersion": "1.3.0",
66
"name": "com.microchip.mplabx.project.dspic33a-bootloader-and-firmware-upgrade-demo",
7-
"version": "1.2.3",
7+
"version": "1.2.4",
88
"displayName": "dsPIC33A Bootloader and Firmware Upgrade Demo",
99
"projectName": "dspic33a-bootloader-and-firmware-upgrade-demo",
1010
"shortDescription": "This MPLAB® X IDE example demonstrates how to perform secure boot authentication and firmware upgrade via UART with Microchip Device Firmware Update Protocol (M-DFU) and CRC32 verification within MCC Melody.",

dspic33a_bootloader_and_firmware_upgrade_demo/boot.X/mdfu/mdfu_firmware_update.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ void MDFU_FirmwareUpdateStartApplication(void)
102102
IVTBASE = MDFU_CONFIG_APPLICATION_RESET_ADDRESS;
103103
PACCON1bits.IVTBASEWR = 0;
104104

105-
user_application = (int(*)(void))MDFU_CONFIG_APPLICATION_RESET_ADDRESS;
106-
user_application();
105+
uint32_t *resetVectorPtr = (uint32_t *)MDFU_CONFIG_APPLICATION_RESET_ADDRESS;
106+
uint32_t resetVector = *resetVectorPtr;
107+
108+
user_application = (int(*)(void))resetVector;
109+
user_application();
107110
}

dspic33a_secure_boot/.main-meta/main.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"content": {
55
"metaDataVersion": "1.3.0",
66
"name": "com.microchip.mplabx.project.dspic33a-secure-boot-and-secure-firmware-upgrade-demo",
7-
"version": "1.2.3",
7+
"version": "1.2.4",
88
"displayName": "dsPIC33A Secure Boot and Secure Firmware Upgrade Demo",
99
"projectName": "dspic33a-secure-boot-and-secure-firmware-upgrade-demo",
1010
"shortDescription": "This MPLAB® X IDE example demonstrates how to perform secure boot authentication and secure firmware upgrade via UART with Microchip Device Firmware Update Protocol (M-DFU) and ECDSA with P-384 verification within MCC Melody.",

dspic33a_secure_boot/boot.X/mdfu/mdfu_partition_executable.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,12 @@ static enum MDFU_PARTITION_STATUS Run(void)
236236
* there is no way to create an object at that address to references so
237237
* an integer address is used for the pre-defined executable entry point.
238238
*/
239-
void (*user_executable)(void) = (void(*)(void))MDFU_CONFIG_EXECUTABLE_DATA_ORIGIN;
239+
int (*user_executable)(void);
240+
241+
uint32_t *resetVectorPtr = (uint32_t *)MDFU_CONFIG_EXECUTABLE_DATA_ORIGIN;
242+
uint32_t resetVector = *resetVectorPtr;
243+
244+
user_executable = (int(*)(void))resetVector;
240245

241246
/* Disable IRT access before transferring control to the executable.
242247
*

0 commit comments

Comments
 (0)