"How much space do global variables like uint8 take?"
Strictly, IIRC it depends on the flags given to the compiler, or can be set on a variable by variable basis using a 'pragma' to the compiler.
The processor is capable of loading and storing memory in one, two, four or eight byte units, which can be aligned on any byte memory address. So the data can be packed, and the CPU will handle it. AFAIK, the default to the compiler is to pack data.
"Is a separate uint8 beeing stored in a 4-byte-Integer memory adress?"
No, it will be one byte unless you force 4 byte alignment using compiler flags or a 'pragma'.
"How is an array of chars put into memory?"
Characters in a character array are stored in consecutive byte addresses.
"Each of the 32-bit memory registers four chars?"
Memory is not registers. Registers are part of the processor.
Memory is accessed in units of bytes.
Like many things, you can test this for yourself, by doing something like:
char a;
char b;
char c[10];
void setup() {
}
void loop() {
SerialUSB.println((unsigned int)&a, HEX);
SerialUSB.println((unsigned int)&b, HEX);
SerialUSB.println((unsigned int)&c[0], HEX);
SerialUSB.println((unsigned int)&c[1], HEX);
}
which will print the memory addresses of the char
variables and consecutive characters in the array.