Loading firmware from PC app, wo/ changing RESET vector

donvukovic
2014-04-03
2014-04-08
  • donvukovic

    donvukovic - 2014-04-03

    I would like to bootload a file that already has the RESET vector modified in the .hex file.

    Where in the C# code does it change the RESET vector ?

    Can an extra button be created to select to Change/Not Change that RESET vector.

    Thanks

     
  • Dan

    Dan - 2014-04-08

    Hi,donvukovic

    This is exsamples.

    How to bypass activation of the bootloader.

    1. To provide a jumper switch pin which is not used for communication.

    2. Program modifications

    <tinybld12F617_8MHz_int_9600.asm>

    ;0000000000000000000000000 RESET 00000000000000000000000000

                org     0x0000
        pagesel IntrareBootloader
                goto    IntrareBootloader
    
                                        ;view with TabSize=4
    

    ;&&&&&&&&&&&&&&&&&&&&&&& START &&&&&&&&&&&&&&&&&
    ;---------------------- Bootloader ----------------------

                org     first_address
    

    ; nop
    ; nop
    ; nop
    ; nop

                org     first_address+4
    

    IntrareBootloader:

    ;* add these lines to your source file **

        btfss   GPIO,0      ;check Jumper pin
        goto    first_address
    

    ;**********

                                        ;init int clock & serial port
    

    #ifdef Direct_TX
    bcf GPIO,TX
    #else
    bsf GPIO,TX
    #endif

    1. How to use.

    First start,

    Writing a program to remove the jumper pin.

    Second and subsequent,

    Program run time, You plug the jumper pin

    Program rewriting, You remove the jumper pin.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks