Search found 3 matches

by amvasil
Fri Jun 21, 2019 6:08 am
Forum: Development of MicroPython
Topic: Memory allocation for lists of different types
Replies: 5
Views: 3499

Re: Memory allocation for lists of different types

Added line into mpconfigport.h:

#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)

now a list of 200 float values takes 800 bytes in heap, which is exactly what was needed.

Thanks!
by amvasil
Thu Jun 20, 2019 12:26 pm
Forum: Development of MicroPython
Topic: Memory allocation for lists of different types
Replies: 5
Views: 3499

Re: Memory allocation for lists of different types

Hi stijn! Thanks for the detailed reply! 1. About cross compiler usage - the goal was not to include compiler code into MCU firmware to save code space. Also, as far as I understand, the code is executed as follows: (1) string containing python script text => (2) compilation => (3) VM bytecodes -> (...
by amvasil
Thu Jun 20, 2019 10:02 am
Forum: Development of MicroPython
Topic: Memory allocation for lists of different types
Replies: 5
Views: 3499

Memory allocation for lists of different types

Hello! I'm working on a port of MicroPython for the CC1312 chip. MicroPython is used as an embedded scripting engine: I compile some Python code using cross compiler and lauch it in a separate thread running MicroPython VM. I need to pass some data between the python environment and the main C progr...