Mecanique's internal bootloader OSC


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Mecanique's internal bootloader OSC

    I assume posting code would violate some sort of copyright, but I have modified MCLOADER to do all sorts of different things.

    If you are brave, you can dissassemble the .HEX file and look for where it sets up the USART Change those (probably two) 'movlw' lines and re-assemble.

    Open MPLAB, import the .HEX file and choose VIEW MEMORY. Although there is probably an easier way, I set up a "send print to file" printer and chose <CTRL><P> to save the dissasembly as txt.

    Use a DIFF program (I use ARAXIS) to compare the 20MHz and the 4MHz bootloaders. The rest is easy.
    Charles Linquist

  2. #2
    Join Date
    Feb 2011
    Posts
    60


    Did you find this post helpful? Yes | No

    Default Re: Mecanique's internal bootloader OSC

    Thanks Charles. If I had fear I would not be here. I did not know what a PIC was two weeks ago.

    I had engineers before the economy went into a coma. My skill set will not assemble and am at the mercy of strangers.

    Yes, prstine, I saw (your?) post from years ago and wrote Mechanique. I am surprised this problem persists. I am old enough to remember using slide rules in physics class. Friends were flipping switches on the Altair while I was using the mainframe to design geodesic dishes. It was then that I heard, "Time is mother nature's way of preventing everything from happening at once". So I hope in good time these loaders will become more flexible.

    Thanks for all the responses.

    Best,
    Doug

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Mecanique's internal bootloader OSC

    If it is useful for you, you can modify the bootloader after it is installed. Your program can erase FLASH (with the ERASECODE) instruction.

    You have to look at the erase block size for your chip (probably 64 bytes), and (in this case) start on a 64 byte boundary. That will erase 64 sequential bytes. Then you write back the new data with the WRITECODE instruction. The WRITE block size may or may not be the same size as the ERASE block size.


    I had a customer who felt that the bootloader was a security breach, and wanted to run it only when a jumper was installed. The boards were installed and couldn't be returned. I had very few free pins.

    My code wrote to the CONFIG register and turned MCLR into an in input, then it read and changed the jump vector at location 0 to a point in memory ABOVE MCLoader. There, I had a routine that checked for the the MCLR line to be low, if it was, I jumped to the MCLOADER entry point, if not, I jumped back to my program and bypassed the bootloader.

    I know this isn't a forum for "war stories" but my wife and friends don't understand any of this!
    Charles Linquist

Members who have read this thread : 0

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