Search found 21 matches

by Loxy618
Tue Apr 26, 2022 6:22 pm
Forum: General Discussion and Questions
Topic: Minimal MicroPython Init/Deinit For Scripts
Replies: 1
Views: 818

Minimal MicroPython Init/Deinit For Scripts

Hi! I'm a little new at this so hoping someone can provide some guidance. I'm trying to run MicroPython as a static library on a small iot device that has no console access. While the device isn't executing a script its running an application doing whatever else it needs to do. However, the iot devi...
by Loxy618
Thu Apr 08, 2021 2:38 pm
Forum: General Discussion and Questions
Topic: Valgrind Results
Replies: 7
Views: 2339

Re: Valgrind Results

I reran the below script via cmd line with Valgrind on ubuntu using the MP 1.14 ports/unix build. The script is import gc gc.threshold(5000) i = 0; while i<100: j = [1]*i*100 i=i+1 find the Valgrind output below. I'm somewhat new to MP and Linux in general so any help into what could be going on ins...
by Loxy618
Tue Apr 06, 2021 7:52 pm
Forum: General Discussion and Questions
Topic: Valgrind Results
Replies: 7
Views: 2339

Re: Valgrind Results

so gc_mark_subtree and all the other functions inside gc.c are of the original implementation. Basically we created a static lib from the MicroPython code and then that is statically linked to myTest.so, this is why we can't see the line numbers explicitly. I was hoping that this could provide enoug...
by Loxy618
Tue Apr 06, 2021 7:02 pm
Forum: General Discussion and Questions
Topic: Valgrind Results
Replies: 7
Views: 2339

Valgrind Results

Hi! After running my code against Valgrind I'm getting the following warnings I'd like to better understand and how to fix ==22862== Conditional jump or move depends on uninitialised value(s) ==22862== at 0x5446D7F: gc_mark_subtree (in myTest.so) ==22862== by 0x5446F3B: gc_collect_root (in myTest.so...
by Loxy618
Wed Mar 31, 2021 5:24 pm
Forum: General Discussion and Questions
Topic: Heap Overflow Not Caught
Replies: 5
Views: 2307

Re: Heap Overflow Not Caught

Thanks for the response. I agree with you however is there a feature built into MP to auto detect when the heap will overflow and throw an exception that can be more elegantly handled? Or, is it up to the script writer to call gc.collect throughout to ensure that the heap doesn't overflow?
by Loxy618
Wed Mar 31, 2021 4:39 pm
Forum: General Discussion and Questions
Topic: Heap Overflow Not Caught
Replies: 5
Views: 2307

Heap Overflow Not Caught

Hello, I am running a simple script to stress test my code. i = 0 while i<100: #print heap stats here j = [1]*i*100 i+=1 Each iteration thru the loop I print out the heap stats which are as follows until the devices hangs Used: 992 Free: 31520 T Used: 1280 Free: 31232 Used: 2304 Free: 30208 Used: 41...
by Loxy618
Tue Mar 09, 2021 9:41 pm
Forum: General Discussion and Questions
Topic: Watchdog Like Feature
Replies: 5
Views: 2016

Re: Watchdog Like Feature

Thanks for this. That's actually really helpful but I don't think it'll help in the specific use case. Calling that function will only work assuming we know that we are stuck in a loop. In a single threaded system the code itself wouldn't know that it's stuck in a loop, thats why I was hoping there ...
by Loxy618
Tue Mar 09, 2021 8:07 pm
Forum: General Discussion and Questions
Topic: Watchdog Like Feature
Replies: 5
Views: 2016

Re: Watchdog Like Feature

I agree with that however, I forgot to mention that I don't have console access. Basically we are running C++ code. Based on logic we may decide that we need to run a script. When a script needs to be run, the C++ the code is built to init MP, run the script and stop MP. However we want to be able t...
by Loxy618
Tue Mar 09, 2021 6:20 pm
Forum: General Discussion and Questions
Topic: Watchdog Like Feature
Replies: 5
Views: 2016

Watchdog Like Feature

The 3rd party embedded linux platform on which I am running micropython does not have a watchdog that I can use so I'm curious if there is some internal watchdog in MP itself or some alternative solution. Basically, if someone accidentally writes an infinite loop in a script is there a way to force ...
by Loxy618
Wed Jul 29, 2020 12:56 pm
Forum: General Discussion and Questions
Topic: Minimal Build For Linux
Replies: 1
Views: 1393

Minimal Build For Linux

Hi All- I'm trying to build the minimal build for an embedded linux platform. Eventually I'll want to make a static library but for now just trying to get it to compile. In the make file I changed CROSS=0 and left all else the same. I can build and generate the static lib correctly if CROSS=1 It sta...