Closed GoogleCodeExporter closed 9 years ago
I only have an Arduino Mega available for those kind of tests. Best starting
point would be to have an Arduino .ino file avilable, which demonstrates the
problem.
From your examples above, i think only
#define u8g_pgm_read(adr) pgm_read_byte_far(adr)
is usefull
Original comment by olikr...@gmail.com
on 27 Sep 2013 at 2:08
Why .ino file? What is in there? I believe it is irrelevant, because it is same
architecture, and problem is probably in the library code (authors didn't
expected so big program code).
Yes, #define u8g_pgm_read(adr) pgm_read_byte_far(adr) is for 32bit flash memory
access, but still the same result. I was looking for "adr" definition, but
found nothing...
Original comment by radim.l...@gmail.com
on 27 Sep 2013 at 2:49
Well, I finally discover the problem. The pgmspace is able to allocate only
32kB of flash (because it uses 16 bit signed integer).
I tried to put in code empty array, experimenting with size of it, and
threshold flash allocated size (all fonts + empty array) is 32kB.
Original comment by radim.l...@gmail.com
on 27 Sep 2013 at 6:25
.ino is the Arduino .c file
I did some googleing and reading...
The problem seems to be, that pointers are limited to 16 bit. However for areas
beyond 64K we would need 24 or 32 bit pointers.
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=34344&start=0&
postdays=0&postorder=asc&highlight=
What i understood is this: If your constant data (fonts and other progmem data)
do not exceed 32K then everything is fine. That means you can use the rest of
the flash area for normal procedures.
Original comment by olikr...@gmail.com
on 27 Sep 2013 at 6:53
closing this issue, this will require to much of change to the lib.
Original comment by olikr...@gmail.com
on 3 Oct 2013 at 6:40
Original issue reported on code.google.com by
radim.l...@gmail.com
on 27 Sep 2013 at 12:54