first sdcc compile fails, no 12f509.h found

  • William

    William - 2011-08-18

    Hi group,
    Just starting with sdcc and PICs. My first program will not compile.
    sdcc -I /usr/share/sdcc/include bc_l1-flash_led-ccs.c
    bc_l1-flash_led-ccs.c:34:20: error: 12F509.h: No such file or directory
    bc_l1-flash_led-ccs.c:42:2: error: invalid preprocessing directive #use
    bc_l1-flash_led-ccs.c:45:2: error: invalid preprocessing directive #fuses
    bc_l1-flash_led-ccs.c:54: warning 112: function 'output_b' implicit declaration
    bc_l1-flash_led-ccs.c:56: warning 112: function 'delay_ms' implicit declaration
    bc_l1-flash_led-ccs.c:52: error 20: Undefined identifier 'TRUE'
    bc_l1-flash_led-ccs.c:54: error 101: too many parameters
    bc_l1-flash_led-ccs.c:56: error 101: too many parameters

    the source:

    #include <12f509.h>
    #define GP0 PIN_B0              // define GP pins
    #define GP1 PIN_B1
    #define GP2 PIN_B2
    #define GP3 PIN_B3
    #define GP4 PIN_B4
    #define GP5 PIN_B5

    // Config: int reset, no code protect, no watchdog, 4MHz int clock

    void main()
        while (TRUE) {
            // set GP1 if GP3 is low (button pressed), else clear GP1
            output_b(input(GP3) ? 0 : 0b000010);
        }   // repeat forever

    don't know why it is looking for '12F509.h"? source says "12f509.h".

    any ideas?

  • William

    William - 2011-08-18

    never mind, I found it.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks