Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'PORT_t' does not name a type #275

Closed
MikeMitterer opened this issue Jul 29, 2016 · 13 comments
Closed

error: 'PORT_t' does not name a type #275

MikeMitterer opened this issue Jul 29, 2016 · 13 comments

Comments

@MikeMitterer
Copy link

Updated with platformio to 973533d and now I get the above error...

@MikeMitterer
Copy link
Author

Sorry - forgot to post my PIO-Settings:

[env:pro16MHzatmega328]
platform = atmelavr
framework = arduino
board = pro16MHzatmega328

After downgrading to the prev version, the one with arch-folder instead of utilities-folder, it finds it definitions again.

@Avamander
Copy link
Member

To find out what the issue is you need to post more than that line of the error message.

@ghost
Copy link

ghost commented Aug 12, 2016

I can't be sure it's the same cause as they see, but this is with 973533d as well

 ~/w/l/s/arduino_target  platformio run                                                                   2057ms  2016-08-11 23:43:18
[Thu Aug 11 23:43:37 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------
avr-g++ -o .pioenvs/uno/src/main.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility -Isrc src/main.cpp
avr-g++ -o .pioenvs/uno/RF24_ID433/RF24.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/RF24.cpp
avr-gcc -o .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.o -c -std=gnu11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c
avr-g++ -o .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp
avr-gcc -o .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.o -c -std=gnu11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c
In file included from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.h:20:0,
from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:9:
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.h:83:1: error: 'PORT_t' does not name a type
PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In static member function 'static void GPIO::open(int, int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:15:2: error: 'PORT_t' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:15:11: error: 'p' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:15:37: error: 'GPIO_getPort' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In function 'int read(int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:33:2: error: 'PORT_t' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:33:11: error: 'p' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:33:37: error: 'GPIO_getPort' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In static member function 'static void GPIO::write(int, int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:40:2: error: 'PORT_t' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:40:11: error: 'p' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:40:37: error: 'GPIO_getPort' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In function 'int read(int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
scons: *** [.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.o] Error 1
In file included from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:8:0:
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.h:83:1: error: unknown type name 'PORT_t'
PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:13:1: error: unknown type name 'PORT_t'
PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm)
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c: In function 'GPIO_getPort':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:16:2: error: unknown type name 'PORT_t'
PORT_t * port = &PORTC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:16:18: warning: initialization from incompatible pointer type [enabled by default]
PORT_t * port = &PORTC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:19:11: error: 'PORTA' undeclared (first use in this function)
port = &PORTA;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:19:11: note: each undeclared identifier is reported only once for each function it appears in
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:23:8: warning: assignment from incompatible pointer type [enabled by default]
port = &PORTB;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:27:8: warning: assignment from incompatible pointer type [enabled by default]
port = &PORTC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:31:8: warning: assignment from incompatible pointer type [enabled by default]
port = &PORTD;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:35:11: error: 'PORTE' undeclared (first use in this function)
port = &PORTE;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:39:11: error: 'PORTF' undeclared (first use in this function)
port = &PORTF;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c: In function '__start_timer':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:37:2: error: 'TCE0' undeclared (first use in this function)
TCE0.CTRLA = TC_CLKSEL_DIV256_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:37:2: note: each undeclared identifier is reported only once for each function it appears in
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:37:15: error: 'TC_CLKSEL_DIV256_gc' undeclared (first use in this function)
TCE0.CTRLA = TC_CLKSEL_DIV256_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:40:15: error: 'TC_WGMODE_NORMAL_gc' undeclared (first use in this function)
TCE0.CTRLB = TC_WGMODE_NORMAL_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:47:18: error: 'TC_OVFINTLVL_HI_gc' undeclared (first use in this function)
TCE0.INTCTRLA = TC_OVFINTLVL_HI_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:2: error: 'PMIC' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:14: error: 'PMIC_LOLVLEN_bm' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:32: error: 'PMIC_MEDLVLEN_bm' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:51: error: 'PMIC_HILVLEN_bm' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
scons: *** [.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.o] Error 1
scons: *** [.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.o] Error 1
===================================================== [ ERROR ] Took 0.76 seconds ====================================================

@Avamander
Copy link
Member

What boards are you using? Maybe you need to fix the board file to actually use proper includes.

@ghost
Copy link

ghost commented Aug 12, 2016

It's an uno. It compiled successfully with a previously version published on platformio.

@Avamander
Copy link
Member

I'll release a new version, update, if the issue persist let me know.

@ghost
Copy link

ghost commented Aug 12, 2016

I'm not too familiar with how platformio handles versioning. Do you have to tell it about the new version?

$ platformio update
Platform atmelavr
--------
Updating [ 433 ] RF24 library:
Versions: Current=973533d799, Latest=973533d799      [Up-to-date]

@Avamander
Copy link
Member

Avamander commented Aug 12, 2016

It will take a few hours I suspect. (I found no data about how to tell platformio about an update manually)

@ghost
Copy link

ghost commented Aug 13, 2016

same issue. a duo isn't an ATXMega256D3 (right?), so should these files even be included?

@ghost
Copy link

ghost commented Aug 13, 2016

ah, i missed the code in RF24_config.h.

@ghost
Copy link

ghost commented Aug 13, 2016

I think I only saw the same issue to to cached dependencies or something. I cleared that out. Now there's a new, but similar one

platformio run
[Fri Aug 12 22:50:35 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------
avr-gcc -o .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.o -c -std=gnu11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c
avr-g++ -o .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c: In function '__start_timer':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:37:2: error: 'TCE0' undeclared (first use in this function)
TCE0.CTRLA = TC_CLKSEL_DIV256_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:37:2: note: each undeclared identifier is reported only once for each function it appears in
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:37:15: error: 'TC_CLKSEL_DIV256_gc' undeclared (first use in this function)
TCE0.CTRLA = TC_CLKSEL_DIV256_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:40:15: error: 'TC_WGMODE_NORMAL_gc' undeclared (first use in this function)
TCE0.CTRLB = TC_WGMODE_NORMAL_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:47:18: error: 'TC_OVFINTLVL_HI_gc' undeclared (first use in this function)
TCE0.INTCTRLA = TC_OVFINTLVL_HI_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:2: error: 'PMIC' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:14: error: 'PMIC_LOLVLEN_bm' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:32: error: 'PMIC_MEDLVLEN_bm' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.c:50:51: error: 'PMIC_HILVLEN_bm' undeclared (first use in this function)
PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
^
avr-gcc -o .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.o -c -std=gnu11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c
In file included from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.h:20:0,
from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:9:
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.h:83:1: error: 'PORT_t' does not name a type
PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In static member function 'static void GPIO::open(int, int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:15:2: error: 'PORT_t' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:15:11: error: 'p' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:15:37: error: 'GPIO_getPort' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In function 'int read(int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:33:2: error: 'PORT_t' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:33:11: error: 'p' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:33:37: error: 'GPIO_getPort' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In static member function 'static void GPIO::write(int, int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:40:2: error: 'PORT_t' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:40:11: error: 'p' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:40:37: error: 'GPIO_getPort' was not declared in this scope
PORT_t * p = GPIO_getPort(port,&pin);
^
scons: *** [.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/compatibility.o] Error 1
In file included from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:8:0:
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.h:83:1: error: unknown type name 'PORT_t'
PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm);
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:13:1: error: unknown type name 'PORT_t'
PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm)
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c: In function 'GPIO_getPort':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:16:2: error: unknown type name 'PORT_t'
PORT_t * port = &PORTC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:16:18: warning: initialization from incompatible pointer type [enabled by default]
PORT_t * port = &PORTC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:19:11: error: 'PORTA' undeclared (first use in this function)
port = &PORTA;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:19:11: note: each undeclared identifier is reported only once for each function it appears in
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:23:8: warning: assignment from incompatible pointer type [enabled by default]
port = &PORTB;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:27:8: warning: assignment from incompatible pointer type [enabled by default]
port = &PORTC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:31:8: warning: assignment from incompatible pointer type [enabled by default]
port = &PORTD;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:35:11: error: 'PORTE' undeclared (first use in this function)
avr-g++ -o .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.o -c -fno-exceptions -fno-threadsafe-statics -std=gnu++11 -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DPLATFORMIO=021102 -DARDUINO_ARCH_AVR -DARDUINO_AVR_UNO -DARDUINO=10608 -I.pioenvs/uno/FrameworkArduino -I.pioenvs/uno/FrameworkArduinoVariant -I.pioenvs/uno/SPI -I.pioenvs/uno/RF24_ID433 -I.pioenvs/uno/RF24_ID433/utility .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp
port = &PORTE;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.c:39:11: error: 'PORTF' undeclared (first use in this function)
port = &PORTF;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp: In function 'int read(int)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
scons: *** [.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.o] Error 1
scons: *** [.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio.o] Error 1
In file included from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:9:0:
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/gpio_helper.h:83:1: error: 'PORT_t' does not name a type
PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm);
^
In file included from .pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:10:0:
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.h:81:2: error: 'SPI_t' does not name a type
SPI_t * device;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.h:83:2: error: 'PORT_t' does not name a type
PORT_t * port;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp: In member function 'void SPI::begin(uint8_t)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:18:3: error: 'device' was not declared in this scope
device = &SPIC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:18:13: error: 'SPIC' was not declared in this scope
device = &SPIC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:19:3: error: 'port' was not declared in this scope
port = &PORTC;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:22:3: error: 'device' was not declared in this scope
device = &SPID;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:22:13: error: 'SPID' was not declared in this scope
device = &SPID;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:23:3: error: 'port' was not declared in this scope
port = &PORTD;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp: In member function 'uint8_t SPI::transfer(uint8_t)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:31:2: error: 'register8_t' was not declared in this scope
register8_t data;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:31:14: error: expected ';' before 'data'
register8_t data;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:32:2: error: 'device' was not declared in this scope
device->DATA = tx_;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:34:2: error: 'data' was not declared in this scope
data = device->DATA;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp: In member function 'void SPI::init()':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:41:2: error: 'port' was not declared in this scope
port->DIRCLR = SPI_MISO_bm;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:45:2: error: 'device' was not declared in this scope
device->CTRL = SPI_ENABLE_bm | SPI_MASTER_bm | SPI_MODE_0_gc | SPI_PRESCALER_DIV4_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:45:17: error: 'SPI_ENABLE_bm' was not declared in this scope
device->CTRL = SPI_ENABLE_bm | SPI_MASTER_bm | SPI_MODE_0_gc | SPI_PRESCALER_DIV4_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:45:33: error: 'SPI_MASTER_bm' was not declared in this scope
device->CTRL = SPI_ENABLE_bm | SPI_MASTER_bm | SPI_MODE_0_gc | SPI_PRESCALER_DIV4_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:45:49: error: 'SPI_MODE_0_gc' was not declared in this scope
device->CTRL = SPI_ENABLE_bm | SPI_MASTER_bm | SPI_MODE_0_gc | SPI_PRESCALER_DIV4_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:45:65: error: 'SPI_PRESCALER_DIV4_gc' was not declared in this scope
device->CTRL = SPI_ENABLE_bm | SPI_MASTER_bm | SPI_MODE_0_gc | SPI_PRESCALER_DIV4_gc;
^
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp: In member function 'uint8_t SPI::transfer(uint8_t)':
.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.cpp:37:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
scons: *** [.pioenvs/uno/RF24_ID433/utility/ATXMegaD3/spi.o] Error 1
===================================================== [ ERROR ] Took 0.48 seconds =====================================================

@Avamander
Copy link
Member

Avamander commented Aug 13, 2016

Somehow, your compiler is including files it should not. That happens when one of these is defined

#if defined(__AVR_ATxmega64D3__) || defined(__AVR_ATxmega128D3__) || defined(__AVR_ATxmega192D3__) || defined(__AVR_ATxmega256D3__) || defined(__AVR_ATxmega384D3__) // In order to be available both in windows and linux this should take presence here.
      #include "utility/ATXMegaD3/RF24_arch_config.h"

This is an issue with platformio or your install, not RF24.

@ghost
Copy link

ghost commented Aug 14, 2016

I filed a bug with platformio linking to this bug. You can probably close it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants