• AVR Freaks

Hot!Jump to the application from the bootloader with Dynamic Flash ECC

Author
DominusT
Super Member
  • Total Posts : 1385
  • Reward points : 0
  • Joined: 2005/07/22 08:31:18
  • Status: offline
2019/12/24 10:20:02 (permalink)
0

Jump to the application from the bootloader with Dynamic Flash ECC

Hi
 
I'm using the bootloader for the PIC32MZEFM100 with USB type device with Harmony 2.06 and XC32 v 2.30.
 
The bootloader works very well, when the hexadecimal is downloaded using the PC software and a "JUMP" command is issued to the application it works very well.
 
But when the hardware is turned off and then turned on again, the system enters bootloader mode again and if a "Jump" command is issued without updating the application firmware, it jumps correctly to the user application.
 
/* Check the trigger memory location and return true/false. */
    if (*(uint32_t *)(APP_RESET_ADDRESS)== 0xFFFFFFFF)
        return (1);

 
 
Debugging the code I have seen that although the program memory saved by the user application has been programmed correctly, it is always read 0xFFFFFFFF and it seems to me that it is due to the fact of using the Dynamic Flash ECC mode.
 
Any suggestions on how to solve this problem?
 
 
 
 
#1
NKurzman
A Guy on the Net
  • Total Posts : 18399
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Jump to the application from the bootloader with Dynamic Flash ECC 2019/12/24 11:01:10 (permalink)
0
Are you using the cached, or uncached address?
#2
DominusT
Super Member
  • Total Posts : 1385
  • Reward points : 0
  • Joined: 2005/07/22 08:31:18
  • Status: offline
Re: Jump to the application from the bootloader with Dynamic Flash ECC 2019/12/24 11:05:57 (permalink)
0
NKurzman
Are you using the cached, or uncached address?

I don't know, I'm just using the bootloader example called 'Basic' Harmony:


/* APP_FLASH_BASE_ADDRESS and APP_FLASH_END_ADDRESS reserves program Flash for the application*/
/* Rule:
1)The memory regions kseg0_program_mem, kseg0_boot_mem, exception_mem and
kseg1_boot_mem of the application linker script must fall with in APP_FLASH_BASE_ADDRESS
and APP_FLASH_END_ADDRESS
2)The base address and end address must align on boundaries according to the flash page size */
#define APP_FLASH_BASE_ADDRESS (0x9D000000)
#define APP_FLASH_END_ADDRESS (0x9D000000 + 0x200000 - 1)
/* Address of the Flash from where the application starts executing */
/* Rule: Set APP_FLASH_BASE_ADDRESS to _RESET_ADDR value of application linker script*/
#define APP_RESET_ADDRESS (APP_FLASH_BASE_ADDRESS)

#3
Jump to:
© 2020 APG vNext Commercial Version 4.5