[SOLVED] Weird behaviour after changing code. No errors.

Arduino:
Uno

OS:
Debian 8.1.0

Code:

Problem:
I am building some kind of "OS" for Arduino. After I had it working quite okay. (I were able to write characters via a virtual keyboard and interpret them as OP-Codes/Commands) Everything worked fine that far.

Now after I changed quite a lot about the interpreter function (and some other stuff), the Arduino no longer likes my code. Compiling works fine and I don't get any errors.The Arduino doesn't even enter the setup() or loop() functions.
The LCD shows weird stuff (Only one line and some pixels are brighter than others {Changing constantly}) and I don't get any Serial output.

Other sketches work just fine (The Arduino isn't just dead).

If somebody got an idea why this would happen, please post an answer.
If somebody could try to run the code on an Arduino with better RAM and/or ROM and post the results, I'd appreciate it.

EDIT:
The problem was the size of my cmem array [256][8] -> 2048 bytes. With the Arduino having only 2048 bytes of RAM, this weren't feasible.

unsigned char opc_param_count[256] =
{
  0,//NOP
  1,1,2,2,1,0,0,0,0,0,0,0,0,0,0,//Memory Manipulation
  0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,//Output
  1,2,2,2,1,1,2,2,2,2,1,2,2,2,0,0,//Arithmetic 1
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,//Arithmetic 2
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,//Logic
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
 
//Memory
unsigned char accu;
unsigned char mem[256];
unsigned char cmem[256][8];

2561 bytes of RAM out of 2048.

(the usual descriptions of "bizarre" or "weird" are normally dead-giveaways)

2561 bytes of RAM out of 2048.

Whoops !

(and that's only the start of it)

Thanks for the answer! :slight_smile:
I just looked up the technical specs of the Arduino UNO and realized my problem (I assumed the amount of RAM would be closer to the size of the EEPROM (EDIT: Not EEPROM, Flash Memory {@AWOL}) for the code).

I never built any big projects for Arduino before and most of my programming experience is from assembly for Microcontrolers and C++ for computers.

About the vague description:
As said: I didn't get any information by the Arduino or the compiler, thereby I weren't able to be any more specific.

About the "And that's only the start of it":
I know that the project is in no way practical or useful, I create it only for the lulz and learning purpose. My goal is not to create a functional OS, but rather a system which can interpret commands using only the minimum of additional hardware (one poti and two Buttons)

I assumed the amount of RAM would be closer to the size of the EEPROM for the code).

Code goes into flash memory, not EEPROM.
You normally have half as much EEPROM as you have RAM on the AVR processors.