Question
How to Store Font Table in Flash with GCC?
Posted on July 16, 2012 at 18:26
I have a large 5x7 pixel font table that I want to store in flash memory instead of RAM memory. I am using Eclipse with the ARM GCC plugin.
I am hoping there is something similar to avr/pgmspace.h but obviously for STM32, or ARM Cortex in general.How do I store the table in flash memory without having it reside in RAM at all?To get started, I declared it like sostatic unsigned char oled_font[] __attribute__ ((section(''.text''),used)) = {...};but now the challenge is, how do I access this table? do I just access it ''normally'' or do I need some specific flash reading functions? is ''__LDREXB'' what I am looking for? #flash