Hi!

I'm trying to use SDCC compiler to build firmware for Microchip
micro-controllers. I'm currently using PIC 18F4550.
I'm using piklab IDE to compile C source code and to program the chip
using ICD2 hardware.
I made a simply (and sample code) to test the SDCC compiler integration
in Piklab IDE software, I'm working in Linux environment (Ubuntu);
although the hex file is created resulting from compilation, when I
program the chip nothing happens - the PIC 18F4550 does nothing!

The C code is:

/******************************************************************/
/*
*/
/* C code for PIC18F4550 that configures PORTA pins as outputs and
*/
/* puts high level on them
*/
/******************************************************************/

#include <pic18f4550.h>
#include <signal.h>
#include <pic18fregs.h>
#include <stdio.h>
#include "PIC18test.h"

code char at __CONFIG1H CONFIG1H = 0x01;
// _OSC_XT_1H & _FCMEN_OFF_1H & _IESO_OFF_1H;

void main(void) 
{
        // make all pins of port A as outputs
        TRISA = 0;
        // Configure LCD_PORT if in use
        TRISB = 0;
        // Configure LCD control pins
        TRISD = 0xF7;
        
        // Put all PORTA outputs to high
        PORTA = 0xff;

}


There's anything wrong in compilation? Can anyone help me?

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to