Skip to content

Arduino Serial and SD libraries not available #17

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

Closed
feilipu opened this issue Jan 14, 2021 · 6 comments
Closed

Arduino Serial and SD libraries not available #17

feilipu opened this issue Jan 14, 2021 · 6 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@feilipu
Copy link

feilipu commented Jan 14, 2021

https://github.com/feilipu/Arduino_FreeRTOS_Library/runs/1699847183?check_suite_focus=true#step:4:114
https://github.com/feilipu/Arduino_FreeRTOS_Library/runs/1699847183?check_suite_focus=true#step:4:337

Neither the Serial.h or SD.h libraries are available so basic tests fail.

Perhaps it would be better to provide an option to disable all examples testing? That would allow the library build to pass, in the face of missing inclusions?

@ianfixes
Copy link
Contributor

In this case, the conclusions of the CI are correct; although your library.properties specifies architectures=avr, the trinket does not implement a serial port. Your example code does not account for this.

Your options here would be to use preprocessor directives that enable SoftwareSerial when hardware serial support is not available, or specifically configure arduino_ci not to attempt compilation on those platforms by using these .arduino_ci.yml contents:

compile:
  platforms:
    - uno
    - leonardo
    - mega2560
    - cplayClassic

This could go either in the root directory of your library (if it applies to all examples) or individually in the examples that need it.

@feilipu
Copy link
Author

feilipu commented Jan 17, 2021

Ok, I've spent more than an hour trying to get this right, and (since TBH I've got no idea about what I'm doing) I'm never going to get this right.

If you could please provide a PR that completes the CI process based on what you (as a human) can see that I'm trying to do, I'd be thankful. The examples need to run through the basic serial equipped AVR board, uno, mega2560. NOT trinket and gemma. The "GoldilocksAnalogueTestSuite.ino" is for just one platform, with the json and library dependencies noted in the directory.

Otherwise, I'm at a stage to just abandon.

@ianfixes ianfixes added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 18, 2021
@ianfixes
Copy link
Contributor

What I'm really hearing is that my documentation and error messaging is in very poor shape, not to mention my previous comment. I'll open a PR, because this is a quick fix (I think?). I'm really sorry that the documentation was lacking to the point where you felt your time was wasted. I would be grateful for any & all criticisms you can give of it.

@ianfixes
Copy link
Contributor

Opened #18 which wasn't specifically related to this issue

@feilipu
Copy link
Author

feilipu commented Jan 18, 2021

Fixed in PR and follow up comments.

The major issue was the inconsistent use of hyphen and underscore in the configuration file names (or probably not reading closely enough). .arduino-ci.yml and arduino_ci.yml tends to focus attention on the . rather than the other difference.

Also, not allowing a configuration file in the ~/examples/ directory, but allowing a file in the ~/tests/directory is inconsistent. That cost 10 minutes of things not working and then going back to read through closely.

@ianfixes
Copy link
Contributor

not allowing a configuration file in the ~/examples/ directory

I think this is doable, opening Arduino-CI/arduino_ci#272

.arduino-ci.yml and arduino_ci.yml tends to focus attention on the . rather than the other difference.

I think I should be logging info lines with the config files detected, so at least there is some indication of what the CI runner is responding to. Arduino-CI/arduino_ci#273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants