Modifying a Microchip COFF file

367 views Asked by At

I want to simulate in proteus a program that I made, but it was compiled using MPLABX on linux, proteus is running in a virtual machine and windows XP. My computer is hardware less, so try to run MPLABX on the virtual machine is really demanding for my netbook. Also, to run proteus under wine is really buggy.

The generated COFF file is pointing to my source code using the absolute path in linux format, because of that proteus can't load the source code for debugging, it simply can't undertand what path it is. I've already try to edit the path manually using an HEX editor and try to a valid windows format, but then, when I try to load it, it throws me an error saying that the file was corrupted.

Any ideas??

1

There are 1 answers

3
janm On

The pathname in the debug information is the pathname passed to the compiler. To generate a relative path in the debug information, compile with a relative path.

I'm not sure about the details of using MPLABX -- I use a separate build system to control this kind of detail. You should be able to specify a relative path in the MPLABX project or get a command sequence that MPLABX is using to perform the compilation and modify that to use relative paths.