Dear,
i would like to help from you. I programming myself flash update via serial link. I set the all functions (flash page erase, read and write) to address starts with 0x8000. These functions are called after command receieved from serial link (start flashing memory - start from 0x0000, to max 0x4000). the program is running in 0x8000 section but, sometimes are called default libraries(?C?CSTOPTR) which are located in section 0x0000. Is there some possibility how to move these function to user-defined memory space?? I am not able to find some possibility to move these functions to (for example) address 0x8200
in *.m51 called modules like (not all)
------- MODULE ?C?FPDIV C:07D0H PUBLIC ?C?FPDIV ------- ENDMOD ?C?FPDIV ------- MODULE ?C?FPCMP C:086FH PUBLIC ?C?FPCMP C:086DH PUBLIC ?C?FPCMP3 ------- ENDMOD ?C?FPCMP ------- MODULE ?C?FCAST C:08F0H PUBLIC ?C?FCASTC C:08EBH PUBLIC ?C?FCASTI C:08E6H PUBLIC ?C?FCASTL ------- ENDMOD ?C?FCAST ------- MODULE ?C?CASTF C:0924H PUBLIC ?C?CASTF ------- ENDMOD ?C?CASTF ------- MODULE ?C?CLDPTR C:09A5H PUBLIC ?C?CLDPTR ------- ENDMOD ?C?CLDPTR ------- MODULE ?C?CLDOPTR C:09BEH PUBLIC ?C?CLDOPTR ------- ENDMOD ?C?CLDOPTR
BL51 version: BL51 BANKED LINKER/LOCATER V6.22 , MCU C8051F380-TB dev kit.
Thank you for your answers
Learn to build two separate binaries with different functionality and different target address. You should be very careful about trying to build one binary where you may later update half of it and keep the other half. The likelyhood that the remaining part is depending on something already erased or the new part was depending on something not part of the older fixed part is very large.
Just create a traditional boot loader as one binary. And a traditional application. And then let the boot loader take care of replacing an old application with a newer version without having any whatsoever relationsships or internal knowledge about the application binary it downloads/flashes/starts.