Search found 9 matches

by hadi
Wed Oct 20, 2021 7:46 am
Forum: General Discussion and Questions
Topic: Runing native machine by micropython-1.9
Replies: 0
Views: 854

Runing native machine by micropython-1.9

Hello to everybody I am using micropython version 1.9 and now I want to run native machine code in .mpy files form another language base on https://docs.micropython.org/en/latest/develop/natmod.html tutorial. now my question is if micropython 1.9 support this feature of micropyton or not? since ther...
by hadi
Tue Oct 12, 2021 9:54 am
Forum: General Discussion and Questions
Topic: Tools for wrapping python module from headers
Replies: 0
Views: 815

Tools for wrapping python module from headers

Hello to everybody
I need a tool or script that get c headers file and import it directly into python modules automatically.
is there any useful tools for it?
as I search on the net I found some tools like micropython-wrap (https://github.com/stinos/micropython-wrap). is it work for my task?
by hadi
Tue Oct 12, 2021 9:47 am
Forum: General Discussion and Questions
Topic: How call python function from C in MicroPython
Replies: 4
Views: 1822

Re: How call python function from C in MicroPython

This thread should be relevant: https://forum.micropython.org/viewtopic.php?f=3&t=4379&p=25349&p25349 It has the python code pass down a pointer to a python function to the c code and the c code calls that python function. First of all tanks for your replying. There is a problem with this kind of c...
by hadi
Sun Oct 10, 2021 8:01 am
Forum: General Discussion and Questions
Topic: How call python function from C in MicroPython
Replies: 4
Views: 1822

Re: How call python function from C in MicroPython

Nobody could help me with this issue!!! :(
by hadi
Sat Oct 09, 2021 7:16 am
Forum: General Discussion and Questions
Topic: How call python function from C in MicroPython
Replies: 4
Views: 1822

How call python function from C in MicroPython

I have a function in my C-code (bar_C_Fun) that gets two integers and a fun-pointer as input arguments. Now I want to pass a python function pointer (foo_Py_Fun) as a pointer to bar_C_Fun function. My C-Code Function : typedef void (*pyFun)(int,int); float bar_C_Fun(int i, int j, pyFun funPtr){ retu...
by hadi
Wed Oct 06, 2021 3:15 pm
Forum: General Discussion and Questions
Topic: Porting EmWin Library into Micropython
Replies: 2
Views: 1080

Re: Porting EmWin Library into Micropython

can I use micropython-ffigen( https://github.com/pmp-p/micropython-ffigen )tool for this purpose and how?
by hadi
Tue Oct 05, 2021 9:59 am
Forum: General Discussion and Questions
Topic: Porting EmWin Library into Micropython
Replies: 2
Views: 1080

Porting EmWin Library into Micropython

Hello,
I need to port emwin GUI library into micro-python. now I want to know if there is any tools that can help me for porting emwin ?
the second question is how I can attach a python function script to some button in emwin library?
I would be appreciated if someone help me about these problems.
by hadi
Sat Mar 09, 2019 11:28 am
Forum: Development of MicroPython
Topic: Problem with MP_BC_SETUP_WITH bytecode
Replies: 0
Views: 1892

Problem with MP_BC_SETUP_WITH bytecode

Hi I think there is a problem with byte code "MP_BC_SETUP_WITH". ENTRY(MP_BC_SETUP_WITH): { MARK_EXC_IP_SELECTIVE(); // stack: (..., ctx_mgr) mp_obj_t obj = TOP(); mp_load_method(obj, MP_QSTR___exit__, sp); mp_load_method(obj, MP_QSTR___enter__, sp + 2); mp_obj_t ret = mp_call_method_n_kw(0, 0, sp +...
by hadi
Thu Mar 07, 2019 11:07 am
Forum: Development of MicroPython
Topic: Understanding Inside of Micropython
Replies: 3
Views: 3066

Understanding Inside of Micropython

Hi everybody I need to understand micropython internal source code(especially the mechanism of VM working). for this I have searched a lot about any documents that related to micropython internal working but the more I try the less I get result. since I want to know is there any document about micro...