??? 01/13/09 12:33 Read: times Msg Score: +1 +1 Informative |
#161485 - you NEVER replace the bootloader Responding to: ???'s previous message |
you NEVER replace the bootloader which resides in low memory CSEG AT 000h ;reset ljmp app_cksm CSEG AT 003h ;int 0 ljmp ISC_EI0 CSEG AT 00bh ;int 1 ljmp ISC_T0 CSEG AT 013h ;int 2 ljmp ISC_EI1 CSEG AT 01bh ;int 3 ;;T1 ljmp ISC_T1 ........ // here switches between boot and app. ISC_EI0: jnb GBboot,appET0 //int 0 ljmp ISR_EI0 appET0: ljmp APPBASE + 000h ISC_T0: jnb GBboot,appT0 //int 1 ljmp ISR_T0 appT0: ljmp APPBASE + 004h ISC_EI1: jnb GBboot,appEI1 //int 2 ljmp ISR_EI1 appEI1: ljmp APPBASE + 008h ISC_T1: jnb GBboot,appT1 //int 3 lcall momma_spin0 reti ....... app_cksm: mov dptr, #4000h ; app area extends from 4000h to fbffh startup: setb GBboot mov dptr,#0fb1fh mov a,#0 movc a,@a+dptr jz startAP ; if last page of flash is erased we are in app mode ljmp ?C_STARTUP startAP: clr GBboot ljmp APPBASE + 060h Erik PS mommspin0 is the routine for "thing that can not happen" |
Topic | Author | Date |
Own IAP boot loader for P89V51RB2 | 01/01/70 00:00 | |
do you need ... | 01/01/70 00:00 | |
Yes, unfortunately. | 01/01/70 00:00 | |
many have made bootloaders that die not reside in a "boot fl | 01/01/70 00:00 | |
Me too | 01/01/70 00:00 | |
FlashMagic | 01/01/70 00:00 | |
yes | 01/01/70 00:00 | |
not necessarily | 01/01/70 00:00 | |
that is correct, sorry | 01/01/70 00:00 | |
Industrial device without Windows | 01/01/70 00:00 | |
and so what | 01/01/70 00:00 | |
Proper Coding? | 01/01/70 00:00 | |
you NEVER replace the bootloader | 01/01/70 00:00 | |
Bit GBboot | 01/01/70 00:00 | |
a standard bit variable | 01/01/70 00:00 | |
Thank you, I have my solution![]() | 01/01/70 00:00 | |
options | 01/01/70 00:00 | |
Options | 01/01/70 00:00 |