platformio / platformio/platform-raspberrypi
printf not working with RP2040
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 94
- Forks
- 141
- PR merge metrics
- No merged PRs in 30d
Description
Hi
I have some example RP2040 code that works in the Ardunio IDE without fail. When ported to Platform IO the code fails on the following:
Serial.printf("timers_init failed - %d\n", err_code);
src/main.cpp: In function 'void loop()':
src/main.cpp:22:10: error: 'class arduino::UART' has no member named 'printf'; did you mean 'print'?
22 | Serial.printf("timers_init failed - %d\n", err_code);
This works in the ardinio IDE.
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main.cpp at line 22 and reproduce the RP2040 PlatformIO build error involving Serial.printf. Compare the PlatformIO Arduino serial implementation with the Arduino IDE behavior; done should mean the reported example builds and the formatting call works, or the supported alternative is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100