Compilation Error for Microchip IDE , C18

Discussion in 'Embedded Systems and Microcontrollers' started by arikiev, Sep 20, 2010.

  1. arikiev

    Thread Starter New Member

    Sep 18, 2010
    4
    0
    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.

    Code ( (Unknown Language)):
    1. ----------------------------------------------------------------------
    2. Release build of project `C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd4550.mcp' started.
    3. Mon Sep 20 08:29:04 2010
    4. ----------------------------------------------------------------------
    5. Clean: Deleting intermediary and output files.
    6. Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.o".
    7. Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd4550.mcs".
    8. Clean: Done.
    9. 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-
    10. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:135:Warning [2054] suspicious pointer conversion
    11. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:136:Warning [2054] suspicious pointer conversion
    12. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:138:Warning [2054] suspicious pointer conversion
    13. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:139:Warning [2054] suspicious pointer conversion
    14. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:140:Warning [2054] suspicious pointer conversion
    15. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:141:Warning [2054] suspicious pointer conversion
    16. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:142:Warning [2054] suspicious pointer conversion
    17. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:143:Warning [2054] suspicious pointer conversion
    18. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:144:Warning [2054] suspicious pointer conversion
    19. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:145:Warning [2054] suspicious pointer conversion
    20. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:146:Warning [2054] suspicious pointer conversion
    21. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:147:Warning [2054] suspicious pointer conversion
    22. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:148:Warning [2054] suspicious pointer conversion
    23. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:149:Warning [2054] suspicious pointer conversion
    24. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:150:Warning [2054] suspicious pointer conversion
    25. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:151:Warning [2054] suspicious pointer conversion
    26. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:152:Warning [2054] suspicious pointer conversion
    27. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:153:Warning [2054] suspicious pointer conversion
    28. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:154:Warning [2054] suspicious pointer conversion
    29. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:155:Warning [2054] suspicious pointer conversion
    30. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:156:Warning [2054] suspicious pointer conversion
    31. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:157:Warning [2054] suspicious pointer conversion
    32. C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd-4550.c:158:Warning [2054] suspicious pointer conversion
    33. 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"
    34. MPLINK 4.1, Linker
    35. Copyright (c) 2006 Microchip Technology Inc.
    36. 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'
    37. Errors    : 1
    38.  
    39. Link step failed.
    40. ----------------------------------------------------------------------
    41. Release build of project `C:\Documents and Settings\WHW\Desktop\prj\LCD_X\lcd4550.mcp' failed.
    42. Mon Sep 20 08:29:05 2010
    43. ----------------------------------------------------------------------
    44. BUILD FAILED
    Please help if possible! :D
     
    Last edited by a moderator: Sep 20, 2010
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  3. arikiev

    Thread Starter New Member

    Sep 18, 2010
    4
    0
    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:
    Code ( (Unknown Language)):
    1. sbit CS=P2^5;      
    2. sbit RES=P2^7;     
    3. sbit RS=P2^4;      
    4. sbit RW=P2^3;
    5.  
    to:
    Code ( (Unknown Language)):
    1. #define  CS LATDbits.LATD0
    2. #define RES LATDbits.LATD1
    3. #define  RS LATDbits.LATD2
    4. #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!

    [​IMG]
    [​IMG]
    [​IMG]
     
    • info.pdf
      File size:
      429.1 KB
      Views:
      35
  4. arikiev

    Thread Starter New Member

    Sep 18, 2010
    4
    0
    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:

    Code ( (Unknown Language)):
    1. ----------------------------------------------------------------------
    2. Release build of project `C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd4550.mcp' started.
    3. Mon Sep 20 23:10:33 2010
    4. ----------------------------------------------------------------------
    5. Clean: Deleting intermediary and output files.
    6. Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.o".
    7. Clean: Deleted file "C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd4550.mcs".
    8. Clean: Done.
    9. 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-
    10. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:134:Warning [2054] suspicious pointer conversion
    11. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:135:Warning [2054] suspicious pointer conversion
    12. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:137:Warning [2054] suspicious pointer conversion
    13. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:138:Warning [2054] suspicious pointer conversion
    14. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:139:Warning [2054] suspicious pointer conversion
    15. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:140:Warning [2054] suspicious pointer conversion
    16. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:141:Warning [2054] suspicious pointer conversion
    17. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:142:Warning [2054] suspicious pointer conversion
    18. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:143:Warning [2054] suspicious pointer conversion
    19. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:144:Warning [2054] suspicious pointer conversion
    20. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:145:Warning [2054] suspicious pointer conversion
    21. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:146:Warning [2054] suspicious pointer conversion
    22. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:147:Warning [2054] suspicious pointer conversion
    23. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:148:Warning [2054] suspicious pointer conversion
    24. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:149:Warning [2054] suspicious pointer conversion
    25. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:150:Warning [2054] suspicious pointer conversion
    26. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:151:Warning [2054] suspicious pointer conversion
    27. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:152:Warning [2054] suspicious pointer conversion
    28. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:153:Warning [2054] suspicious pointer conversion
    29. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:154:Warning [2054] suspicious pointer conversion
    30. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:155:Warning [2054] suspicious pointer conversion
    31. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:156:Warning [2054] suspicious pointer conversion
    32. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:157:Warning [2054] suspicious pointer conversion
    33. C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd-4550.c:456:Warning [2058] call of function without prototype
    34. 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
    35. MPLINK 4.1, Linker
    36. Copyright (c) 2006 Microchip Technology Inc.
    37. Error - processor types do not agree across all input files.
    38. Errors    : 1
    39.  
    40. Link step failed.
    41. ----------------------------------------------------------------------
    42. Release build of project `C:\Documents and Settings\WHW\Desktop\prj\new_lcd\lcd4550.mcp' failed.
    43. Mon Sep 20 23:10:35 2010
    44. ----------------------------------------------------------------------
    45. BUILD FAILED
    46.  
    could anybody please give some idea getting out of this?
     
  5. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    I merged the threads as it seems to be a continuation of the former one.

    Bertus
     
Loading...