'No rule to make Target' PIC 16xx on MPLAB X v3.00

Discussion in 'Embedded Systems and Microcontrollers' started by Jswale, Jul 2, 2015.

  1. Jswale

    Thread Starter Member

    Jun 30, 2015
    121
    6
    Hello Everyone,

    I have just downloaded MPLAB v3.00 and opened a new project named 'Test'. I followed the wizard to make a empty project, made a Source file 'new.c' and entered some trivial code.

    I get the 'no rule to target' error without entering any code really or changing any configuration from the default. The toolchain is all fine with green dots too.

    Any help would be appreciated.

    Cheers
    Jswale
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Did you also download and install a C compiler?

    MPLAB only comes with an assembler. You have to obtain and install anything else separately.
     
  3. Jswale

    Thread Starter Member

    Jun 30, 2015
    121
    6
    Yes, I downloaded and was using the XC8 compiler off the Microchip website
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Did you add the new file to the project? I remember this didn't happen automatically and would cause problems.

    Also, does your code have a main() function?
     
  5. Jswale

    Thread Starter Member

    Jun 30, 2015
    121
    6
    Thanks for the replies.

    I added an empty file to the source code and named it 'new.c'.

    The code I used was:

    main ()
    {
    while (1);
    }
     
  6. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It's very likely that will simply be optimized away by the compiler, being that nothing happens in it.
    ... And you must explicitly add this to the project...
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    The easiest way to get a source code file into your project is thru the save window: there is a box to check to add to your project.
     
  8. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,910
    2,172
    If you really have X3.00 (contains serious bugs) please download X3.05
     
Loading...