Replies: 1 comment 4 replies
-
How did you build your driver? I'm curious how different it is from the ssd1306 driver. When I bring up a new display driver, I always start with Poco rather than Piu. It is a much simpler runtime to debug. Once that works, that I test with Piu. $MODDABLE/examples/commodetto/origin is a trivial place to start. You can print a JavaScript stack from C using XS in C. As you know, the XS implements the implements the proposed |
Beta Was this translation helpful? Give feedback.
-
I'm trying to add this OLED display driver: it's a 256x64, 16 level color OLED SPI display, very similar to ssd1306, just larger and supports gray level.
I write the test code like this(copied from the countdown demo), it runs well on ESP32-S3 + another ili9341 RGB SPI display.
to bring up sh1122, I added a driver (similar to ssd1306) with .js/.c/manifest.json files
the JS file looks like this:
on the C side, I got function xs_SH1122 working and successfully initialized the display.
But the PIU engine does not sending drawing command to SH1122 driver (like begin(), send(), end(), continue() )
It does ask for width and height (and I returned the correct non-zero value, otherwise the onDraw() function does not get called.
I got deeply stuck here... It must be some configuration error here... I'm trying to trace back the calling tree to figure out with branch makes it not sending any data to the driver.... but I found it's really hard to navigate through the code base, mostly because frequent jumps between native and JS code.
So my questions are:
Is there some good way to trace the callstack across JS and C? let's say I switch to the ili9341 display and print the stack trace from C code, all I got was an interop call from xsHost. (I know it's hard, like tracing async callstack is hard...)
Any function or file I can put a bunch of printf or trace to debug my issue?
Beta Was this translation helpful? Give feedback.
All reactions