The objects should be created 'on-demand' via jswrapper.c - after they're created, the function pointer inside them points to the constructor function for that object - and that is used by jswrapper to figure out what' inside them.
All I can think is that the function pointer has changed somehow.
I guess, most likely, you've saved some code and then updated the firmware without clearing out the area reserved for saved code? That'll have moved the function addresses around and will have broken the pointers.
That's been a common thing all along... one of the reasons I've been pushing for all-in-one hex files that overwrite saved code.
I guess you could change the hex file to write another blank.hex over the area reserved for saved code?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The objects should be created 'on-demand' via jswrapper.c - after they're created, the function pointer inside them points to the constructor function for that object - and that is used by jswrapper to figure out what' inside them.
All I can think is that the function pointer has changed somehow.
I guess, most likely, you've saved some code and then updated the firmware without clearing out the area reserved for saved code? That'll have moved the function addresses around and will have broken the pointers.
That's been a common thing all along... one of the reasons I've been pushing for all-in-one hex files that overwrite saved code.
I guess you could change the hex file to write another
blank.hex
over the area reserved for saved code?