Search found 6 matches

by Chinkal
Mon Oct 24, 2016 3:35 am
Forum: General Discussion and Questions
Topic: Micropython data stored in Heap
Replies: 11
Views: 8253

Re: Micropython data stored in Heap

I was able to save the locals and global dict data into the file system. So my program has a function called checkpoint(), whenever called it will save the locals and global dict data and version into the file. I also want to implement restart function so whenever the system reboots, It will check t...
by Chinkal
Wed Oct 19, 2016 3:04 pm
Forum: General Discussion and Questions
Topic: Micropython data stored in Heap
Replies: 11
Views: 8253

Re: Micropython data stored in Heap

The ctrl-C interrupt can occur at arbitrary points in your code, so you'll need to trap the exception in the outermost scope of the program. As @dhylands has pointed out, there is little point in saving local variables: the ones that were current when the exception occurred will be out of scope in ...
by Chinkal
Sun Oct 16, 2016 9:15 pm
Forum: General Discussion and Questions
Topic: Micropython data stored in Heap
Replies: 11
Views: 8253

Re: Micropython data stored in Heap

It might help us understand what you're trying to achieve if you could clarify a few points. What platform are you considering, Unix or a microcontroller? Are you considering normal program termination or a program interrupted by an error condition or ctrl-C? Resuming the latter in a "new session" ...
by Chinkal
Sun Oct 16, 2016 3:22 am
Forum: General Discussion and Questions
Topic: Micropython data stored in Heap
Replies: 11
Views: 8253

Re: Micropython data stored in Heap

Objects stored in flash never change (i.e. are read-only). locals lose their value as soon as the function they're defined in exit. If you want to persist values, then you'll need to write the code to do that yourself, and store the data someplace (like on the filesystem, or in some battery backed ...
by Chinkal
Fri Oct 14, 2016 3:29 am
Forum: General Discussion and Questions
Topic: Micropython data stored in Heap
Replies: 11
Views: 8253

Re: Micropython data stored in Heap

@dhylands: Thank you for clearing my doubt. I will really appreciate it if you could help me to visualize this thing. I wants to store all local and global variable in the flash so if I exit from my current program and rerun it than it should have all the locals and global variable from my previous ...
by Chinkal
Sun Oct 02, 2016 7:15 pm
Forum: General Discussion and Questions
Topic: Micropython data stored in Heap
Replies: 11
Views: 8253

Micropython data stored in Heap

Does Micropython stores all local and global variables in Heap?