Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying some modifications [solved]
#1
Hello!

First of all, congratulations for your job with the bootloader.

I'm trying it on a 18F67J60 and it works fine. I would like the bootloader to send some chars when it starts, to let the loader program to know that the pic is in bootloader mode and after that it will start sending the 0xC1.

I tryed to do it putting some "SendL" just like here:
Code:
        ;----------------------------------------------------------------------
        ; Wait for computer
        ;----------------------------------------------------------------------

        ;I tryed with this:
        ;SendL    'B'
        ;SendL    'O'
        ;SendL    'O'
        ;SendL    'T'

        ;this other:
        ;SendL    0xC1

        ;and this:
        ;SendL    0xFF

        clrf    cntHello
        movlw    BLSTART
rhello    rcall     RcvIni
        sublw     HELLO
        bz         sendid        
        ; Not hello received
        incf    cntHello
        movf    cntHello
        sublw    HELLOTRIES
        bz        exit
        bra        rhello

If I send the first one "BOOT", it will be sent 31 times each 2 seconds (default value), after that, it only will send the fist character "B" and faster (each 0.5 sec more or less) and the bootloader won't answer to a hello (0xC1) from the loader gui.

If I send 0xC1 same result than before, but after the 31 time, the next one it will send 0xC1 and the DEVICE ID and VERSION: "0x9F 0x81 0x03 'K'". Again it won't answer to the loader gui.

but if I send 0xFF it will sent 31 times and the rest it will send faster but it will work like normal with the loader gui.

I just wonder why it happends this, but I can't figure it out...

Another thing... if I have my PIC already programmed with the bootloader and the application, and then I try to load another application but in the middle of the downloading the new firmware it breaks the connection, the bootloader will jump to the application, despite of the application is not good because it will be half code of the last one and half code the new one that I am downloading so it can result to an unexpected flow of execution.

So maybe it will be a nice idea to send a new command at the end of the downloading proccess that the loader gui will send with to indicate that the new firmware was downloaded completely, so if the bootloader doesn't receive that command, after its timeout, it will know that the downloading proccess was broken and it won't jump to the app, it will wait again for another 0xC1 like if it didn't have any app.

I only give my opinion because I think that is a good improvement, but maybe I am missing something.

I wait for your comments Mikael Wink

and again congratulations
Reply
#2
Thank you! Smile

Why do you want to do that? What ds30 Loader client do you use?

Pretty good idea about rembembering if the download was completed.
I'll think about an implementation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)