You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hmm - when minifying, C should get 'inlined' and removed. That's the idea anyway - and it's what all the normal Espruino modules rely on.

    One thing that would stop it is if you exported C - then the minifier decides it is something that can be changed and that it can't mess with. You could try splitting your C into smaller objects - one for REG, one for MASK, etc - and that could help the minifier (or at the very least help you to narrow down what's taking the space).

    After some refactoring and with the "direct to flash" option, I do now have enough ram available to keep going

    The C object itself will take a bunch of space (probably at least 2 vars for each constant entry). However if (and you probably only want to do this for development) you made C a 'getter' function that returned the object, it would take basically no RAM until it was executed - obviously it's a lot slower though.

About

Avatar for Gordon @Gordon started