platformio / platform-atmelsam

Atmel SAM: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelsam
Apache License 2.0
79 stars 107 forks source link

'RingBuffer' does not name a type #54

Closed targodan closed 5 years ago

targodan commented 5 years ago

I hope this is the correct repository for this (I'm new to platformIO).

When trying to compile for the Arduino Due I get the following error.

In file included from C:\Users\[user]\.platformio\packages\framework-arduinosam\cores\sam/Arduino.h:222:0,
from C:\Users\[user]\.platformio\packages\framework-arduinosam\variants\arduino_due_x/variant.h:36,

from C:\Users\[user]\.platformio\packages\framework-arduinosam\libraries\__cores__\sam\Wire\src/Wire.h:28,
from src\radiometerLoggerDue.cpp:1:
C:\Users\[user]\.platformio\packages\framework-arduinosam\cores\sam/USB/USBAPI.h:50:2: error: 'RingBuffer' does
 not name a type
RingBuffer *_cdc_rx_buffer;
^

I'm on Windows 10 64-bit. Here's the dependency graph of include files:

Dependency Graph
|-- <TinyGPSPlus> 1.0.0
|-- <RTClib> 1.2.0
|   |-- <Wire> 1.0

|-- <Wire> 1.0
|-- <SPI> 1.0
|-- <LiquidCrystal> 1.5.0
|   |-- <Wire> 1.0
|-- <SD>
|   |-- <SPI> 1.0
targodan commented 5 years ago

By now I found the correct repo: https://github.com/platformio/platformio-pkg-framework-arduinosam/blob/master/cores/sam/RingBuffer.h

Sorry for disturbing you here.

Also I solved the problem: Because the include statements are done as lazy as possible #include "RingBuffer.h" and I'm on windows (case insensitive file system) and I have a header file called ringbuffer.h in my project which did not include a type called RingBuffer the compiler included the wrong file and everything went down the drain. I renamed the file and it is now working.