Search found 49 matches

by pulkin
Thu Apr 11, 2019 10:24 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Re: Custom port A9G module: help wanted

I have the following piece of code (porting esp32 sockets):

Code: Select all

#include "py/stream.h"

void function(void){
    mp_stream_p_t x;
    x.read = NULL;
}
It fails at the assignment with error: expected identifier before ‘(’ token. Any idea?
by pulkin
Sun Mar 10, 2019 3:14 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Re: Custom port A9G module: help wanted

So what kind of API should I implement for the scenario: "SMS recieved", for example?
by pulkin
Sat Feb 23, 2019 8:47 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Re: Custom port A9G module: help wanted

In the end, the problem looks for me as following: I do not have access to interrupts in the event-driven SDK. If I want to process interrupts I either wait for micropython code to finish or do that in a different task having its own stack. As a result, the code fails at stack check. It is possible ...
by pulkin
Fri Feb 22, 2019 12:57 am
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Re: Custom port A9G module: help wanted

I resolved it, sort of. But I still need feedback. What I did is I created a timer sending recurring event to the REPL task (i.e. the one handling intialization and UART input). mp_handle_pending is invoked in the task. mp_sched_schedule is used to run callbacks. Is it OK?
by pulkin
Thu Feb 21, 2019 9:07 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Re: Custom port A9G module: help wanted

Ok, I think I pinned the error down to mp_stack_check using a sh*t-and-sticks debugger: void mp_stack_check(void) { mp_warning("mp_stack_check"); if (mp_stack_usage() >= MP_STATE_THREAD(stack_limit)) { mp_warning(" raising: %u >= %u", mp_stack_usage(), MP_STATE_THREAD(stack_limit)); mp_raise_recursi...
by pulkin
Thu Feb 21, 2019 5:21 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Re: Custom port A9G module: help wanted

What exactly do you mean? mp_obj_t mp_call_function_n_kw(mp_obj_t fun_in, size_t n_args, size_t n_kw, const mp_obj_t *args) { // TODO improve this: fun object can specify its type and we parse here the arguments, // passing to the function arrays of fixed and keyword arguments DEBUG_OP_printf("calli...
by pulkin
Wed Feb 20, 2019 8:34 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Re: Custom port A9G module: help wanted

Ok, I looked into ESP pin callback implementation and found that these callbacks belong to root pointers. Am I on the right way?
by pulkin
Tue Feb 19, 2019 10:55 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 38
Views: 30312

Custom port A9G module: help wanted

Hi community, I am porting micropython to the A9 GSM module (see also: A9G, RDA8955). It usually comes as a part of the board with a charge controller, external antennae, etc.: a very interesting piece of hardware overall from ESP manufacturers. The ongoing work is here: https://github.com/pulkin/mi...