Loading ...
Sorry, an error occurred while loading the content.

Microchip High-Speed Serial Bootloader for PIC16 and PIC18 Devices

Expand Messages
  • enzo_serafini
    Hello, I am trying the High-Speed Serial Bootloader of Microchip. You can find it at this adress:
    Message 1 of 14 , Dec 1, 2012
    • 0 Attachment
      Hello,

      I am trying the High-Speed Serial Bootloader of Microchip.

      You can find it at this adress:

      http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974

      I arrived to put the Bootloader in my PIC 16f877a, to connect it to the host pc, to write my compiled JAL file in the PIC.

      But after writing the PIC, I erased the bootloader!

      I try to compile with and without the long start and no fuse, without succes!

      May you help me?

      Regards,

      Enzo
    • ahedproductions
      Greetings Enzo! Sounds like your code is overwriting the boot-loader section. You need to relocate the beginning of the code, check carefully how long a jump
      Message 2 of 14 , Dec 1, 2012
      • 0 Attachment
        Greetings Enzo!
        Sounds like your code is overwriting the boot-loader section. You need to relocate the beginning of the code, check carefully how long a jump you have to set. Also check if the bootloader uses any other space like EEPROM (TinyBLD uses the top address of the EEPROM, for example), that your code should avoid. And last but not least, you are using a precompiled bootloader HEX of you compile your own? If you do compile it yourself, you should check all fuse settings carefully, quartz speed (as it determines the baud rate of the USART) and protection fuses. Stop for a while, leave the hardware aside for a couple of hours and then start fresh and go thru all the steps slowly and carefully. And i never got long jump working with a PIC18, only "-loader18 [ cexpr ]" worked. I think there is a way to add a command line parameter and offset the code. http://www.casadeyork.com/jalv2/jalv2opt/jalv2opt.pdf
        Bill

        --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@...> wrote:
        >
        > Hello,
        >
        > I am trying the High-Speed Serial Bootloader of Microchip.
        >
        > You can find it at this adress:
        >
        > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974
        >
        > I arrived to put the Bootloader in my PIC 16f877a, to connect it to the host pc, to write my compiled JAL file in the PIC.
        >
        > But after writing the PIC, I erased the bootloader!
        >
        > I try to compile with and without the long start and no fuse, without succes!
        >
        > May you help me?
        >
        > Regards,
        >
        > Enzo
        >
      • enzo_serafini
        Hello Bill, thank you for your good advises! My PIC is a 16F (16F877a) and not a 18F. I compiled my own bootloader hex. I read in the application note (AN1310,
        Message 3 of 14 , Dec 1, 2012
        • 0 Attachment
          Hello Bill,

          thank you for your good advises!

          My PIC is a 16F (16F877a) and not a 18F.

          I compiled my own bootloader hex.

          I read in the application note (AN1310, ww1.microchip.com/downloads/en/appnotes/01310a.pdf) the Bootloader it's located at the end of the flash (Figure 10 on page 9).

          Regards,

          Enzo

          --- In jallist@yahoogroups.com, "ahedproductions" <ahedproductions@...> wrote:
          >
          > Greetings Enzo!
          > Sounds like your code is overwriting the boot-loader section. You need to relocate the beginning of the code, check carefully how long a jump you have to set. Also check if the bootloader uses any other space like EEPROM (TinyBLD uses the top address of the EEPROM, for example), that your code should avoid. And last but not least, you are using a precompiled bootloader HEX of you compile your own? If you do compile it yourself, you should check all fuse settings carefully, quartz speed (as it determines the baud rate of the USART) and protection fuses. Stop for a while, leave the hardware aside for a couple of hours and then start fresh and go thru all the steps slowly and carefully. And i never got long jump working with a PIC18, only "-loader18 [ cexpr ]" worked. I think there is a way to add a command line parameter and offset the code. http://www.casadeyork.com/jalv2/jalv2opt/jalv2opt.pdf
          > Bill
          >
          > --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@> wrote:
          > >
          > > Hello,
          > >
          > > I am trying the High-Speed Serial Bootloader of Microchip.
          > >
          > > You can find it at this adress:
          > >
          > > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974
          > >
          > > I arrived to put the Bootloader in my PIC 16f877a, to connect it to the host pc, to write my compiled JAL file in the PIC.
          > >
          > > But after writing the PIC, I erased the bootloader!
          > >
          > > I try to compile with and without the long start and no fuse, without succes!
          > >
          > > May you help me?
          > >
          > > Regards,
          > >
          > > Enzo
          > >
          >
        • ahedproductions
          What is the start address of your code on compile? If your code is not big enough to overwrite the bootloader section, then maybe the code damages the
          Message 4 of 14 , Dec 1, 2012
          • 0 Attachment
            What is the start address of your code on compile? If your code is not big enough to overwrite the bootloader section, then maybe the code damages the bootloader jump vector at 0000h. Why don't you try to offset the code a bit and blink a led or something. go to 0200h for example, this should be pretty well away from any vectors an the bootloader.

            --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@...> wrote:
            >
            >
            >
            > Hello Bill,
            >
            > thank you for your good advises!
            >
            > My PIC is a 16F (16F877a) and not a 18F.
            >
            > I compiled my own bootloader hex.
            >
            > I read in the application note (AN1310, ww1.microchip.com/downloads/en/appnotes/01310a.pdf) the Bootloader it's located at the end of the flash (Figure 10 on page 9).
            >
            > Regards,
            >
            > Enzo
            >
            > --- In jallist@yahoogroups.com, "ahedproductions" <ahedproductions@> wrote:
            > >
            > > Greetings Enzo!
            > > Sounds like your code is overwriting the boot-loader section. You need to relocate the beginning of the code, check carefully how long a jump you have to set. Also check if the bootloader uses any other space like EEPROM (TinyBLD uses the top address of the EEPROM, for example), that your code should avoid. And last but not least, you are using a precompiled bootloader HEX of you compile your own? If you do compile it yourself, you should check all fuse settings carefully, quartz speed (as it determines the baud rate of the USART) and protection fuses. Stop for a while, leave the hardware aside for a couple of hours and then start fresh and go thru all the steps slowly and carefully. And i never got long jump working with a PIC18, only "-loader18 [ cexpr ]" worked. I think there is a way to add a command line parameter and offset the code. http://www.casadeyork.com/jalv2/jalv2opt/jalv2opt.pdf
            > > Bill
            > >
            > > --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@> wrote:
            > > >
            > > > Hello,
            > > >
            > > > I am trying the High-Speed Serial Bootloader of Microchip.
            > > >
            > > > You can find it at this adress:
            > > >
            > > > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974
            > > >
            > > > I arrived to put the Bootloader in my PIC 16f877a, to connect it to the host pc, to write my compiled JAL file in the PIC.
            > > >
            > > > But after writing the PIC, I erased the bootloader!
            > > >
            > > > I try to compile with and without the long start and no fuse, without succes!
            > > >
            > > > May you help me?
            > > >
            > > > Regards,
            > > >
            > > > Enzo
            > > >
            > >
            >
          • enzo_serafini
            Hello Bill, I don t know how to offset my code :-( I tried with: asm goto 200 without success! Regards, Enzo
            Message 5 of 14 , Dec 2, 2012
            • 0 Attachment
              Hello Bill,

              I don't know how to offset my code :-(

              I tried with: asm goto 200 without success!

              Regards,

              Enzo



              --- In jallist@yahoogroups.com, "ahedproductions" <ahedproductions@...> wrote:
              >
              > What is the start address of your code on compile? If your code is not big enough to overwrite the bootloader section, then maybe the code damages the bootloader jump vector at 0000h. Why don't you try to offset the code a bit and blink a led or something. go to 0200h for example, this should be pretty well away from any vectors an the bootloader.
              >
              > --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@> wrote:
              > >
              > >
              > >
              > > Hello Bill,
              > >
              > > thank you for your good advises!
              > >
              > > My PIC is a 16F (16F877a) and not a 18F.
              > >
              > > I compiled my own bootloader hex.
              > >
              > > I read in the application note (AN1310, ww1.microchip.com/downloads/en/appnotes/01310a.pdf) the Bootloader it's located at the end of the flash (Figure 10 on page 9).
              > >
              > > Regards,
              > >
              > > Enzo
              > >
              > > --- In jallist@yahoogroups.com, "ahedproductions" <ahedproductions@> wrote:
              > > >
              > > > Greetings Enzo!
              > > > Sounds like your code is overwriting the boot-loader section. You need to relocate the beginning of the code, check carefully how long a jump you have to set. Also check if the bootloader uses any other space like EEPROM (TinyBLD uses the top address of the EEPROM, for example), that your code should avoid. And last but not least, you are using a precompiled bootloader HEX of you compile your own? If you do compile it yourself, you should check all fuse settings carefully, quartz speed (as it determines the baud rate of the USART) and protection fuses. Stop for a while, leave the hardware aside for a couple of hours and then start fresh and go thru all the steps slowly and carefully. And i never got long jump working with a PIC18, only "-loader18 [ cexpr ]" worked. I think there is a way to add a command line parameter and offset the code. http://www.casadeyork.com/jalv2/jalv2opt/jalv2opt.pdf
              > > > Bill
              > > >
              > > > --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@> wrote:
              > > > >
              > > > > Hello,
              > > > >
              > > > > I am trying the High-Speed Serial Bootloader of Microchip.
              > > > >
              > > > > You can find it at this adress:
              > > > >
              > > > > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974
              > > > >
              > > > > I arrived to put the Bootloader in my PIC 16f877a, to connect it to the host pc, to write my compiled JAL file in the PIC.
              > > > >
              > > > > But after writing the PIC, I erased the bootloader!
              > > > >
              > > > > I try to compile with and without the long start and no fuse, without succes!
              > > > >
              > > > > May you help me?
              > > > >
              > > > > Regards,
              > > > >
              > > > > Enzo
              > > > >
              > > >
              > >
              >
            • ahedproductions
              If you go to Tools - Environment Options - Jal tab you will find the bootloader settings. I found out, that the field on the right, that supposedly you enter
              Message 6 of 14 , Dec 2, 2012
              • 0 Attachment
                If you go to Tools - Environment Options - Jal tab you will find
                the bootloader settings. I found out, that the field on the right, that supposedly you enter how many words for offset and the compiler offsets the code, does not work on my JAL, neither does the pic18 offset. You can use the following in your code:
                pragma bootloader loader18
                This DOES work and offsets my code to 0800h. Try that.

                --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@...> wrote:
                >
                > Hello,
                >
                > I am trying the High-Speed Serial Bootloader of Microchip.
                >
                > You can find it at this adress:
                >
                > http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974
                >
                > I arrived to put the Bootloader in my PIC 16f877a, to connect it to the host pc, to write my compiled JAL file in the PIC.
                >
                > But after writing the PIC, I erased the bootloader!
                >
                > I try to compile with and without the long start and no fuse, without succes!
                >
                > May you help me?
                >
                > Regards,
                >
                > Enzo
                >
              • Rob Hamerling
                Hi Enzo, ... I don t think that the JalV2 compiler offers more possibilities than those documented with pragma bootloader. When these don t work with the
                Message 7 of 14 , Dec 2, 2012
                • 0 Attachment
                  Hi Enzo,

                  On 2-12-12 12:48, enzo_serafini wrote:

                  > I don't know how to offset my code :-(
                  >
                  > I tried with: asm goto 200 without success!

                  I don't think that the JalV2 compiler offers more possibilities than
                  those documented with pragma bootloader. When these don't work with the
                  bootloader of your choice then you probably have to choose a different
                  bootloader (assuming you want to keep JalV2!).

                  Why did you chose for that Microchip bootloader? I understand it has
                  some nice features like autobaud and high speed, but do you really need
                  these? Several people here have good experiences with TinyBootloader: it
                  is small (100 words) and works with JalV2 and with many PIC types.

                  Regards, Rob.

                  --
                  R. Hamerling, Netherlands --- http://www.robh.nl
                • Rob Hamerling
                  ... Mind you: Enzo uses a 16f877a! Regards, Rob -- R. Hamerling, Netherlands --- http://www.robh.nl
                  Message 8 of 14 , Dec 2, 2012
                  • 0 Attachment
                    On 2-12-12 13:41, ahedproductions wrote:
                    > pragma bootloader loader18
                    > This DOES work and offsets my code to 0800h.

                    Mind you: Enzo uses a 16f877a!

                    Regards, Rob

                    --
                    R. Hamerling, Netherlands --- http://www.robh.nl
                  • ahedproductions
                    Yes Rob, I just gave an easy way for him to find out if his code damages the bootloader vector in any way. 0800h is 2K, the 877a has 14.3K memory, should be
                    Message 9 of 14 , Dec 2, 2012
                    • 0 Attachment
                      Yes Rob, I just gave an easy way for him to find out if his code damages the bootloader vector in any way. 0800h is 2K, the 877a has 14.3K memory, should be ok. Right?

                      --- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@...> wrote:
                      >
                      >
                      >
                      > On 2-12-12 13:41, ahedproductions wrote:
                      > > pragma bootloader loader18
                      > > This DOES work and offsets my code to 0800h.
                      >
                      > Mind you: Enzo uses a 16f877a!
                      >
                      > Regards, Rob
                      >
                      > --
                      > R. Hamerling, Netherlands --- http://www.robh.nl
                      >
                    • Rob Hamerling
                      The point is that the -loader18 option is supported by the compiler only for the 18F family, thus not for the 16f877a. Regards, Rob. ... -- R. Hamerling,
                      Message 10 of 14 , Dec 2, 2012
                      • 0 Attachment
                        The point is that the -loader18 option is supported by the compiler only
                        for the 18F family, thus not for the 16f877a.
                        Regards, Rob.

                        On 2-12-12 21:08, ahedproductions wrote:
                        > Yes Rob, I just gave an easy way for him to find out if his code damages the bootloader vector in any way. 0800h is 2K, the 877a has 14.3K memory, should be ok. Right?
                        >
                        > --- In jallist@yahoogroups.com, Rob Hamerling<robhamerling@...> wrote:
                        >>
                        >>
                        >>
                        >> On 2-12-12 13:41, ahedproductions wrote:
                        >>> pragma bootloader loader18
                        >>> This DOES work and offsets my code to 0800h.
                        >>
                        >> Mind you: Enzo uses a 16f877a!
                        >>
                        >> Regards, Rob


                        --
                        R. Hamerling, Netherlands --- http://www.robh.nl
                      • a_b_aldus
                        If you want to reserve some code space that compiler otherwise overwrites, just edit your processor file and remove this code segment from it - then compiler
                        Message 11 of 14 , Dec 2, 2012
                        • 0 Attachment
                          If you want to "reserve" some code space that compiler otherwise
                          overwrites, just edit your processor file and remove this code
                          segment from it - then compiler would not use it. This trick will
                          not help always but frequently one would be able to manege the
                          problem.

                          --- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@...> wrote:
                          >
                          >
                          > Hi Enzo,
                          >
                          > On 2-12-12 12:48, enzo_serafini wrote:
                          >
                          > > I don't know how to offset my code :-(
                          > >
                          > > I tried with: asm goto 200 without success!
                          >
                          > I don't think that the JalV2 compiler offers more possibilities than
                          > those documented with pragma bootloader. When these don't work with the
                          > bootloader of your choice then you probably have to choose a different
                          > bootloader (assuming you want to keep JalV2!).
                          >
                          > Why did you chose for that Microchip bootloader? I understand it has
                          > some nice features like autobaud and high speed, but do you really need
                          > these? Several people here have good experiences with TinyBootloader: it
                          > is small (100 words) and works with JalV2 and with many PIC types.
                          >
                          > Regards, Rob.
                          >
                          > --
                          > R. Hamerling, Netherlands --- http://www.robh.nl
                          >
                        • ahedproductions
                          I stand corrected! :) Regards, Bill
                          Message 12 of 14 , Dec 2, 2012
                          • 0 Attachment
                            I stand corrected! :)
                            Regards, Bill

                            --- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@...> wrote:
                            >
                            >
                            > The point is that the -loader18 option is supported by the compiler only
                            > for the 18F family, thus not for the 16f877a.
                            > Regards, Rob.
                            >
                            > On 2-12-12 21:08, ahedproductions wrote:
                            > > Yes Rob, I just gave an easy way for him to find out if his code damages the bootloader vector in any way. 0800h is 2K, the 877a has 14.3K memory, should be ok. Right?
                            > >
                            > > --- In jallist@yahoogroups.com, Rob Hamerling<robhamerling@> wrote:
                            > >>
                            > >>
                            > >>
                            > >> On 2-12-12 13:41, ahedproductions wrote:
                            > >>> pragma bootloader loader18
                            > >>> This DOES work and offsets my code to 0800h.
                            > >>
                            > >> Mind you: Enzo uses a 16f877a!
                            > >>
                            > >> Regards, Rob
                            >
                            >
                            > --
                            > R. Hamerling, Netherlands --- http://www.robh.nl
                            >
                          • enzo_serafini
                            Hello Rob, it is only to try it. I tried with a 16f877a without success and now I m trying with a 18f452. I have read on internet the AN1310 works better with
                            Message 13 of 14 , Dec 5, 2012
                            • 0 Attachment
                              Hello Rob,

                              it is only to try it.

                              I tried with a 16f877a without success and now I'm trying with a 18f452.

                              I have read on internet the AN1310 works better with 18F.

                              Compile the Bootloader in MPLAB => ok
                              Program the PIC with Bootloader => ok
                              Connect with host PC => ok
                              Write PIC with a simpleblink a led => ok

                              But, if i tried to reconnect the the host PC and the PIC, i have this message : Bootloader not found!

                              I don't understand why!

                              Maybe you can help me reading this pdf : http://ww1.microchip.com/downloads/en/appnotes/01310a.pdf

                              Regards,

                              Enzo
                              --- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@...> wrote:
                              >
                              >
                              > Hi Enzo,
                              >
                              > On 2-12-12 12:48, enzo_serafini wrote:
                              >
                              > > I don't know how to offset my code :-(
                              > >
                              > > I tried with: asm goto 200 without success!
                              >
                              > I don't think that the JalV2 compiler offers more possibilities than
                              > those documented with pragma bootloader. When these don't work with the
                              > bootloader of your choice then you probably have to choose a different
                              > bootloader (assuming you want to keep JalV2!).
                              >
                              > Why did you chose for that Microchip bootloader? I understand it has
                              > some nice features like autobaud and high speed, but do you really need
                              > these? Several people here have good experiences with TinyBootloader: it
                              > is small (100 words) and works with JalV2 and with many PIC types.
                              >
                              > Regards, Rob.
                              >
                              > --
                              > R. Hamerling, Netherlands --- http://www.robh.nl
                              >
                            • ahedproductions
                              Greeting Enzo. If you are moving to 18F i strongly recommend the Colt Bootloder - http://mdubuc.freeshell.org/Colt/ It s a great piece of work and I ve been
                              Message 14 of 14 , Dec 5, 2012
                              • 0 Attachment
                                Greeting Enzo.
                                If you are moving to 18F i strongly recommend the Colt Bootloder - http://mdubuc.freeshell.org/Colt/ It's a great piece of work and I've been using it onj several 18F chips with no problems at all.
                                Regards, Bill

                                --- In jallist@yahoogroups.com, "enzo_serafini" <enzo.serafini@...> wrote:
                                >
                                >
                                >
                                > Hello Rob,
                                >
                                > it is only to try it.
                                >
                                > I tried with a 16f877a without success and now I'm trying with a 18f452.
                                >
                                > I have read on internet the AN1310 works better with 18F.
                                >
                                > Compile the Bootloader in MPLAB => ok
                                > Program the PIC with Bootloader => ok
                                > Connect with host PC => ok
                                > Write PIC with a simpleblink a led => ok
                                >
                                > But, if i tried to reconnect the the host PC and the PIC, i have this message : Bootloader not found!
                                >
                                > I don't understand why!
                                >
                                > Maybe you can help me reading this pdf : http://ww1.microchip.com/downloads/en/appnotes/01310a.pdf
                                >
                                > Regards,
                                >
                                > Enzo
                                > --- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@> wrote:
                                > >
                                > >
                                > > Hi Enzo,
                                > >
                                > > On 2-12-12 12:48, enzo_serafini wrote:
                                > >
                                > > > I don't know how to offset my code :-(
                                > > >
                                > > > I tried with: asm goto 200 without success!
                                > >
                                > > I don't think that the JalV2 compiler offers more possibilities than
                                > > those documented with pragma bootloader. When these don't work with the
                                > > bootloader of your choice then you probably have to choose a different
                                > > bootloader (assuming you want to keep JalV2!).
                                > >
                                > > Why did you chose for that Microchip bootloader? I understand it has
                                > > some nice features like autobaud and high speed, but do you really need
                                > > these? Several people here have good experiences with TinyBootloader: it
                                > > is small (100 words) and works with JalV2 and with many PIC types.
                                > >
                                > > Regards, Rob.
                                > >
                                > > --
                                > > R. Hamerling, Netherlands --- http://www.robh.nl
                                > >
                                >
                              Your message has been successfully submitted and would be delivered to recipients shortly.