• AVR Freaks

Hot!Bootloader not working on PIC32MK1024GPE064

Author
mark42
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2019/08/01 00:02:22
  • Location: 0
  • Status: offline
2020/01/22 22:54:52 (permalink)
0

Bootloader not working on PIC32MK1024GPE064

Hello,
When i run my bootloader for PIC32MK1024GPE100 controller ,my bootloader jumps to application and works fine(CASE 1) .now  i have modified the bootloader code for PIC32MK1024GPE064 controller and  using the same linker scripts for PIC32MK1024GPE064. now bootloader is not jumping to application(CASE2).i had generated simple LED blinking program and used bootloader.In case of LED blinking program,bootloader is jumping to application(CASE 3). but same is not working for my actual application code. i have cross checked the ebase address  and reset addresses.they are correct
 
I am using MPLAB V5.25, compiler -XC32 v2.30,MPLAB Harmony 3.
 
Can someone suggest me solution how to debug this issue. i am first time working on bootloader.
 
Thanks in advance.
#1

4 Replies Related Threads

    Paul PortSol
    Super Member
    • Total Posts : 632
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: Bootloader not working on PIC32MK1024GPE064 2020/01/23 12:50:23 (permalink)
    0
    Check the datasheet for all the tiny reserved memory blocks in the PIC you are using - dig down into the detailed memory maps as the first ones only show a nice clean boot block while others will show the reserved bites out of it.
     
    The examples I've seen didn't account for all the reserved sections, leading to flakey behaviour, especially if you customized the bootloader.
     
    Sorry, I have no examples for PIC32MK, but I have previously posted examples of my PIC32MZ/PIC32MX linker scripts with the reserved blocks.
     
    Paul
     
    #2
    optimus_jack
    Senior Member
    • Total Posts : 102
    • Reward points : 0
    • Joined: 2017/02/16 03:02:47
    • Location: 0
    • Status: offline
    Re: Bootloader not working on PIC32MK1024GPE064 2020/02/18 01:54:45 (permalink)
    0
    Hi,
    Can you provide more details like
    1. What is the modification you did to the bootloader.
    2. Can you post the bootloader and application linker script
    #3
    Paul PortSol
    Super Member
    • Total Posts : 632
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: Bootloader not working on PIC32MK1024GPE064 2020/02/18 05:34:37 (permalink)
    0
    Sorry, our bootloaders are integrated with our custom protocol so can't share code.
     
    To debug:
    - Set the application as a loadable to the bootloader (loadables listed in file list of project in left panel), or the bootloader as loadable to application, but not both!!
    - Depending which is the primary and which is the loadable you'll find debugging one or the other is easier.
    - Ensure you have a way to detect whether the loaded application is correctly loaded (Checksum, etc.)
     
    Few bits I can share (PIC32MZ, not PIC32MK but maybe some similar):
    - see thread: https://www.microchip.com/forums/m1083460.aspx
    - btl_mz_usb__20200123PR.zip (USB, but still reserves memory blocks)
    - btl_mz_uart_20200130PR.zip (UART, reserves memory blocks, similar to above USB)
     
    Paul
     
    #4
    Paul PortSol
    Super Member
    • Total Posts : 632
    • Reward points : 0
    • Joined: 2015/07/03 11:52:03
    • Location: Newfoundland, Canada
    • Status: offline
    Re: Bootloader not working on PIC32MK1024GPE064 2020/02/18 05:43:47 (permalink)
    0
    Looking back at your original post I see the main difference (only difference) is the pins of the PIC (100pin to 64pin).
    You need to carefully review the schematic changes and code changes for dependencies on pins that no longer exist.
     
    Are you using a BSP or MHC Pin Manager?
    - I recommend MHC Pin Manager so nothing hidden, it won't compile if a pin doesn't exist.... that is if you only use the MHC pin definitions and not historic hard coded pin references.
    - Possibly your code has a hard defined pin that the compiler doesn't know doesn't exist anymore or didn't get updated with the IC change. Change it to use the MHC defined pins (Macros), mostly in system_config.h (generated by MHC).
     
    See the procedure in my last post for creating a bootloader from scratch, that way no inherited non-MHC code.
     
    Paul
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5