What I have done
I've started my first Reverse-Engineering project and have extracted the HEX from the PIC16F1938 processor of the Delonghi Dedica EC685 coffee machine. The stock firmware can be found here: Delonghi Dedica EC685 Stock Firmware
I have used MPLabX to program the simulator memory and then used the 'Output to file' to save the DisAssy
output. This gives me the whole program memory and with some minor registry name fixes I 'hoped' this would be a valid Assembly file. PIC16F1938 Assembly File
Problem
When I use pic-as
under the MPLab X IDE to compile this I get an error which looks to say that there isn't enough program space!? That is just wrong as the code was extracted from the device onto which we are programming.
The main error appears to be error: (1347) can't find 0x2943 words (0x2943 withtotal) for psect "code" in class "CODE" (largest unused contiguous range 0x800)
which I cannot make sense of.
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'E:/Development/Pic/Pic16f1938_test.X'
make -f nbproject/Makefile-default.mk dist/default/production/Pic16f1938_test.X.production.hex
make[2]: Entering directory 'E:/Development/Pic/Pic16f1938_test.X'
"C:\Program Files\Microchip\xc8\v2.36\pic-as\bin\pic-as.exe" -mcpu=PIC16F1938 -c \
-o build/default/production/newpic_8b_asm_func.o \
newpic_8b_asm_func.S \
-mdfp="C:/Program Files/Microchip/MPLABX/v6.10/packs/Microchip/PIC12-16F1xxx_DFP/1.4.213/xc8" -msummary=+mem,+psect,+class,+hex,-file,-sha1,-sha256,-xml,-xmlfull -fmax-errors=20 -mwarn=0 -xassembler-with-cpp
"C:\Program Files\Microchip\xc8\v2.36\pic-as\bin\pic-as.exe" -mcpu=PIC16F1938 build/default/production/newpic_8b_asm_func.o \
-o dist/default/production/Pic16f1938_test.X.production.hex \
-mdfp="C:/Program Files/Microchip/MPLABX/v6.10/packs/Microchip/PIC12-16F1xxx_DFP/1.4.213/xc8" -msummary=+mem,+psect,+class,+hex,-file,-sha1,-sha256,-xml,-xmlfull -mcallgraph=std -Wl,-Map=dist/default/production/Pic16f1938_test.X.production.map -mdownload-hex
:0:: error: (1347) can't find 0x2943 words (0x2943 withtotal) for psect "code" in class "CODE" (largest unused contiguous range 0x800)
Non line specific message::: advisory: (1493) updated 32-bit floating-point routines might trigger "can't find space" messages appearing after updating to this release; consider using the smaller 24-bit floating-point types
:0:: warning: (528) no start record; entry point defaults to zero
(908) exit status = 1
nbproject/Makefile-default.mk:121: recipe for target 'dist/default/production/Pic16f1938_test.X.production.hex' failed
make[2]: Leaving directory 'E:/Development/Pic/Pic16f1938_test.X'
nbproject/Makefile-default.mk:85: recipe for target '.build-conf' failed
make[1]: Leaving directory 'E:/Development/Pic/Pic16f1938_test.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/Pic16f1938_test.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
Help is much appreciated as I am new to PIC assembly but I'm an experienced software engineer branching out :)