Picbasic Bootloader ?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    5


    Did you find this post helpful? Yes | No

    Smile check this

    try to visit the link below:

    http://www.microchipc.com/sourcecode/#bootloader

    maybe you can find some clue, I did not find exactly the same chipset that you have but other examples base on other chipset may be a good reference.

  2. #2
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rod27cn View Post
    try to visit the link below:

    http://www.microchipc.com/sourcecode/#bootloader

    maybe you can find some clue, I did not find exactly the same chipset that you have but other examples base on other chipset may be a good reference.
    Tnank you, but I'm looking for sample in Picbasic, not C or assembler ...
    Marco

  3. #3
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Here is an other link

    http://www.picbasic.co.uk/forum/showthread.php?t=4498

    An example of a picbasic bootloader I wrote. BUT you might have some problems doing this way since you have to remember the pic basic pro 16-bit limitation in adressing. So for anything bigger than 64kbytes (32k words) you have to break new ground but for smaller devices this works great.

    /me

  4. #4
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Thank you so much,
    there is much to read and learn in that thread !
    Bye
    Marco

  5. #5
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Jumper View Post
    http://www.picbasic.co.uk/forum/showthread.php?t=4498

    An example of a picbasic bootloader I wrote. BUT you might have some problems doing this way since you have to remember the pic basic pro 16-bit limitation in adressing. So for anything bigger than 64kbytes (32k words) you have to break new ground but for smaller devices this works great.

    /me
    Hi Jumper, it is not clear to me this point:
    I have a GPRS modem in my application, so I would like to send it the new firmware to be programmed via e-mail. The main program should receive it, store it in an EEprom then jump to the "bootloader" in the high memory, that read it again and reflash the PIC.
    So my bootloader is not "classic style" and is not useful to reprogram the PIC via serial line.
    The question is: once the bootloader is programmed in the PIC, is there a way to continue using the MPLAB ICD2 to program the main application in the PIC ?
    Thanks
    Marco

  6. #6
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Sure

    Since you never want to enter the bootloader with a jump from the reset vector (which is the normal way) you dont even have to add define loader_used 1 or what ever it should be.

    You just need to write the bootloader and program it to the high memory. Then you need to set the ICD2 to only program a certain momory area and then you can write your software as the bootloader didnt exist. This will over write the reset vector but in your case that is a good thing :-) Just make sure you dont write or erase the area where the bootloader lives.

    Then with a jump to your address for the loader you are ready to go. This is similar to the way I program some of my pics, from a 64k ee-card with the difference I only do it at startup or never at all.

    GPRS flashing seems to be a fun idea, that is why we like to write our own loaders!

    An other way is to program the loader, e-mail the applicationsoftware (since the PIC is blank you will end up in the loader anyway. Bootload the PIC and when it is all finished read out the hexfile with the ICD2 and use that 2-in-1 hex file for all the other 2 million pics or so in your production line.

    Hope I was clear....

    /me

  7. #7
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Thank you Jumper,
    yes it's more than clear !
    Really I've tryed that way and it didn't work , but sure I did something of wrong, I'll try again.
    Many txs
    Marco

  8. #8
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    I don't know whether this will help but there is a mikroBasic project for a UDP bootloader (using the ENC28J60) and 18F PICs.

  9. #9
    Join Date
    Oct 2004
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Perhaps this may help.
    http://www.oshonsoft.com/picbootloader.html

    regards
    Victor

Similar Threads

  1. PIC18F4680 bootloader
    By vinyl_theif in forum General
    Replies: 1
    Last Post: - 29th January 2009, 17:45
  2. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 23:51
  3. USBDemo with Bootloader
    By vacpress in forum USB
    Replies: 4
    Last Post: - 25th January 2007, 22:29
  4. Bootloader Problems
    By rossfree in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th February 2005, 17:51
  5. PicBasic Fundamentals
    By Billyc in forum General
    Replies: 9
    Last Post: - 4th May 2004, 10:04

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