Array size stops code without warning

Dear Arduino-Community,

I have the issue that when creating an array with "just" 200+ elements, code execution stops when trying to save or load a value into that array.

What might be wrong here?

Unsigned int Arr0[400];
Void setup(){
 Serial.begin(1200);
}
Void loop(){
Arr0[0] = 3;
Serial.print("a");
}

What happens it that when i have 200 as size it works, but if i add a bit more to the size the execution stops (serial print doesnt start).
The compiler doesnt make a warning.

What might be wrong here?

You posted code that hasn't a hope in hell of compiling.

You need to do some research on how much memory your Arduino has.

Except for the stupid capitals (probably a side effect of using a tablet or cell phone), your code compiles and runs fine on an Uno. I have nearly 14000 'a' on my screen :smiley:

Please make an effort to post proper code, even when using a cell phone or tablet. I do so, so you can do it as well.

Its an arduino pro mini 168 - at least that is what is labeled on my chinese 1$ board.

Here again compileable:
As soon as i change the size to 400 it stops running.
If someone else has an arduino pro mini 168, having the same limitation? 200 is pretty small, cant believe that this is normal xD

unsigned int arr0[200];
void setup(){
 Serial.begin(1200);
}
void loop(){
 arr0[0] = 3;
 Serial.print("a");
}

I have the issue that when creating an array with "just" 200+ elements,

Except your code shows "just" 400 elements, which is 800 bytes out of 1024 on a 168.

AWOL:
Except your code shows "just" 400 elements, which is 800 bytes out of 1024 on a 168.

Oh i see than thats really it (ehm and sorry for not taking note of the datasheet).
Strange that the compiler doesnt give a message.

Thank you and also the other comments before. :slight_smile:

Strange that the compiler doesnt give a message.

The compiler doesn't necessarily know how much memory is available.

jremington:
The compiler doesn't necessarily know how much memory is available.

Not only that, but it can't tell how much the stack will grow when the code is running, so it can't produce an accurate value, anyway.

The later versions of the IDE DO show, at compile time, how much memory is being used.