IOPORT8 Compilation Error
Posted: Sat Feb 14, 2015 8:49 am
Hi,
I am using the PAL driver on an Arduino AVR ATMEGA2560. For some reason when I use:
palClearPad(IOPORT2, 2);
everything compiles (and works) OK, but when I use:
palClearPad(IOPORT8, 6);
then I get the following compilation error:
avr-gcc -c -mmcu=atmega2560 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -O2 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -fno-exceptions -Wall -Wa,-adhlns=./main.lst -Iport -Ikernel/include -Ihal/include -Iplatform -Iboard -I/os/various -MMD -MP -MF .dep/main.o.d main.cpp -o main.o
main.cpp: In function 'int main()':
main.cpp:221:28: warning: asm operand 0 probably doesn't match constraints [enabled by default]
palClearPad(IOPORT8, 6);
^
main.cpp:221:28: error: impossible constraint in 'asm'
I was wondering if I am doing something wrong? I am trying to communicate with a digital output on PINH.
Thanks a lot for your help,
-- Alex
I am using the PAL driver on an Arduino AVR ATMEGA2560. For some reason when I use:
palClearPad(IOPORT2, 2);
everything compiles (and works) OK, but when I use:
palClearPad(IOPORT8, 6);
then I get the following compilation error:
avr-gcc -c -mmcu=atmega2560 -I. -x c++ -gdwarf-2 -DF_CPU=16000000UL -O2 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -fno-exceptions -Wall -Wa,-adhlns=./main.lst -Iport -Ikernel/include -Ihal/include -Iplatform -Iboard -I/os/various -MMD -MP -MF .dep/main.o.d main.cpp -o main.o
main.cpp: In function 'int main()':
main.cpp:221:28: warning: asm operand 0 probably doesn't match constraints [enabled by default]
palClearPad(IOPORT8, 6);
^
main.cpp:221:28: error: impossible constraint in 'asm'
I was wondering if I am doing something wrong? I am trying to communicate with a digital output on PINH.
Thanks a lot for your help,
-- Alex