(bootloader) ( ). , (self-programming). , , , ( , EEPROM, SD- ..). , . , , . , . , : / . , ? ( ) , ? 3 . HEX- HEX- . . , . . , , . , , . , , . , , HEX-. , , : MPLAB IDE v8.85 (, IDE) Microchip C30 Toolsuite v3.12 COFF (.. toolchain-a) 00400 02000 00200 00400 . . . . , ( / / ) UltraBoot3000.blob. . MPLAB IDE Object Files. , o. , o . , , blob binary linked object. IDE blob Object Files, . Filter. -- . : *.o;*.blob . ! ! , . , , , (MPLAB IDE gld), . , , / ? . - , . ${ToolChainPath}\support\dsPIC33F\gld\. : ${ToolChainPath} , 30, c:\Program Files\Microchip\MPLAB C30\. , dsPIC33FJ128GP802 p33FJ128GP802.gld. , . , : _Booter = 0x000400; _mainFW = 0x002000; MEMORY {} program (origin) (length), flash- . : program (xr) : ORIGIN = 0x400,LENGTH = (0x15800 - 0x400) . SECTIONS {} Reset Instruction. : .reset : { SHORT(ABSOLUTE(_Booter)); SHORT(0x04); SHORT((ABSOLUTE(_Booter) >> 16) & 0x7F); SHORT(0); } >reset . SECTIONS {}. .text. : .boot _Booter : { *(.booter); . = _mainFW - _Booter; } >program = 0xFFFF , . , : . , . . , , : , , flash-, . . : , , . . , . . , , . MPLAB LINK30, General. -: dont pack data template; dont create hanldes; dont create default ISR; remove unused sections. . , . MEMORY {} : data program. program : { data (a!xr) : ORIGIN = 0x800, LENGTH = 0x4000 program (xr) : ORIGIN = 0x400, LENGTH = 0x1C00 } Reset Instruction SECTIONS {}. Configuration Words. SECTIONS {}, ( Section Map for Interrupt Vector Tables). SECTIONS {} .text, .booter : .booter 0x400 : { *(.init); *(.user_init); *(.handle); *(.libc) *(.libm) *(.libdsp); /* keep together in this order */ *(.lib*); *(.dinit); *(.text); } >program , . . ( MPLAB IDE Output, Build) . , : Program Memory [Origin = 0x400, Length = 0x1c00] section address length (PC units) length (bytes) (dec) ------- ------- ----------------- -------------------- .booter 0x400 0x7d0 0xbb8 (3000) Total program memory used (bytes): 0xbb8 (3000) 27% Data Memory [Origin = 0x800, Length = 0x4000] section address alignment gaps total length (dec) ------- ------- -------------- ------------------- .nbss 0x800 0 0xa2c (2604) bootdata 0x47c0 0 0x40 (64) Total data memory used (bytes): 0xa6c (2668) 16% program memory . .booter . data memory. . cof. . ultraboot.cof, : "${ToolChainPath}\bin\pic30-strip.exe" -s > ${ToolChainPath} . > . : "${ToolChainPath}\bin\pic30-objdump.exe" -ht ultraboot.blob : ultraboot.blob: file format coff-pic30 Sections: Idx Name Size VMA LMA File off Algn 0 .booter 000007d0 00000400 00000400 00000058 2**1 CONTENTS, ALLOC, LOAD, CODE SYMBOL TABLE: no symbols , .booter , , . : drive.google.com/file/d/0B063O4zepkwsNDlCMkJ1S1ZxaE0/view?usp=sharing drive.google.com/file/d/0B063O4zepkwsZU9Nck42cVoyWDA/view?usp=sharing