Search found 27 matches

by agonnen
Thu Sep 02, 2021 9:20 am
Forum: General Discussion and Questions
Topic: New uasyncio feature: ThreadSafeFlag
Replies: 4
Views: 3077

Re: New uasyncio feature: ThreadSafeFlag

Hi,
What would be the best approach to set ThreadSafeFlag from C code, possibly from another thread or interrupt context?
by agonnen
Tue Jun 08, 2021 9:54 pm
Forum: Other Boards
Topic: [MIPS] Garbage collection crash during Unix port running on MIPS
Replies: 16
Views: 8619

Re: [MIPS] Garbage collection crash during Unix port running on MIPS

Update : the problem I was seeing on Linux was really unrelated to the problem discussed on this thread. This also explains why the workaround suggested here didn't have any effect. My problem was root caused to memory allocations during signal handler (or interrupt handler) that are triggered spon...
by agonnen
Tue Jun 08, 2021 8:08 pm
Forum: Other Boards
Topic: [MIPS] Garbage collection crash during Unix port running on MIPS
Replies: 16
Views: 8619

Re: [MIPS] Garbage collection crash during Unix port running on MIPS

In that case it might be an unrelated problem. Actually I didn't look at the code carefully before, but it indeed looks like a different problem because there's no bound method here, and it would be strange that the GC would to sweep the function f. Does the version from micropython-lib have the sa...
by agonnen
Tue Jun 08, 2021 8:18 am
Forum: Other Boards
Topic: [MIPS] Garbage collection crash during Unix port running on MIPS
Replies: 16
Views: 8619

Re: [MIPS] Garbage collection crash during Unix port running on MIPS

stijn wrote:
Tue Jun 08, 2021 8:07 am
If this is the same problem, not unlikely, you could post the simplest code to reproduce it in https://github.com/micropython/micropython/issues/7273. And try the workaround.
The code above is a simple reproduction.
The workaround did not help.
by agonnen
Mon Jun 07, 2021 9:15 pm
Forum: Other Boards
Topic: [MIPS] Garbage collection crash during Unix port running on MIPS
Replies: 16
Views: 8619

Re: [MIPS] Garbage collection crash during Unix port running on MIPS

I'm seeing some problem with FFI on x64 Ubuntu. I'm trying to implement "machine.Timer" based on timer.py from micropython-lib here: https://github.com/lvgl/lv_binding_micropython/blob/0d4c361743bf63ae9bdb4109c7812b7618723c99/driver/linux/lv_timer.py It works up to some point and then crashes: >>> f...
by agonnen
Thu Jun 03, 2021 10:04 pm
Forum: General Discussion and Questions
Topic: Timer in Unix port
Replies: 8
Views: 4072

Re: Timer in Unix port

Here is my attempt to implement a self contained "Timer" class for the unix port, that matches Micropython Timer API:

https://github.com/lvgl/lv_binding_micr ... v_timer.py
by agonnen
Wed Mar 10, 2021 9:10 pm
Forum: General Discussion and Questions
Topic: MicroPython with LVGL problem
Replies: 1
Views: 1400

Re: MicroPython with LVGL problem

I can recommend looking at https://github.com/lvgl/lv_micropython and learning how this is done there. You can diff and see the differences between upstream micropython and lv_micropython. Another option is directly using the lv_micropython firmware. For LVGL specific questions I recommend posting t...
by agonnen
Sat Feb 13, 2021 10:56 pm
Forum: General Discussion and Questions
Topic: Compiled modules load time
Replies: 8
Views: 3435

Re: Compiled modules load time

Update - sorting qstr and using binary search improve things significantly!

I've created a PR: https://github.com/micropython/micropython/pull/6896
by agonnen
Tue Feb 09, 2021 10:39 pm
Forum: General Discussion and Questions
Topic: Compiled modules load time
Replies: 8
Views: 3435

Re: Compiled modules load time

Time to connect JTAG! Random breaks while importing mpy modules always end up at qstr_find_strn (gdb) bt #0 0x400d3734 in qstr_find_strn (str=0x3f819960 "set_value", str_len=9) at ../../py/qstr.c:181 #1 0x400d377f in qstr_from_strn (str=0x3f819960 "set_value", len=9) at ../../py/qstr.c:197 #2 0x400d...
by agonnen
Mon Feb 08, 2021 10:55 pm
Forum: General Discussion and Questions
Topic: Compiled modules load time
Replies: 8
Views: 3435

Re: Compiled modules load time

Your compiled modules must be very large if loading from the file system takes several seconds. Are you sure that there is not still the .py version of the module in the files system. That will take preference. No, there is something else going on here. There are 13 .mpy files, total of 50KB. Not l...