8-bit Bootloader from Microchip


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891

    Default 8-bit Bootloader from Microchip

    Hi All,

    I've heard about bootloaders for the last 14 years but never tried myself because I didn't have really the need for it.

    Today, still the same, no real need...but I'm curious to now how it works

    I found this on Microchip's site:https://www.microchip.com/promo/8-bit-bootloader

    Is it something I "can" start with or is it already a "complicated" tool that will give me some more sleepless nights until I give up?

    If it is worth a try, can anyone give me the "initial kick" to get a good start? I mean, what do I need (tools, programs, whatsoever...) to make things start the right way?
    Roger

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default Bootloader basics.....

    I really need some basics on bootloaders because the more I read about this subject, the more I'm getting lost...

    Please correct me and I apologize for the the order of my questions - there is none :

    1.- a bootloader is a small piece of HEX code that I flash into the PIC via (i.e.) a PICKit2 or 3 programmer like any other (simple) program I make. Correct?

    2.- once the bootloader is in the chip, I must upload my programs in HEX format via serial com (if the bootloader is made for serial com) to the PIC using its hardware UART. Correct?

    3.- the bootloader code has to be adapted to each particular chip I'm using - I don't know in details "what" and "how" but it seems to be always about crystal speed, fuses (configs), bps and memory location, etc. Correct?

    4.- what is a software like TinyBootloader exactly doing? Is it only there to serially upload a program into the PIC or does it generate the bootloader code or what?

    5.- lots of videos show the use of MPLAB to "implement" bootloaders; is it mandatory?

    6.- "self programming" has nothing to do with a PIC that can write to its program memory on runtime (i.e. WRITECODE). Correct?

    Thanks in advance.... for your patience
    Roger

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default Re: 8-bit Bootloader from Microchip

    1.- a bootloader is a small piece of HEX code that I flash into the PIC via (i.e.) a PICKit2 or 3 programmer like any other (simple) program I make. Correct?
    yes
    2.- once the bootloader is in the chip, I must upload my programs in HEX format via serial com (if the bootloader is made for serial com) to the PIC using its hardware UART. Correct?
    not really , your hex code file data is sent by the bootloader program in a serial format to your pic using its hardware UART


    3.- the bootloader code has to be adapted to each particular chip I'm using - I don't know in details "what" and "how" but it seems to be always about crystal speed, fuses (configs), bps and memory location, etc. Correct?
    yes
    4.- what is a software like TinyBootloader exactly doing? Is it only there to serially upload a program into the PIC or does it generate the bootloader code or what?
    see q2 , it does not make any code


    5.- lots of videos show the use of MPLAB to "implement" bootloaders; is it mandatory?
    the pic receiver code for bootloaders is generally asm code and compiled in mplab with mpasm , the umc bootloader is a variation


    6.- "self programming" has nothing to do with a PIC that can write to its program memory on runtime (i.e. WRITECODE). Correct?
    WRITECODE is small subset of a pic's self programming capability, pics that cant self program cannot bootload
    Warning I'm not a teacher

  4. #4
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default Bootloader basics.....

    Thanks Richard.

    I'm getting somehow out of the fog but I still need more info...

    2.- once the bootloader is in the chip, I must upload my programs in HEX format via serial com (if the bootloader is made for serial com) to the PIC using its hardware UART. Correct?
    not really , your hex code file data is sent by the bootloader program in a serial format to your pic using its hardware UART
    2a.- is my program (not the bootloader) going to be in HEX format or does it have to be generated in some other format?

    2b.- does it mean that once the bootloader sits inside the chip, I need a particular terminal software to upload the program into the chip or does any terminal software do the trick?



    4.- what is a software like TinyBootloader exactly doing? Is it only there to serially upload a program into the PIC or does it generate the bootloader code or what?
    see q2 , it does not make any code
    4.- what is then so "special" with this software (and all other particular bootloader software) if it is not generating or supplying the "bootloader code"? I thought it was providing THE bootloader code for some specific chip one would need.



    5.- lots of videos show the use of MPLAB to "implement" bootloaders; is it mandatory?
    The pic receiver code for bootloaders is generally asm code and compiled in mplab with mpasm , the umc bootloader is a variation
    5.- I'm using the MCS editor with MPASM compiler. As far as I now, I can (I truly can't since I don't know assembler ) insert ASM code into my PICBasic programs. If this is correct, can I copy/paste à bootloader code in MCS editor an program my chip like I would do for any other program?



    7.- would it possible to paste a bootloader code on the top of my program and flash it into the chip (like an image file for further mass programming purpose)?
    Roger

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default Re: 8-bit Bootloader from Microchip

    2a.- is my program (not the bootloader) going to be in HEX format or does it have to be generated in some other format?
    you do nothing different other than put #define loader 1 [or whatever the syntax is ]


    2b.- does it mean that once the bootloader sits inside the chip, I need a particular terminal software to upload the program into the chip or does any terminal software do the trick?
    only if you want to use and keep the b-loader , if you use another programmer the b-loader will be erased

    4.- what is then so "special" with this software (and all other particular bootloader software) if it is not generating or supplying the "bootloader code"? I thought it was providing THE bootloader code for some specific chip one would need.





    the pc part of the bootloader prgm reads the hex file and parses in into blocks to be serially transferred into the chip , the already loaded pic component of the bootloader knows how to read the data and then write it into the pic codespace when the pc component is detected
    bootloaders all do the same thing , none of them do it the same way


    5.- I'm using the MCS editor with MPASM compiler. As far as I now, I can (I truly can't since I don't know assembler ) insert ASM code into my PICBasic programs. If this is correct, can I copy/paste à bootloader code in MCS editor an program my chip like I would do for any other program?

    you only need the assembler to create the pic component , its a separate process only done once, the bootloader cares not who or what makes the hex file to be loaded

    7.- would it possible to paste a bootloader code on the top of my program and flash it into the chip (like an image file for further mass programming purpose)?
    totally unnecessary


    http://tinypicbootload.sourceforge.net/
    look at firmwares microchip pic16
    Last edited by richard; - 29th June 2020 at 10:45.
    Warning I'm not a teacher

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    891


    Did you find this post helpful? Yes | No

    Default Re: 8-bit Bootloader from Microchip

    Thank you Richard.

    I'm going to have a look at the link you posted and try before asking more
    Roger

Similar Threads

  1. Replies: 2
    Last Post: - 28th December 2017, 16:10
  2. Replies: 0
    Last Post: - 16th March 2011, 13:58
  3. Replies: 6
    Last Post: - 5th November 2008, 12:30
  4. Microchip Bootloader and Interrupts
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th May 2007, 01:11
  5. Microchip TC32M Supervisory Circuit and Bootloader
    By modifyit in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 20th July 2005, 04:29

Members who have read this thread : 2

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