using c18 for pic(how to add source file)

Discussion in 'Embedded Systems and Microcontrollers' started by Karandeep Singh, Oct 30, 2007.

  1. Karandeep Singh

    Thread Starter New Member

    Oct 30, 2007
    6
    0
    Iam Using Pic For The First Time ...........iam Using Mplab C18 Setup By Microchip .my Problem Is That When I Right Click On Source File And Add File Named Main.c In Source File It Gets Added In 'other Files'.then I Change The Filter From*asm To .c Then However File Got Added In Source File But On Building It Gives Message "no Tool For This suffix"



    If Any Body Understand What Iam Trying To Say Please Give Me Reply........may Be Iam Not Posting In Right Way But ....plz Reply Just Tell Me How To Add New File

    Karan
    New Member
     
  2. Hurdy

    Senior Member

    Feb 27, 2006
    137
    0
    I use C18 and don't find this problem.
    Do you create a project and instruct it to use C18 C compiler in the initial step through setup? I'm not at my PC that has C18 installed on it as I am away from home so I can't tell you exactly what it says for the options. But when you keep clicking NEXT through the project setup you will come across some sort of list to chose what method you want to use, or something of the sort anyway. Read the setup guide book of C18 and see what it says to do.

    I only suggest this as your error says 'no tool for this suffix'. Maybe you're trying to build a .C file but you haven't properly told MPLAB IDE you want to use C18 in the project setup. Just a thought anyway.

    I'm sorry I can't be more specific. I don't have my stuff infront of me to give you exact details.
     
  3. Hurdy

    Senior Member

    Feb 27, 2006
    137
    0
  4. Karandeep Singh

    Thread Starter New Member

    Oct 30, 2007
    6
    0
    thank you hurdy .you really are helpful
    but i hve gone thru all the steps in project wizard and also i checked the tool location and aim still unable to rectify the problem .
    the exact message now coming while building the file is
    now the exact message iam getting is
    "Could not spawn langauge tool. Check command-line options. (193)
    A language-plugin exception occurred and was logged."
    try and help me out
    iam so confused

    karandeep singh
     
  5. Karandeep Singh

    Thread Starter New Member

    Oct 30, 2007
    6
    0
    thank you hurdy .you really are helpful
    but i hve gone thru all the steps in project wizard and also i checked the tool location and aim still unable to rectify the problem .
    the exact message now coming while building the file is
    now the exact message iam getting is
    "Could not spawn langauge tool. Check command-line options. (193)
    A language-plugin exception occurred and was logged."
    try and help me out
    iam so confused

    karandeep singh
    Edit/Delete Message
     
  6. Hurdy

    Senior Member

    Feb 27, 2006
    137
    0
    mate send me a copy of your code would you please. Let me just check line 193.

    send it to hurdystuff@hotmail.co.uk

    There may just be something wrong in your code, i don't know. Worth a look anyway.
     
  7. Karandeep Singh

    Thread Starter New Member

    Oct 30, 2007
    6
    0
    iam running a simple program abd getting this error(following ..)i have added a linker file and header file but ths problem remains and dsecondly i have sorted out everything fron build option and set project tools..


    Clean: Deleting intermediary and output files.
    Clean: Done.
    Executing: "C:\MCC18\bin\MCC18.exe" -p=18F4520 /i"c:\MCC18\H" "C:\MCC18\src\impo.c" -fo="impo.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
    C:\MCC18\src\impo.c:1:Error [1027] unable to locate 'p18cxxx.h'
    Halting build on first failure as requested.
    BUILD FAILED: Mon Apr 03 00:18:32 2006
     
  8. Hurdy

    Senior Member

    Feb 27, 2006
    137
    0
    oh I remember I used to get errors like that too. It was something to do with the memory size. Just some simple sertting needs changing. You'll have to look it up in one of the bookelts they give u for C18. I don't have mine to hand at the mo but when I get them I'll look the page number up for u. it may help.
     
  9. ninopereira

    New Member

    Nov 27, 2007
    1
    0
    Hello. Did you solve your problem about the microchip compiler error?
    I'm having the same sympthoms as you did:
    "Could not spawn langauge tool. Check command-line options. (193)"
    and I can't figure how to solve it.
    If you could give some help I would really be apprecited.
    Thank you.
    Nino
     
  10. Nonsoezeoke

    New Member

    Apr 4, 2008
    2
    0
    hello i'm having the same issue saying, "Executing: "C:\MCC18\bin\mcc18.exe" -p=18F452 "USART2.c" -fo="USART2.o"
    Could not spawn langauge tool. Check command-line options. (5)"

    Could anyone please help me out?

    I'm still searching for a solution and if i do find i'll also let everyone know.

    Thank you
    Non
     
  11. Nonsoezeoke

    New Member

    Apr 4, 2008
    2
    0
    1) I went to projects->build options and changed the compiler optimisation settings to custom accept the options.

    2) Depending on target device use the linker file with 'i' attached. For instance rather than 18f452.lkr use the linker file 18f452i.lkr

    3) Lastly i modified the linker script (right click on it and use the edit option) to combine banks into a large protected DATABANK then assigned a SECTION to the new region.

    Regards

    Pss it would be great if solutions are posted soon as they are "discovered".
     
Loading...