Embedding Micropython Interpreter as FreeRTOS Task

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
LorRed
Posts: 3
Joined: Sun Jun 11, 2017 9:55 am

Embedding Micropython Interpreter as FreeRTOS Task

Post by LorRed » Sun Jun 11, 2017 10:36 am

Hi everybody,
I am currently trying to embed Micropython in a bigger project based on an smt32f4 board.
Having set up FreeRTOS and some low level C task, I would like to place an high-level interpreter in a low priority task: so my choice of trying to include only Micropython as interpreter without any hal dependency.
First question: do you think it's possible to achieve this goal?
I have started from "Embedding Micropython example https://github.com/micropython/micropyt ... /embedding" trying to substitute unix minimal with arm minimal: not needing hal and ext modules I also removed few lines in the PY_O_BASENAME definition in the py.mk makefile. Eventually I am able to compile, getting a very big libmicropython.a (308Kb).
The mess happens when trying to link against the main project... :roll:
I get:
* (as expected) multiple definitions of memcpy, strlen...: my FreeRTOS project is compiled with -lc flag
* RAM overflow error from ld
I think I am not following the right path... any help would be appreciated.

User avatar
braiins
Posts: 19
Joined: Mon Feb 23, 2015 1:09 pm
Contact:

Re: Embedding Micropython Interpreter as FreeRTOS Task

Post by braiins » Tue Jun 13, 2017 7:22 am

Would this do the job for you ;-)?


Jan
braiins - Your partner in embedded world - http://www.braiins.cz

LorRed
Posts: 3
Joined: Sun Jun 11, 2017 9:55 am

Re: Embedding Micropython Interpreter as FreeRTOS Task

Post by LorRed » Wed Jun 14, 2017 9:37 am

Hi Jan,
this really looks like what I was looking for!
During my research I found a post of yours about Micropython + FreeRTOS but not this one :shock:
I am going to definitely try it in these days and let you know if it satisfies my needs, thank you.

Post Reply