Jump to content

warnings when compiling my app for 18f4620


WickedBlade
 Share

Recommended Posts

Hello,

I've written a rather simple app (from scratch, or rather from skeleton), and I'm getting warnings at link time when building for the 18f4620. To build for this model I simply changed the "PROCESSOR" value in the makefile.

When I build for the 18f452, I get no such warnings.

I've tried with a couple of the samples provided by the MIOS base package, but couldn't reproduce the behavior with those.

The warnings are thus:

warning: processor mismatch in "gptrget1.o"
warning: processor mismatch in "gptrput1.o"
Please note that this happens with SDCC 2.8.0 and 2.9.0 and with gputils 0.13.5 and 0.13.6. When I use gputils 0.13.7 I still get these warnings, plus an additionnal two, even more alarming:
warning: unknown processor type (0xa462) in "pic18f4620.o" defaulted to pic18cxx
warning: processor mismatch in "pic18f4620.o"

That makes me suspect that the warnings all come from gputils but I can't be sure.

I am well aware that these are "only warnings", but in my experience, it's better to correct them ASAP lest they come back and bite you at your most unprepared...

Can somebody tell me what I can do to fix this please? Please note that there are no other warnings whatsoever during the code compilation and that the link does succeed (no error).

Thanks.

Link to comment
Share on other sites

All right I've wandered through a couple of folders, tried more samples and some complete apps (SEQ and such) without success.

And then I stumbled on the lib\libsdcc\sdcc_2.8.0 folder. As it turns out, if I build the libsdcc.lib file with this for the 18f4620, it works and the first 2 warnings disappear.

I guess that will do. I wonder though: I've read the README.txt file and I wonder what's different in this source folder from the original folder found in "C:\Program Files\SDCC\lib\src\pic16\libsdcc". I'm asking because, as I use SDCC 2.9.0, I thought I may have to build the newer libsdcc. But if this is some kind of "hack" for MIOS, I need to integrate the changes...

Link to comment
Share on other sites

For those interested, the files from the SDCC sources for libsdcc aren't modified at all in MIOS, so it's ok to use them directly, with the makefile from lib\libsdcc\sdcc_2.8.0\Makefile (modified for the 4620 in my case). I checked them all against the original source to make sure of it.

I am now using this 4620-specific libsdcc together with gputils 0.13.6 and I no longer have warnings, all seems fine.

Link to comment
Share on other sites

Hello,

to get rid of this warning, I simply compiled the source in lib\libsdcc\sdcc_2.8.0 (in the MIOS package) again, after having modified the makefile to compile for the PIC I'm intending to use. Then I copy the resulting libsdcc.lib file in that directory to the lib\ directory, overwriting the old one.

(Note: to build this libsdcc, I only had to open a command prompt in the directory and type make)

Tell me if you need more help!

Link to comment
Share on other sites

  • 2 months later...

I receive these warnings too after changing the processor to 18f4620 and have not been able to resolve them.


warning: processor mismatch in "gptrput1.o"

warning: processor mismatch in "mulint.o"

warning: processor mismatch in "gptrget1.o"

My app works fine however with no noticeable issues so far. Originally I was compiling for a 18f452 and later changed to a 18f4620. The makefile for my project is now set to "PROCESSOR = 18f4620" obviously. I've tried recompiling the sdcc lib after updating the processor in the make file here: D:\SourceCode\MatrixBox\Mios_Base\lib\libsdcc\sdcc_2.8.0\ but I get this error:

make: *** No rule to make target `_output/fixed16x16/fps16x162schar__mios-gpasm-tmp.s', needed by `libsdcc.lib'.  Stop.

Here is a copy of my path variable

PATH=C:\MSYS\1.0\bin;C:\Program Files\gputils\bin;C:\Program Files\SDCC\bin;C:\MinGW\bin;C:\Program Files\SDCC\bin;C:\Pr

ogram Files\gputils\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Microsoft SQL Server\80

\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\

Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7

\IDE\PrivateAssemblies\;C:\Program Files\TortoiseSVN\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\SD

CC\bin;C:\Program Files\gputils\bin

and my MIOS env vars

MIOS_BIN_PATH=D:\SourceCode\MatrixBox\Mios_Base\bin

MIOS_PATH=D:\SourceCode\MatrixBox\Mios_Base

Edited by jackchaos
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...