Hello guys,
Sorryto interrupt, but I have a problem what is driving me nuts.
First of all, I have some programming background, but I am not a professional.
I learned C & C++ just by doing and informing myself. Not classes visited in college whatsoever.
So, I try to program a Atmel microcontroller using WINAVR libs and wxDevC++ (GCC compiler based).
In my coding, I have a function:
->As you can see, "const uint8_t picture[]" is a unsigned int array of variable size.Code:void partPicTransfer(volatile uint16_t startAddress, volatile uint8_t xSize, volatile uint16_t picSize, const uint8_t picture[]);
While I go through the code, at one point I use a for loop and try to use global varibles to modify the array name in that function in order to get the right array at a given point.
Example:
-> Array I try to access:-> Global variable:Code:const uint8_t GBNum1[] PROGMEM = {.....};-> Execution:Code:unsigned int thr = 0;Code:partPicTransfer(0x681, 4, 128, GBNum(thr));
"thr" is the value, which should increment the array name in the loop.
That way, I get of course linker problems, since GBNum is unknown.
So, how can I make the program to recognize my operation?
Again, sorry if this is annoying you, but I worked the last 3 hours on that and still am lacking some C background.
´
I would really appreciate it, if you could give me a hand here.
Greetings,
Thomas. (LFrieza)