Page 1 of 3

PR12 Sample Code Failed To Compile !!!

PostPosted: Tue Sep 01, 2009 10:40 pm
by engkiang
I just bought this kit PR12 and encounter an error during build the sample code and the error shows as below:
HI-TECH C PRO for the PIC10/12/16 MCU family (Lite) V9.65 Copyright (C) 1984-2009 HI-TECH SOFTWARE (1273) Omniscient Code Generation not available in Lite mode (warning)
Error [1347] ; 0. can't find 0xA56 words (0xa56 withtotal) for psect "text184" in segment "CODE" (largest unused contiguous range 0x800)
********** Build failed! **********
I do see someone post the same failure in product enquiry page too but Cytron said want to upgrade the code.

Can some help to solve this problem, I newbie just going to start the PIC and this is my first kit I bought. :cry:

Thanks.

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Wed Sep 02, 2009 1:14 pm
by joliza
We have compile the same source code from website and everything is okey. No error while compile the source code. Below is sample of result after we build the source code.

HI-TECH C PRO for the PIC10/12/16 MCU family (Lite) V9.60PL5
Copyright (C) 1984-2009 HI-TECH SOFTWARE
(1273) Omniscient Code Generation not available in Lite mode (warning)

Memory Summary:
Program space used 13CEh ( 5070) of 2000h words ( 61.9%)
Data space used 35h ( 53) of 170h bytes ( 14.4%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 1h ( 1) of 1h word (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)

Running this compiler in PRO mode, with Omniscient Code Generation enabled,
produces code which is typically 52% smaller than in Lite mode.
The HI-TECH C PRO compiler output for this code could be 2636 words smaller.
See http://microchip.htsoft.com/portal/pic_pro for more information.

Loaded C:\Documents and Settings\Joliza\Desktop\PR12 Source Code\PR12 Source Code\PR12.cof.

********** Build successful! **********


Can you download the source code once again and try to compile it. Hopefully it will success. Make sure MPLAB 8.30 and Hi-Tech C PRO is used. Thanks..

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Mon Sep 28, 2009 11:50 pm
by engkiang
I do aware that the source code had been updated after you reply. Hence, thanks for the reply by the way how to used the PICKit2 to program the chip through PR12 board?
Thanks.

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Tue Sep 29, 2009 11:13 am
by sich
engkiang WROTE:how to used the PICKit2 to program the chip through PR12 board?

If you have a PICkit2, you should have PICkit2 schematic. Then you can refer to the schematic given in PR12's Useful Doc section. There's a UIC00A Programmer Connector. Connect PICkit2 programming connector to PR12 programmer connector with the correct pins.

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Wed Sep 30, 2009 12:30 am
by engkiang
Thanks for the info.

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Fri Mar 23, 2012 1:15 am
by engkiang
Hi,
I just downloaded the PR12 source code from Cytron website. I'm tried to compile the source code and faced these error message from MPLAB

Error [192] E:\PIC Projects\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\i2c.c; 115.8 undefined identifier "RW"
Error [192] E:\PIC Projects\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\i2c.c; 234.8 undefined identifier "RW"

I'm totally no ideal of this error message and don't know how to fix it. I would like to request help to fix this error.
I'm using MPLAB v8.83 with HITECH C Compiler PRO mode v9.83.
Thanks. :D

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Fri Mar 23, 2012 9:01 am
by ABSF

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Fri Mar 23, 2012 10:22 am
by Brian Griffin


Thanks for sharing.

However the new MPLAB X IDE has a "config word generation" module - just select the option register below (master clear on/off, Brownout on/off...) and you can paste the generated config words macro into your code. :)

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Sat Mar 24, 2012 5:38 pm
by ABSF
Brian Griffin WROTE:


Thanks for sharing.


Credit goes to kl84... :D

Allen

Re: PR12 Sample Code Failed To Compile !!!

PostPosted: Mon Mar 26, 2012 10:28 pm
by engkiang
Thanks ABSF for the post. Finally the build was successfull by replace RW to R_W. Even the build was successfull but there are errors occur during building the project. Does the error giving any problem?

Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\i2c.c; 19. variable "_b_i2c_error_flag" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 57. variable "_dateh" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 58. variable "_datel" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 55. variable "_hourh" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 56. variable "_hourl" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 53. variable "_minutesh" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 54. variable "_minutesl" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 59. variable "_monthh" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 60. variable "_monthl" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 51. variable "_secondh" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 52. variable "_secondl" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 41. variable "_step" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 42. variable "_store" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 61. variable "_yearh" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 62. variable "_yearl" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 85. variable "_i" is not used
Warning [1090] E:\Cytron DIY Projects\Display Real Time Clock (RTC) on LCD\PR12 Source Code\PR12.c; 618. variable "_i" is not used

Memory Summary:
Program space used 8ABh ( 2219) of 2000h words ( 27.1%)
Data space used 1Ch ( 28) of 170h bytes ( 7.6%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 1h ( 1) of 1h word (100.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)