-
Notifications
You must be signed in to change notification settings - Fork 20
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
compile issue on raspberry pi pico #35
Comments
This is the header definition: TM1637TinyDisplay/TM1637TinyDisplay.h Lines 26 to 35 in f13913e
Ah, this may be a bug. I don't know that I have a device that would really test that last else case (not AVR and not ESP). Here are some suggestions to try:
If either of these work, we can update the project to fix that. |
Hello Jason,
- Commenting out lines 32-34 in both .h files compiles successfully.
//#else//#define pgm_read_byte(addr) \// (*(const unsigned char *)(addr)) // workaround for non-AVR
- Your second suggestion looks like the code below starting at line 32:
#else#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) // workaround for non-AVR// (moved contents to line above and removed \)#endif
The compiler is unhappy with the expansion:
tm1637tinydisplay.cpp:29: In file included from tm1637tinydisplay.h: 33:32: error: expected unqualified-id before 'const 33 | #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) \\ workaround for non-AVR | ^~~~~pgmspace.h:116: note in expansion of macro pgm_read_byte 116 | static inline unsigned char pgm_read_byte(const void *addr) { | ^~~~~~~~~~~~~ tm1637tinydisplay.h: 33:32: error: expected ')' before 'const 33 | #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) \\ workaround for non-AVR | ~^~~~~pgmspace.h:116: note in expansion of macro pgm_read_byte 116 | static inline unsigned char pgm_read_byte(const void *addr) { | ^~~~~~~~
In a few days, I'll test with a tm1637 display on the pico and let you know. My functionality needs are only to display integers and float numbers. Occasionally a degree sign (little o shifted up).
Kind regards,Gavin Watson (goephs)
On Thursday, November 30, 2023 at 10:48:32 PM EST, Jason Cox ***@***.***> wrote:
This is the header definition:
https://github.com/jasonacox/TM1637TinyDisplay/blob/f13913e803ccfbe56f9ac924371738d19d66a597/TM1637TinyDisplay.h#L26-L35
Ah, this may be a bug. I don't know that I have a device that would really test that last else case (not AVR and not ESP). Here are some suggestions to try:
- Try to removing lines 32 to 34. The pgmspace.h you have seems to define pgm_read_byte().
- Line 33 is doing a \ to push the definition to the next line. That may not be supported. Try moving the contents of line 34 to line 33 (remove the \).
If either of these work, we can update the project to fix that.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thanks @goephs ! I suspect you just needed to remove that Let us know if it work on the device. |
Hello Jason,I tested the tm1637 display on the PICO with the #else condition removed and it worked perfectly with both your demo script and test script. I'm good to go now. Thank you for your help!
On Friday, December 1, 2023 at 10:42:03 PM EST, Jason Cox ***@***.***> wrote:
Thanks @goephs ! I suspect you just needed to remove that #else condition. The formatting in your email didn't come through very well but I think I get the gist.
Let us know if it work on the device.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks @goephs ! |
The text was updated successfully, but these errors were encountered: