Compilation Error for Microchip IDE , C18

Thread Starter

arikiev

Joined Sep 18, 2010
4
Hi,
being a novice I've had many problems with adopting a small test-driver of an LCD for PIC18F4550. Now much further from some days ago by the help of various great people of forums, but still get errors for things I don't know about the C18 compiler I'm using.

I'll provide the current error I have, hope someone help me go one step further with it. Also, I see in link statement "E:\mcc18\h", while I don't have such folder, but in "C:\mcc18\h", and I can't find from where in Microchip IDE to edit this.

I also attach the program and its other header files.

Rich (BB code):
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd4550.mcp' started.
Mon Sep 20 08:29:04 2010
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.o".
Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd4550.mcs".
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F4550 /i"E:\MCC18\h" "lcd-4550.c" -fo="LCD-4550.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:135:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:136:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:138:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:139:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:140:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:141:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:142:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:143:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:144:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:145:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:146:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:147:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:148:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:149:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:150:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:151:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:152:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:153:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:154:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:155:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:156:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:157:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:158:Warning [2054] suspicious pointer conversion
Executing: "C:\mcc18\bin\mplink.exe" /l"E:\MCC18\lib" /k"E:\MCC18\lkr" "18f4550.lkr" "lcd-4550.o" /z__MPLAB_BUILD=1 /m"lcd4550.map" /o"lcd4550.cof"
MPLINK 4.1, Linker
Copyright (c) 2006 Microchip Technology Inc.
Error - Configuration settings have been specified for address 0x00300000 in more than one object module.  Found in './lcd-4550.o', previously found in './LCD-4550.o'
Errors    : 1

Link step failed.
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd4550.mcp' failed.
Mon Sep 20 08:29:05 2010
----------------------------------------------------------------------
BUILD FAILED
Please help if possible! :D
 

Attachments

Last edited by a moderator:

t06afre

Joined May 11, 2009
5,934
It looks like you have defined the configurations bits in two different places. Are you able to tell us more about your code and setup. Which C compiler do you use, is your hardware some kit etc.
 

Thread Starter

arikiev

Joined Sep 18, 2010
4
It looks like you have defined the configurations bits in two different places. Are you able to tell us more about your code and setup. Which C compiler do you use, is your hardware some kit etc.
Thank you T06afre for the post,
Sure i can!

The overall goal is to provide the simplest-possible driver for a Chinese LCD I have, to work with PIC18F4550. The final system would be a simple DIY PDA.

The story:
I decided to make a PDA myself to learn.

Aimed for learning about:
LCD, Embedded web server, Bluetooth, USB, etc. Based on FreeRTOS.

Chose Nokia 6100 LCD first, and then for months tried to learn UV-Photoresists to build a PCB with the footprint for that LCD. Finally made it, but by connecting the LCD wrong, burnt both of my LCDs and ordered new ones :D

Fortunately, I've had the LCD which is the target of this code around, and decided to not to wait for Nokia and use this oen.

The LCD came with test code, but they were in Chinese. I translated it using google, but again it didn't help: the code appeared to be for 8052 MCU.

The main files of the code are:
1. Font files: 8x8h.h, 8x16.h, GB1616.h, GB3232.h
2. Main file: LCD-4550.c

My initial problem was that the pin assignment was for 8052 and by magical help of the device called "forum", I learned to change:
Rich (BB code):
sbit CS=P2^5;		
sbit RES=P2^7;		
sbit RS=P2^4;		
sbit RW=P2^3;
to:
Rich (BB code):
#define  CS LATDbits.LATD0 
#define RES LATDbits.LATD1 
#define  RS LATDbits.LATD2 
#define  RW LATDbits.LATD3
But still there are problems.

I will go for reading the whole user manual of Microchip C18, but for now I need this hello-world to work, so that I find enough self confidence and go on.

I'll provide information of the LCD here, to what I'll connect my PIC18F4550. Another thing that confuses me in the code is that, data lines of one port, say, PORTD of MCU are connected to the DB0-7 of the LCD, but in the test code, Chinese use DL first, then DH to the same PINs that where load with DL (you can see this in the code provided above, on main file, in data/command functions "write_" around the end of the file).

Please help and give ideas so that it would be possible to go on, thank you in advance!



 

Attachments

Thread Starter

arikiev

Joined Sep 18, 2010
4
Hi,
I'm one step further on the way to put my LCD to be driven by my PIC18F4550, still struggling with one error I can't understand:

Rich (BB code):
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd4550.mcp' started.
Mon Sep 20 23:10:33 2010
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.o".
Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd4550.mcs".
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F4550 /i"C:\mcc18\h" "lcd-4550.c" -fo="LCD-4550.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:134:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:135:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:137:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:138:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:139:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:140:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:141:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:142:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:143:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:144:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:145:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:146:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:147:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:148:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:149:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:150:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:151:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:152:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:153:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:154:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:155:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:156:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:157:Warning [2054] suspicious pointer conversion
C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:456:Warning [2058] call of function without prototype
Executing: "C:\mcc18\bin\mplink.exe" /l"C:\mcc18\lib" /k"C:\mcc18\lkr" "..\..\..\..\..\mcc18\lkr\18f4450.lkr" "lcd-4550.o" /z__MPLAB_BUILD=1 /o"lcd4550.cof" /M"lcd4550.map" /W
MPLINK 4.1, Linker
Copyright (c) 2006 Microchip Technology Inc.
Error - processor types do not agree across all input files.
Errors    : 1

Link step failed.
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd4550.mcp' failed.
Mon Sep 20 23:10:35 2010
----------------------------------------------------------------------
BUILD FAILED
could anybody please give some idea getting out of this?
 
Top