Altera_Forum
Honored Contributor
16 years agoHow to create and store data table in Flash
I want to create a few tables of data and store the tables and specific locations in off-chip Flash memory. The Linker would easily allow me to do this, but I am porting legacy code from long ago and it will be far easier for me if I can find a way to assign each table's starting address by doing so in my C code.
How can I do this? Example tables: char table_1[] = {0x11, 0x22, 0x33}; char table_2[] = {0xFF, 0xEE, 0xDD}; Now I want to assign the base address of table_1[] to 0x4B001000, and the base address of table_2[] to 0x4CD01000 (for example). I know that I can get the base address of foo by using "base = &foo[0]", but how can I do the opposite (explicitly assign the base address)?