MPLAB/c18 not creating a .hex file

Basically, the topic. I believe it’s a problem with the project settings, as it only happens with certain robots’ codes. It will compile, create .cod & .coff files, mysteriously omit the .coff to .hex conversion, and declare the build complete.

What would this be caused by? I have no idea where to start, so info on settings will be provided on request. Thank you :slight_smile:

There is a setting to supress the creation of the hex file. In MPLAB, go to Projects -> Build Options -> Project -> MPLINK Linker and verify that INHX32 is selected.

It is.

Could be the “Output Directory” is set in
Project -> Build Options… -> Project
to be some place other than the current directory.

That wouldn’t cause the linker not to even output “cod to hex converter” (or whatever the exact wording is…) though, would it?

I was thinking that if no COFF is evident in the directory to be passed to mp2hex.exe, then MPLAB would automatically skip that step or mp2hex.exe would just stop and not display any message.

I encountered this same issue with Smithtown a couple of year’s ago and I’m trying to remember how we fixed it. They had played around a lot with the settings and had specified where intermediate directories, etc. were located instead of taking the installation defaults.
It may have been a matter of taking all the defaults or reinstalling MPLAB/C18 to get all the default settings back, but based on your experience of it happening with some files and not others, I suspect we must have recreated the projects as well to correct the project specific settings.

You can run mp2hex.exe from a command line in case it gives you any more useful information.

OK, I’ll give that a shot when I’m back in school tomorrow, Mark

Well, running mp2hex.exe did nothing…

…because the path was too long -_- The projects that weren’t getting hexes made were the ones whose paths were longer than 62 characters…always read carefully :slight_smile:

Thanks for the help, all.