USB bootloader


Closed Thread
Results 1 to 6 of 6

Thread: USB bootloader

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,613

    Default USB bootloader

    I starting to look into this subject now that I have a basic program working. I found the MicroChip utility here:
    http://www.microchip.com/stellent/id...param=en022627

    As well as a lot of stuff here:
    http://pic18fusb.online.fr/wiki/wikk...ka=UsbBootload

    But I'm still confused by the various steps and acrobatics you seemingly have to do. If anyone has a link to a more 'MicroCode Studio' - like utility, I'd appreciate a link.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Mar 2006
    Location
    Gothenburgh, Sweden
    Posts
    18

    Default

    Hi Robert.

    This is quick guide how I did and what I used:
    First I created a hexfile as described in step 2 & 3 here:
    http://pic18fusb.online.fr/wiki/wikk...ka=UsbBootload
    (Attached file Bootfile.zip)
    Then I built an ICSP programmer PIC-PG1 like this:
    http://www.sparkfun.com/shop/?shop=1&cart=598190&cat=3&
    And then I programmed my 18F4550 with Bootfile.hex using WinPic800 v3.58
    I connected my 18F4550 to USB-port like this:
    http://pic18fusb.online.fr/wiki/wikk...ka=UsbBootload
    I created a simple testprogram in MicroCode Studio Plus:
    '***********************************************
    DEFINE LOADER_USED 1
    DEFINE RESET_ORG 800h ' For Microchip USB Bootloader
    DEFINE INTERRUPT_ORG 808h ' For Microchip USB Bootloader

    led var PORTD.1

    loop: HIGH led
    Pause 4000
    low led
    Pause 4000
    Goto loop
    End
    '************************************************
    Compile using MPASM and INHX8M checked.
    I downloaded the testprogram using USB and
    C:\MCHPFSUSB\Pc\Pdfsusb\PDFSUSB.exe (The location in my Pc).
    as described in step 1-8 under "USB-bootloading procedure" here:
    http://pic18fusb.online.fr/wiki/wikk...ka=UsbBootload

    I have probably missed some step but I hope it will help you a little bit.

    Good Luck!
    Stefan.
    Attached Files Attached Files

  3. #3
    Join Date
    Jun 2005
    Posts
    29

    Default Very Very Hard to understand

    It's been a while I'm thinking of making a working USB connection. So tonight I feel ready to mount the project, program the PIC and plug it in the USB port. Everything looks very clear in the document but MPLAB is not so sweet... After many hours of error messages, changing program location, testing many settings, I'm here now asking for help.

    This is the farthest I can go with MPLAB :

    Clean: Deleting intermediary and output files.
    Clean: Done.
    Executing: "D:\Program Files\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\MCHPFSUSB\fw\Boot" "main.c" -fo="C:\MCHPFS~1\fw\Boot\_output\main.o" -scs
    Executing: "D:\Program Files\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\MCHPFSUSB\fw\Boot" "usbmmap.c" -fo="C:\MCHPFS~1\fw\Boot\_output\usbmmap.o" -scs
    Executing: "D:\Program Files\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\MCHPFSUSB\fw\Boot" "usbdrv.c" -fo="C:\MCHPFS~1\fw\Boot\_output\usbdrv.o" -scs
    Executing: "D:\Program Files\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\MCHPFSUSB\fw\Boot" "usb9.c" -fo="C:\MCHPFS~1\fw\Boot\_output\usb9.o" -scs
    Executing: "D:\Program Files\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\MCHPFSUSB\fw\Boot" "usbdsc.c" -fo="C:\MCHPFS~1\fw\Boot\_output\usbdsc.o" -scs
    Executing: "D:\Program Files\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\MCHPFSUSB\fw\Boot" "usbctrltrf.c" -fo="C:\MCHPFS~1\fw\Boot\_output\usbctrltrf.o" -scs
    Executing: "D:\Program Files\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\MCHPFSUSB\fw\Boot" "boot.c" -fo="C:\MCHPFS~1\fw\Boot\_output\boot.o" -scs
    Executing: "D:\Program Files\mcc18\bin\mplink.exe" /l"D:\Program Files\mcc18\lib" /k"D:\Program Files\mcc18\lkr" "D:\Program Files\Microchip\MPASM Suite\LKR\18F4550.lkr" "C:\MCHPFSUSB\fw\Boot\_output\main.o" "C:\MCHPFSUSB\fw\Boot\_output\usbmmap.o" "C:\MCHPFSUSB\fw\Boot\_output\usbdrv.o" "C:\MCHPFSUSB\fw\Boot\_output\usb9.o" "C:\MCHPFSUSB\fw\Boot\_output\usbdsc.o" "C:\MCHPFSUSB\fw\Boot\_output\usbctrltrf.o" "C:\MCHPFSUSB\fw\Boot\_output\boot.o" /o"MCHPUSB.cof" /M"C:\MCHPFS~1\fw\Boot\_output\MCHPUSB.map"
    MPLINK 4.00, Linker
    Copyright (c) 2005 Microchip Technology Inc.
    Error - could not find definition of symbol 'ADCON1' in file 'C:\MCHPFSUSB\fw\Boot\_output\main.o'.
    Errors : 1

    BUILD FAILED: Fri Aug 25 19:29:12 2006

    I know it's not easy to follow but the error seems to came from mplink.exe, but don't ask me why ADCON1 is not define.

    If you have any idea it will be appreciate thank you.

  4. #4
    Join Date
    Jun 2005
    Posts
    29

    Red face Found it

    Ok I got my error. I did not choose the good linker scripts in MPLAB (p18f4550.lkr). Better result on saturday morning than on friday night.... Thank you for any help, surely more questions on USB soon.

  5. #5
    Join Date
    Mar 2005
    Location
    Novi Sad, Vojvodina
    Posts
    7

    Smile I found it...

    There is USB bootloader, but manual is only in german. Try it!
    http://www.holger-klabunde.de/usb/18f2550.htm

    Regards
    Emil

  6. #6
    Join Date
    Jan 2006
    Location
    Ottawa, Canada
    Posts
    11

    Thumbs up Another USB bootloader

    Also check out: http://www.piccoder.co.uk/content/view/51/26/

    Regards
    Marc

Similar Threads

  1. USB Bootloader.
    By HenrikOlsson in forum USB
    Replies: 22
    Last Post: - 2nd May 2013, 02:46
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  3. Replies: 7
    Last Post: - 10th November 2008, 09:24
  4. USB Bootloader CRASH on Vista
    By mindthomas in forum USB
    Replies: 9
    Last Post: - 9th March 2008, 20:56
  5. 18F2550 MCRL/RE3 problem with USB bootloader Microchip
    By Ronald123 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th September 2007, 10:48

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