Jump to content

Non-MIOS related programming Questions


Recommended Posts

Hi TK,

If you could help me out a little on this, i would be grateful.

Its a question regarding bootloaders and apps that use them. If an app was wriiten to use a bootloader can you recode the program memory start location and run the app without a bootloader.

Take a look at this : -

;

; ---------------------

; YOUR CODE BEGINS HERE

; ---------------------

;

     org 0x0003

;

UCode      goto Start

;

; ------------------

; ERROR MESSAGE DATA

; ------------------

;

errMessDt      clrf PCLATH

     movf MessPt,W

     addwf PCL

     DT "EEPROM ERROR"

;

and at the very last of the code is this :-

;

; -----------------------

; BOOT CODE START ADDRESS

; -----------------------

; DO NOT PLACE ANY CODE PAST THIS POINT

;

     org 0x1F00

MonCode

     org 0x1FFF

EnterBoot

;

;

     end

So will changing to org 0x0000 and the end bit allow the app to work without the bootoader.

If its possible, can you clue me in to what to do.

Peace

Frank

Link to comment
Share on other sites

Hi TK,

If you could help me out a little on this, i would be grateful.

Its a question regarding bootloaders and apps that use them. If an app was wriiten to use a bootloader can you recode the program memory start location and run the app without a bootloader.

Take a look at this : -

;

; ---------------------

; YOUR CODE BEGINS HERE

; ---------------------

;

     org 0x0003

;

UCode      goto Start

;

; ------------------

; ERROR MESSAGE DATA

; ------------------

;

errMessDt      clrf PCLATH

     movf MessPt,W

     addwf PCL

     DT "EEPROM ERROR"

;

and at the very last of the code is this :-

;

; -----------------------

; BOOT CODE START ADDRESS

; -----------------------

; DO NOT PLACE ANY CODE PAST THIS POINT

;

     org 0x1F00

MonCode

     org 0x1FFF

EnterBoot

;

;

     end

So will changing to org 0x0000 and the end bit allow the app to work without the bootoader.

If its possible, can you clue me in to what to do.

Peace

Frank

Link to comment
Share on other sites

Hi Frank,

if the application has been written on a proper way, so that it doesn't rely on previous initializations which are made by the bootstrap loader, you could bypass the bootloader by overwriting address 0x0000-0x0002 with "NOP" instructions. Do you have access to the source code? If not, you could also patch the hex file

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Frank,

if the application has been written on a proper way, so that it doesn't rely on previous initializations which are made by the bootstrap loader, you could bypass the bootloader by overwriting address 0x0000-0x0002 with "NOP" instructions. Do you have access to the source code? If not, you could also patch the hex file

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...