0

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??

Daniel N.
  • 174
  • 1
  • 10
  • I think the easiest way to do is to change the absolute path to a relative path, either from the file generation or editing it manually. But until now, can't figure out how. – Daniel N. Jun 12 '15 at 04:20

1 Answers1

1

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.

janm
  • 17,976
  • 1
  • 43
  • 61
  • The environment is almost netbeans, on the embedeed >> project options, there is option which let you select between generate relative paths or absolute paths – Daniel N. Jun 22 '15 at 01:07
  • I am having the exact same need, but I found that this IDE option ( generate relative paths or absolute paths in project options) does not change the generation of the COFF file with absolute path the the source.. I already read the MPLINK user's guide (http://ww1.microchip.com/downloads/en/DeviceDoc/33014L.pdf) and found no option regarding source path in the COFF.. anyone found a solution? @DanielN. – Gustavo Laureano Mar 20 '18 at 16:17
  • @GustavoLaureano You could try taking the command line from your IDE, changing the paths to relative paths, and then testing from the command line. The linker doesn't need a special option to generate relative paths; it uses the paths it is given. – janm Mar 21 '18 at 08:16