|
Hi
It is in code programming practice in order to sys_read_VP or sys_write_VP to use #define directive.
so , we put in a file, no matter if .c or .h ( is preferrable a dedicated name file) #define directive
Let us suppose we have a Animated Icons display variable and a Text display variable.
The natural directive which bind VP to a name is
#define TEXT_TO_DISPLAY 0x1000
#define ANIMATED_ICONS_VP 0x1010
When code is executed , in instruction
sys_read_VP(TEXT_TO_DISPLAY, ...);
the substitution happened and the read action take place.
On the other side , if examine the memory map , in 14.bin file the VP value as was defined (offset 0x4 from base address 0x4000) point to an address in 22.bin (multiplyed by 2) where data resides.
In my intention is to read in a table the content of 14.bin which has start address at 0x4000 for keep a table with display variable dataand access them from coresponded address.
How can be this achieved (through program).How flash 14.bin address can be identified( is a multiple of 128 KByte - the 11 th position 128 x 11 = 000f:ffff ?)
|
|