Hello,

I wrote this code:

#include <pic16f877.h>
#define SET(reg,bit) (reg) |= (1<<(bit))
#define CLR(reg,bit) (reg) &= ~(1<<(bit))

#define LED1 PORTA,0
#define LED2 PORTA,2

void main() {
SET(LED1);
}

And i got this error:

sdcc -mpic14 -p16f877a -V --debug
-I/home/hlopes/Projetos/rtt.inc/mcfil/display_c/sdcc/ -c display.c
display.c:9: 9: error: macro "SET" requires 2 arguments, but only 1 given
display.c:10: 2: warning: no newline at end of file
display.c:9: error 20: Undefined identifier 'SET'
+ "/usr/local/bin/sdcpp" -nostdinc -Wall -std=c99
-I"/home/hlopes/Projetos/rtt.inc/mcfil/display_c/sdcc/" -obj-ext=.o
-DSDCC_MODEL_SMALL -DSDCC=274 -DSDCC_pic14 -D__pic14
-DSDCC_PROCESSOR="16f877a" -I"/usr/local/bin/../share/sdcc/include/pic14"
-I"/usr/local/share/sdcc/include/pic14"
-I"/usr/local/bin/../share/sdcc/include" -I"/usr/local/share/sdcc/include"
-I"/usr/local/bin/../share/sdcc/include/pic"
-I"/usr/local/share/sdcc/include/pic"  "display.c"
*** Exited with status: 1 ***


I'm using SDCC 2.7.4. Can anybody help me?

Thanks, Helvecio
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to