• AVR Freaks

Hot!PIC 16F1526 Unified host loader burning only 768 bytes

Author
kishoreS
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2018/08/16 04:48:42
  • Location: 0
  • Status: offline
2019/06/20 22:27:00 (permalink)
0

PIC 16F1526 Unified host loader burning only 768 bytes

Hi , 
I am using Bootloader generated by MPLAB to burn hex files into PIC16F1526 uC . The bootloader is used by Java based Unified Host Loader to burn programs into the uC .  
I noticed using a serial sniffer that the Unified Host Loader uses 0x800 as the last address of program memory and writes packets of 64 bytes backwards from this location ? What setting do I have to change to increase the last memory location of the program ?
Currently the unified host loader only works for burning hex files of 768 bytes (My bootloader ends at location 0x500 ,so 0x800-0x500 = 768).  This is too small for my application  . What do I do ?
I am using a Python program based on reverse engineering the Unified Host Loader so I am stuck here. I can share the program if you want . 
 
EDIT:
I researched a bit and found that 0x800 is the end of PAGE 0 of programming memory (http://www.microcontrollerboard.com/pic_memory_organization.html). Do I need to modify the bootloader for this ?
 
 
post edited by kishoreS - 2019/06/20 23:23:22
#1

5 Replies Related Threads

    Danno
    Super Member
    • Total Posts : 264
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: PIC 16F1526 Unified host loader burning only 768 bytes 2019/06/25 12:51:51 (permalink)
    +1 (3)
    The bootloader will only write what is necessary.  PIC16F1526 has 8KW and the bootloader can handle this. 
    On the device side, it leverages the #defines added by the memory module.
    On the host side, you have to convert to byte addresses so you would put in the memory size as 0x4000.
     
    Rather than trying to reverse engineer what is happening, take a look at the manual at http://ww1.microchip.com/downloads/en/DeviceDoc/40001779B.pdf.  It has a complete description of each command, what the host sends and how the device responds.
     
    #2
    kishoreS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/08/16 04:48:42
    • Location: 0
    • Status: offline
    Re: PIC 16F1526 Unified host loader burning only 768 bytes 2019/07/04 05:10:39 (permalink)
    0
    Hi Danno,
    I tried another PIC microcontroller PIC16F18444 with the Unified BootLoader and am getting the programming failed response . I am changing only two settings , bootloader offset (0xA00) and program memory offset(0x1c00)  still no luck . 
    #3
    Danno
    Super Member
    • Total Posts : 264
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: PIC 16F1526 Unified host loader burning only 768 bytes 2019/07/08 16:05:40 (permalink)
    +1 (1)
    Which version of the Unified Host are you using?  Can you post a screenshot of the unified host with your settings?
     
    I have other questions but the screenshot will answer them as well.
     
    ETA:  Also please include a screenshot of the console log (from the tools dropdown).
    #4
    kishoreS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2018/08/16 04:48:42
    • Location: 0
    • Status: offline
    Re: PIC 16F1526 Unified host loader burning only 768 bytes 2019/07/09 04:41:37 (permalink)
    0
    Hi @Danno,
    The Unified Host Loader version is 0.1.14 . My settings of PIC16F18444 are as shown in the pic . I have also attached the hex file (remove .txt extension)  for reference . 
    post edited by kishoreS - 2019/07/09 04:46:34

    Attached Image(s)

    #5
    Danno
    Super Member
    • Total Posts : 264
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: PIC 16F1526 Unified host loader burning only 768 bytes 2019/07/09 13:58:12 (permalink)
    0
    Suggest trying it with the Program Memory Size set to 0x2000.  Device is 0x1000 words, x2 to convert to bytes.
     
    Also, did you restrict your bootloader to 0-0x4ff?  That would be chapter 4, step 11 in the bootloader user's guide.  
     
    Edit: Corrected memory size & settings.
    post edited by Danno - 2019/07/09 13:59:23
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5