Hot!MCC bootloader + unifiedHost-0.1.14

Author
julien38280
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2018/01/04 01:47:20
  • Location: 0
  • Status: offline
2018/01/08 01:50:42 (permalink)
0

MCC bootloader + unifiedHost-0.1.14

Hello everybody
I would like to use the bootloader generated with MCC (MPLAB X IDE V4.05, XC8 V1.45) to reprogrammed my device PIC16F18856 
I used the guide to configure my project :
http://ww1.microchip.com/downloads/en/DeviceDoc/40001779B.pdf
I have generated the code and programmed my device with pickit3
I try to launch UnifiedHost-0.1.14 and program the Device
It is not working correctly  evenif I  modified Bootloader Offset to 0x600 and Program memory to 0x8000
The soft program sucessfully the device with my hex but when I disconect and reconnect the device It doesn't work
I think the soft doesn't jump at the correct adresse
Can you help me please
#1

12 Replies Related Threads

    Danno
    Super Member
    • Total Posts : 221
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/01/11 14:06:42 (permalink)
    0
    Which version of the bootloader generator plug in did you use?  the latest posted at http://www.microchip.com/mcc gives you the latest  version 2.2.31.
     
    HTH!
    #2
    julien38280
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/01/04 01:47:20
    • Location: 0
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/12 08:54:32 (permalink)
    0
    Thank you for your answer,
     
    I tryed with version 2.2.31 but it doesn't work
     
    I have the same issue as the version 2.2.0
    #3
    Danno
    Super Member
    • Total Posts : 221
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/13 14:49:24 (permalink)
    0
    Can you post screen shots of a)  the MCC bootloader generation page, b) host page, and host console log (Available on the tools pulldown menu)?  That should give us a starting point to identify the problem.
    #4
    julien38280
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/01/04 01:47:20
    • Location: 0
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/15 02:13:10 (permalink)
    0
    Yes ,
    You can find attached 4 screen shots with my settings
    Thank you 

    Attached Image(s)

    #5
    Danno
    Super Member
    • Total Posts : 221
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/16 12:20:28 (permalink)
    0
    OK that all looks good.  The 2nd screenshot shows the bootload was successful and it reset the device.  Suggest running BL in debugger.  let it run to the point that it's awaiting the autobaud character, then insert a breakpoint a the reset vector.  Let the host run to bootload the device.  Then single step from the reset vector so  you can see what it being read from the reset vector and make sure that entire process is working.  Or you will figure out where it fails.
     
    HTH,
    d
    #6
    julien38280
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/01/04 01:47:20
    • Location: 0
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/19 03:18:25 (permalink)
    0
     
    Thank you for your answer
     
    I put the breakpoint on my code
    I program my device 
    and the debugger stop at the breakpoint
    after that the debugger execute the two next lines and RESET
    I think it doesn't jump at the correct adrress NEW_RESET_VECTOR = 0x300

    Attached Image(s)

    #7
    Danno
    Super Member
    • Total Posts : 221
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/19 12:57:10 (permalink)
    0
    What could be happening is it makes the jump, then runs through memory executing 0x3FFF instructions until the PC wraps around to reset.
    If you do the bootload then readback memory, is there code at 0x300 or beyond?
    #8
    julien38280
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/01/04 01:47:20
    • Location: 0
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/20 01:57:36 (permalink)
    0
    Thank you Danno for your answer
     
    If I read back memory there is a code at 0x300 -> CLRF 0xC1
     
    If I don't flash the device there is just the bootloader in the memory from 0 -> 0x02A0
    If I flash there are bootloader and program (program 0x300-> 0x288D)
    #9
    Danno
    Super Member
    • Total Posts : 221
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/20 13:29:58 (permalink)
    0
    At this point, I start looking at machine codes.  What is the instruction at the goto NEW_RESET_VECTOR?  I'd expect 0x2B00  (goto 0x300).  If not, I'd got find the #define NEW_RESET_VECTOR and see if it got corrupted somehow.
    #10
    julien38280
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/01/04 01:47:20
    • Location: 0
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/21 06:09:45 (permalink)
    0
    Hello,
     
    When i execute the program  the debugger goes to my breakpoint ( STKPTR = 0x1F)
    and then execute the two next lines. After that when i execute step by step the debugger 
    seems to be last. (I think it's normal because it goes to 0x300 but it can't reach the code that i have flash by the UART)
    The debuger seems  to do a loop (CLRF 0x780,ADDFSR 0,1,DECFSZ 0x789 , F) and  RESET
     
     
     

    Attached Image(s)

    #11
    Danno
    Super Member
    • Total Posts : 221
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/02/21 13:13:26 (permalink)
    0
    Do I understand the CLRF 0x780, ADDFSR 0,1, DECFSZ 0x789,F  RESET are the codes at 0x300?  If not where?
     
    That code seems to be erasing a block of memory.  CLRF 0x780 is a Clear INDF0, which is location pointed to by FSR0.  ADDFSR 0,1 bumps FSR0 by 1 to point to the next location.  DECFSZ counts down the number of locations to clear.
     
     
    #12
    julien38280
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/01/04 01:47:20
    • Location: 0
    • Status: offline
    Re: MCC bootloader + unifiedHost-0.1.14 2018/03/02 06:37:58 (permalink)
    0
    Thank you Danno for your answers
    I have find why it doesn't work
    I have forgotten to set an offset of 0x300 in Mplab X settings before the compilation
    Best regards
    #13
    Jump to:
    © 2018 APG vNext Commercial Version 4.5