Open source PBP bootloader


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    Learned a little more about the Microchip bootloader GUI. It reads a P1618qp.ini file which contains information about each chip. The dropdown menu is built from this ini file. So you can add chips if you enter the right information. I tried adding a chip, and was successful in seeing it appear int the dropdown menu of the GUI.

    They have two subroutines for reading and two for writing to the code space, depending on whether it is a 16 or an 18 chip.

    Here are a couple pic definition samples of the .ini file:
    Code:
    [PIC18F67J11]
    writeblock=8
    readblock=1
    eraseblock=64
    devicetype=1
    maxpacketsize=128
    bytesperaddr=1
    pmrangelow="000400"
    pmrangehigh="01FBFF"
    eerangelow="000000"
    eerangehigh="000000"
    usrrangelow="200000"
    usrrangehigh="20000F"
    cfgrangelow="300000"
    cfgrangehigh="30000F"
    300001="CONFIG1H"            
    300002="CONFIG2L"
    300003="CONFIG2H"
    300005="CONFIG3H"
    300006="CONFIG4L"
    300008="CONFIG5L"
    300009="CONFIG5H"
    30000A="CONFIG6L"
    30000B="CONFIG6H"
    30000C="CONFIG7L"
    30000D="CONFIG7H"
    
    
    
    [PIC16F877]
    writeblock=8
    readblock=2
    devicetype=0
    maxpacketsize=32
    bytesperaddr=2
    pmrangelow="000200"
    pmrangehigh="001FFF"
    eerangelow="000000"
    eerangehigh="0000FF"
    And for the 18F devices, they have a menu that lets you configure the fuses. But it looks like you have to enter the value for them. Would be nice to make it read from the device file C:\Program Files\Microchip\MPLAB IDE\Device and populate the dropdown list. But that would definitely be down the road, because now I am having trouble seeing where they size the data field!

    I do see a:
    Code:
            'limit the packet size
            If (AddrH + 1) - BootAddr > PicBootS.MaxPacketSize Then
                picA.BootDatLen = PicBootS.MaxPacketSize
            Else
                picA.BootDatLen = (AddrH + 1) - BootAddr
            End If
    But I am having trouble figuring out where they use it. Might take a couple cups of coffee ... or more.

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Open source PBP bootloader

    So if I understand this, for the 16f877 it says MAXPACKETSIZE=32. So thats how big the arreay should be for DATA_BUFF? I put in 50 for now, but can clearly make that 32. I think as a down the road desire, this value should be a variable that will get set at compile time or maybe the GUI can tell the PIC.

    Good stuff Walter!!
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts