Search found 49 matches

by pulkin
Sun May 26, 2019 6:45 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

I saw two kinds of SSL/TLS bundled with mp: which one should I compile in?
by pulkin
Sat May 25, 2019 7:37 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

Exactly. I have a code which compiles and runs but since this is my first asm code I have no idea whether it will actually work in the wild.

https://github.com/pulkin/micropython/b ... gchelper.s
by pulkin
Sat May 25, 2019 6:21 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

Can you give an example of the code that would cause a root pointer to stuck in the registers? I tried the following one with no success: ptr remains inside the memory. void gc_stress_test(void) { volatile int delta = 0; void* ptr; // Some significant allocation ptr = gc_alloc(400000, 0); // Make pt...
by pulkin
Sun May 19, 2019 5:01 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

Well, the question is how much contiguous memory can be allocated. I will stick to 512k (well, a binary search can be applied here but I do not think it is import right now). The good news is that mp finaliser is working! Deleting a file pointer and calling gc.colllect will actually close the file! ...
by pulkin
Tue May 07, 2019 11:18 am
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

You confuse me a lot now. I have a working port without gc_init.
by pulkin
Mon May 06, 2019 7:26 am
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

Regarding p.3: I do not have any explicit heap initialization but it still works somehow. ESP8266 port runs gc_init(heap, heap+sizeof(heap)). What is this invocation? What is this heap? Obviously, it is not necessarily the actual heap: the 36Kb chunk 'heap' may appear inside a global stack. Where do...
by pulkin
Sun Apr 28, 2019 5:59 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

Thank you. I understand and agree with what you are saying. I am just interested in some more details. So, there is my port and there is, for example, esp8266 port. My port has all gc initialization literally commented out: mpconfigport.h: 35 // #define MICROPY_ENABLE_GC (1) main.c: 168 // TODO: gc_...
by pulkin
Sun Apr 28, 2019 3:37 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

OK, to try this out I need to also enable gc. So my question is: what does micropython gc actually do? What is the difference between micropython running with gc and without it?
by pulkin
Sun Apr 28, 2019 2:39 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

What kind of mechanism finalizes objects (i.e. closes files on reference count = 0) in micropython? Is it GC? What do I need implement for it?
by pulkin
Fri Apr 12, 2019 7:22 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 29430

Re: Custom port A9G module: help wanted

Given I have this in the pp:

Code: Select all

	mp_stream_p_t x;
	x.(g_InterfaceVtbl->lwip_read) = NULL;
is it reasonable to assume that our Chinese friends bundle a 'read' macro that was substituted? How do I get rid of it without changing outer files and imports?