Where is the bootloader ?


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77

    Smile Where is the bootloader ?

    Hi All

    Stupid noob-type question for you...

    I've never used a bootloader before and I now need to use the microchip usb bootloader with a 18f14k50, but Im damned if I can find it lol ???
    Colour me stupid, but Ive searched the net and the microchip site and cant find the firmware that goes into the pic, can anyone tell me where to download the usb bootloader firmware ?.
    Reading the datasheet & understanding it are two different things.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    Hi,
    I've never used it but I think it's in the Microchip USB framework, take a look.

    /Henrik.

  3. #3
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    Hi Henrik

    That link is dead, whats a usb framework ?, I just need the bootloader firmware ?.
    Reading the datasheet & understanding it are two different things.

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


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    It is sort of weird, but Microchip has you download the whole application libraries to get it. http://ww1.microchip.com/downloads/e...-installer.exe

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    What do you mean dead? It works fine here, I just cliicked it to get the following quote:
    The USB Frameworkis a distribution package containing a variety of USB related PIC18, PIC24F, PIC32 firmware projects, along with other USB related drivers and resources intended for use on the PC. All release notes are included in the .zip file bundle.

    Demos include Device CDC demo, Printer demo, bar code scanner demo, CDC serial emulator, device composite HID and mass storage, generic driver demo, HID mouse demo, HID keyboard demo, SD card reader, SD data logger, thumb drive data logger (host) and much more
    My guess is you'll find Microchips USB Bootloader somewhere among those files. If it's not the Microchip USB bootloader you're looking for then obviously you won't find it there but then it would be good if you told us which one you're looking for.

    /Henrik.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    Nah the link is working... things just changed a little bit.

    MicroChip USB Framework is a HUGE collection of ready to go and compile code example.... and an excellent source of knowledge. EVERYBODY should have it somewhere in their computer. Sure enough it's a massive package.

    Now the latest USB Framework is merged with other Microchip ressources in a single package called Microchip Application Library.

    Originally, the USB Bootloader have been made for the PICDEM USB board.

    You may also need to download their C18 compiler in case the .HEX file for your specific PIC is not included in the USB Framework.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    Henrik, the link only works for me if I right-click and select open in new window ?, very strange.

    mister_e, ok thanks for that, I would never have found this package if you hadn't told me about it, the microchip website has nothing that indicates to me where to find the bootloader, anyways, I have downloaded the package and found the bootloader for my device already as a hex and I've made some progress.
    I have programmed the bootloader into my device and it is recognised by the PC bootloader program and I can use it to put my main program into the device.

    Next problem, I dont know how to switch between bootloader mode and running my main program ?.

    I have this line in my main program:-

    Define RESET_ORG 0x800 'To use this device with the Microchip USB Bootloader

    I noticed that it puts the bootloader portion at the beginning of memory rather than end (which I expected)

    Any ideas
    Reading the datasheet & understanding it are two different things.

  8. #8
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    Ok, I made a bit more progress, I changed "Define RESET_ORG 0x800" to "Define RESET_ORG 0x1000" and it now runs my program 'sometimes', its pretty random, after a reset sometimes it comes back up in bootloader mode and sometimes runs my program, I guess I have to find out what switches it between the two ?.
    Reading the datasheet & understanding it are two different things.

  9. #9
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Where is the bootloader ?

    The Microchip USB loaders are configured to run on Microchip USB dev boards and they use SW2 to determine if it jumps to the loader or user code at POR. In the USB loader version I have, io_cfg.h has SW2 defined as the switch used to toggle between loader & user mode.

    #define sw2 PORTAbits.RA3 // this means RA3 is the switch input pin

    In main.c they sample this switch at power up to determine the mode;
    Code:
        //Check Bootload Mode Entry Condition
        if(sw2 == 1)       // use sw2 to determine if the device should enter the bootloader, or main app code
        {
          ADCON1 = 0x07;   // Restore "reset value" of the ADCON1 register
          _asm
             goto 0x1000   // If not bootloader, go straight to the main application remapped "reset" vector.
          _endasm
       }
    So if RA3 = 1 at power up it jumps to your code. If RA3 = 0 it enters boot-loader mode. If RA3 is floating on your board that would explain why it's a hit & miss at POR since the input may be read as either high or low when floating.

    Note the goto 0x1000. This is where your code should start. Older versions started at 0x800.
    Last edited by Bruce; - 19th September 2011 at 14:46.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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