I need to monitor the number of blocks a user var requires in memory. I need to extract or view
the contents of that var, using the reference that trace provides.
Q3: What is the 'name' attribute refereing to?
Q4: What are the return values here as they don't seem to be the actual blocks as returned in a trace request?
Q5: How to get the value #531 and it's contents using trace() ?
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.
Sun 2020.04.19
I need to monitor the number of blocks a user var requires in memory. I need to extract or view
the contents of that var, using the reference that trace provides.
Using trace,
I'm able to view it's ID and space utilized:
#348
and#531
What I am after is how to get the value
#531
and it's contents. It takes up 137 blocks.Pairing down, now that I know the ID
\xFFcod
of the varBut a curious response emerges, the reference value changes from
#348
to#990
, but it is the same location in memory?Q1: Why does the refrence value change and what is that value exactly?
Q2: Wht is the meaning of 'r0' and 'l1' and compared to 'r1' and 'l2' ?
Using getSizeOf()
Q3: What is the 'name' attribute refereing to?
Q4: What are the return values here as they don't seem to be the actual blocks as returned in a trace request?
Q5: How to get the value
#531
and it's contents using trace() ?Thank you in advance. . . .