AJ Yeckel
stranger
Reged: Jun 26 2009
Posts: 2
|
|
I'm working on a project to run on a pic16F884, and building using picc pro 9.65PL1. On my Mac, I have a licensed copy of the compiler; on my Linux box, I have the demo version, installed today. On my Mac, I am getting linker errors; on Linux, it builds successfully. Are there known differences or incompatibilities between the OsX and Linux versions of Picc pro 9.65pl1?
What's the best way to go about tracking down this problem?
Here's a sample of the compile command:
/Applications/HI-TECH/picc/pro/9.65PL1/bin/picc --chip=16F884 -G -M -Q --asmlist --warn=9 --char=unsigned --double=24 --opt=all --opt=+9 --pass1 -debugger=icd2 -DDEBUG -UNDEBUG -oDebug/objs/main.p1 -c main.c
Here's my linker command:
/Applications/HI-TECH/picc/pro/9.65PL1/bin/picc --chip=16F884 --summary=mem,file -G -M -Q --asmlist --warn=9 --char=unsigned --double=24 --output=+intel --output=+mcof --runtime=+init --runtime=+osccal --runtime=+clear --runtime=+clib --runtime=+keep --debugger=icd2 --opt=all --opt=+9 -oDebug/Controller.hex Debug/objs/command.p1 Debug/objs/main.p1 Debug/objs/motor.p1 Debug/objs/persistent.p1 Debug/objs/uart.p1 Debug/objs/encoders.p1
These are the errors I'm seeing:
double.c: 55: (1253) could not find space (81 bytes) for auto/param block /Applications/HI-TECH/picc/pro/9.65PL1/sources/rand.c: 11: (1253) could not find space (81 bytes) for auto/param block encoders.c: 204: (1253) could not find space (81 bytes) for auto/param block (908) exit status = 1
Tiny code changes can change the exact error, but it is always of the same form. It seems to imply to me that the code is too big to fit on the given PIC, except that it compiles successfully with the Linux picc compiler, and tells me:
Memory Summary: Program space used B05h ( 2821) of 1000h words ( 68.9%) Data space used 9Ah ( 154) of 100h bytes ( 60.2%) EEPROM space used 8h ( 8) of 100h bytes ( 3.1%) Configuration bits used 1h ( 1) of 2h words ( 50.0%) ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
I have done a diff between the .p1 and .pre files built with the osx compiler and built with the linux compiler, and they are identical. The linker builds a .sdb file which is significantly different between the OSX build and the Linux build. I don't know the format of this file, so I'm not quite sure how to interpret the diff, but most of the diffs are a form that I interpret as putting variables into different memory locations:
-[v _status `VE810 1 e 1 @108 ] +[v _status `VE810 1 e 1 @35 ]
On the (failed) OSX build, only the .sdb file gets generated by the linker step, and it's about 2/3 of the size of the same file on linux.
Can anyone provide suggestions as to why my project builds with the Linux compiler, but not with the OSX compiler and/or provide suggestions for how to track down the problem?
Thanks.
--AJ
|
AJ Yeckel
stranger
Reged: Jun 26 2009
Posts: 2
|
|
For anyone who comes across this same issue in the future, this has now been resolved; here's the answer:
As reported by running "picc --ver", I had inadvertently installed the "lite" edition on my Mac, instead of the full edition. The "lite" edition does not have the same optimization functionality that the full edition has, and so it was not able to fit my full program onto the chip. Re-installing and installing the full edition causes everything to work.
The lite version reports: %picc --ver HI-TECH C PRO for the PIC10/12/16 MCU family (Lite) V9.65PL1 Copyright (C) 1984-2009 HI-TECH SOFTWARE (1273) Omniscient Code Generation not available in Lite mode (warning)
The full version reports: %picc --ver HI-TECH C PRO for the PIC10/12/16 MCU family V9.65PL1 Copyright (C) 1984-2009 HI-TECH SOFTWARE Serial number: HCPICP-XXXXXX
Thanks to Josh at HI-Tech for helping me track this down.
--AJ
|
|