Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

can't compile with platformio. #11

Closed
laxtiz opened this issue May 6, 2022 · 6 comments
Closed

can't compile with platformio. #11

laxtiz opened this issue May 6, 2022 · 6 comments
Assignees
Labels
Seeed_Arduino_Linechart Label for Seeed_Arduino_Linechart UAY Unassigned yet

Comments

@laxtiz
Copy link

laxtiz commented May 6, 2022

Describe the bug
我不太懂C++,我只想了解这是什么问题。
i don't know more with c++. i can't compile with this library.

To Reproduce
Steps to reproduce the behavior:
code with PlatformIO IDE, but compile faild when linechart library installed.

Expected behavior
A clear and concise description of what you expected to happen.
no more error.

Screenshots
If applicable, add screenshots to help explain your problem.

2022-05-06 13-55-17 的屏幕截图

Desktop (please complete the following information):

  • OS: Fedora Linux 35 x86_64
  • Version [e.g. 22]

Additional context
here is platform package version:

2022-05-06 14-11-13 的屏幕截图

here is my platformio config:

[env]
framework = arduino
monitor_filters = direct
monitor_speed = 115200

[env:seeed_wio_terminal]
platform = atmelsam
board = seeed_wio_terminal
build_flags = 
	; too more redefined macros warning. disable all.
	-w
lib_deps = 
	Wire
	SPI
	seeed-studio/Seeed Arduino FS@^2.1.1
	seeed-studio/Seeed Arduino SFUD@^2.0.2
	seeed-studio/Seeed_Arduino_mbedtls@^3.0.1
	seeed-studio/Seeed Arduino rpcUnified@^2.1.4
	seeed-studio/Seeed Arduino rpcWiFi@^1.0.5
	seeed-studio/Seeed Arduino rpcBLE@^1.0.0
	seeed-studio/Seeed Arduino IR@^1.0.2
	seeed-studio/Grove-3-Axis-Digital-Accelerometer-2g-to-16g-LIS3DHTR@^1.2.4
	; not in platformio registry, clone repo with git.
	https://github.com/Seeed-Studio/Seeed_Arduino_Linechart
	https://github.com/Seeed-Studio/Seeed_Arduino_Histogram
	seeed-studio/Seeed Arduino RTC@^2.0.0
@lakshanthad
Copy link

Hello,

Does it compile successfully when linechart library is not included?

@laxtiz
Copy link
Author

laxtiz commented May 17, 2022

yes, i can compile without linechart.
here you can see i added more library from seeed, but just compile failed with linechart

@lakshanthad
Copy link

Can you attach a complete log of the output to check for all the errors?

@laxtiz
Copy link
Author

laxtiz commented May 17, 2022

here is a demo repo, just only linechart library.

platformio config:

[env:seeed_wio_terminal]
platform = atmelsam
board = seeed_wio_terminal
framework = arduino
lib_deps = 
        ; internal library
	Wire
	SPI
	Seeed_Arduino_LCD
	; clone from github
	https://github.com/Seeed-Studio/Seeed_Arduino_Linechart
	; linechart need this
	adafruit/Adafruit Zero DMA Library@^1.1.0

here is log:
log.txt

@lakshanthad
Copy link

lakshanthad commented May 22, 2022

Hello,

According to your error messages, it seems that "-std=gnu++14" should be set according to ArduinoCore-samd:
https://github.com/Seeed-Studio/ArduinoCore-samd/blob/28c4ac5980a0393f7417c773c5d8fa4f5283b379/platform.txt#L42

From platformIO config, it seems that it is set to "-std=gnu++11" and it should be changed to "-std=gnu++14":
https://github.com/platformio/platform-atmelsam/blob/67f42c69ad65f4ddbf3abfcff130bc0c9965d41d/builder/frameworks/arduino/arduino-common.py#L66

Could you maybe locally change this "platform-atmelsam/builder/frameworks/arduino/arduino-common.py" file and have a try again?

Thank you

@lakshanthad
Copy link

lakshanthad commented Aug 9, 2022

Hello @laxtiz ,

I have tested linechart with platformio and it works. Please add the following to platformio.ini:

build_unflags = -std=gnu++11

build_flags = -std=gnu++14

@MatthewJeffson MatthewJeffson added UAY Unassigned yet Seeed_Arduino_Linechart Label for Seeed_Arduino_Linechart labels Oct 9, 2024
@Lesords Lesords self-assigned this Oct 14, 2024
@baorepo baorepo closed this as completed Oct 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Seeed_Arduino_Linechart Label for Seeed_Arduino_Linechart UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

5 participants