Menu

Bootloader

Help
2007-09-21
2013-05-30
  • Nobody/Anonymous

    I'm wondering if there is any way to setup GCB to allow the use of a boot loader.  I would like to use the screamer bootloader http://www.sparkfun.com/commerce/present.php?p=PIC%20Boot%20Loader on my 16F88 so that I don't have to use a programmer to load new code each time.  AFAIK, all that's required is that the code is offset to 0x0004.  How do I do that?

     
    • kent_twt4

      kent_twt4 - 2007-09-21

      Had the same question asked of me on another board.  Would be interested in the answer also, so I could pass it on.  It would appear that the interrupt vector is at that location now, so where do you put the interrupt?

      Assembly listing for compiled GCBasic:

      ;********************************************************************************

      ;Jump to initialisation code when PIC is reset
          ORG    0
          call    INITSYS
          goto    SystemInitialise

      ;********************************************************************************

      ;Interrupt vector
          ORG    4
          retfie   

      ;********************************************************************************

       
    • Hugh Considine

      Hugh Considine - 2007-09-21

      I've looked at the site for the bootloader, and altered GCBASIC so it will work with it by default. The updated version of GCBASIC is at http://gcbasic.sourceforge.net/newfiles/update.zip

      The bootloader requires that the body of the program is after the interrupt vector, and that the only thing before the interrupt vector is a goto at location 0 which jumps to the start of the main program. This is pretty close to what GCBASIC was producing anyway, I just had to place the call to InitSys after the SystemInitialise label.

       
    • Nobody/Anonymous

      Wow, thanks!  I'll give it a try tonight and see how it works.  I have to say that I am extremely impressed with GC Basic - it suits me perfectly because I don't know C or pascal, and the other basic compilers are expensive (for me anyways). 

      I'm using mainly 16F88's and 16F877's with a $10 Olimex programmer and just building circuits on a breadboard.  So far GCB has worked flawlessly and a couple of times a project that would have taken me a week in assembly, has been finished in an hour or so!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.