This topic refers to issue #3900 of platformio-core repository. I try to upload a library “fortuneteller” for SD card management, available here: GitHub - stoire/fortune-teller: A PlatformIO package to handle SD content and files . The examples do not run. My suspicion of error refers to some syntax or logic mistake, but I need some peer review for this conundrum. The setup files are as recommended by the platform.
opened 06:13PM - 24 Mar 21 UTC
closed 01:24PM - 25 Mar 21 UTC
help wanted
### Configuration
Linux
PlatformIO Core 5.1.1
### Description of problem
…
Hi,
I try to upload two libraries without success. They call "Einstein" and "FortuneTeller". The former provides a user-friendly time string from millis() command. The latter formats and manages SD cards content. I setup both with recommended config files. However, both fail to reproduce minimal examples I created. I utilize a Arduino UNO board, easy to use at home. The github URL are respectively below:
https://github.com/brunolnetto/einstein
https://github.com/brunolnetto/fortuneteller
#### Steps to Reproduce
1. Download VS Code;
2. Install PlatformIO
3. Go to Libraries section and install both libraries
4. Build and run the examples
### Actual Results
```
/tmp/ccLUQqK2.ltrans0.ltrans.o: In function `main':
<artificial>:(.text.startup+0x86): undefined reference to `setup'
<artificial>:(.text.startup+0x8e): undefined reference to `loop'
collect2: error: ld returned 1 exit status
*** [.pio/build/uno/firmware.elf] Error 1
```
### Expected Results
No failed result.
Serial monitor with time string printed.
### If problems with PlatformIO Build System:
[env:uno]
platform = atmelavr
board = uno
framework = arduino
lib_deps = painlessmesh/arduinoUnity@^0.0.2
**Source file to reproduce issue:**
```
#include <Arduino.h>
#include <converters/fundamental.h>
long int TIME_SPAN = 1000;
long int BAUD_RATE = 9600;
void setup(){
Serial.begin(BAUD_RATE);
}
void loop() {
Serial.println(now());
delay(TIME_SPAN);
}
```
I thank you sincerely for the help.
I don’t have these problems.
Testing with
[env:uno]
platform = atmelavr
board = uno
framework = arduino
lib_deps =
painlessmesh/arduinoUnity@^0.0.2
https://github.com/brunolnetto/einstein.git
https://github.com/brunolnetto/fortuneteller.git
arduino-libraries/SD @ ^1.2.4
SPI
and src\main.cpp
#include <Arduino.h>
#include <converters/fundamental.h>
long int TIME_SPAN = 1000;
long int BAUD_RATE = 9600;
void setup(){
Serial.begin(BAUD_RATE);
}
void loop() {
Serial.println(now());
delay(TIME_SPAN);
}
Checking size .pio\build\uno\firmware.elf
Building .pio\build\uno\firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 9.8% (used 200 bytes from 2048 bytes)
Flash: [= ] 13.2% (used 4258 bytes from 32256 bytes)
=================== [SUCCESS] Took 2.70 seconds ===================
I wonder if the examples may be on src folder. I will try and come back with a response.
It worked with your platformio.ini. It does not work with the following library dependencies setup, although naively similar:
lib_deps =
brunolnetto/Einstein@^1.2.0
brunolnetto/FortuneTeller@^1.0.1
arduino-libraries/SD @ ^1.2.4
painlessmesh/arduinoUnity@^0.0.2
SPI
If I use that library version description I get the version with the missing ;
and it won’t work.
String now(bool = false)
hence I why I used a git reference https://github.com/brunolnetto/einstein.git
.