Hi,
the related memory isn't in the gDisplay-Structure, but the memory allocated by the driver. This memory is allocated in "gdisp_lld_init(GDisplay *g)":
// The private area is the display surface + flush window structure.
g->priv = gfxAlloc(sizeof(UC1610_Window) + GDISP_SCREEN_WIDTH * GDISP_SCREEN_HEIGHT / UC1610_PAGE_HEIGHT);
After that line, the first 4 Bytes of the memory pointed to by g->priv read as 0xA0001404 on my target.
This area seems to be used to store some coordinates. As far as I can see, the y-coordinates stored here are never written before flushing the display the first time. And this leads to an invalid pointer calculated in gdisp_lld_flush():
x1 = PRIV(g)->x1;
y1 = PRIV(g)->y1; // reads as "0xA000" which is far outside of the display area
....
// write each page segment from RAM(g) to display RAM
for (c = RAM(g) + xyaddr(x1, y1) ; y1 <= y2 ; c += GDISP_SCREEN_WIDTH, y1 += UC1610_PAGE_HEIGHT) {
write_data(g, c, cx); //exception is thrown in this function because "c" is invalid
}
Clearing the memory in g->priv solves the problem for me. Aside from this problem, the display is working now :-)