Frozen bytecode to ESP32

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
Post Reply
Arkaik
Posts: 4
Joined: Tue May 02, 2017 9:15 am

Frozen bytecode to ESP32

Post by Arkaik » Tue May 02, 2017 9:42 am

Hi,

I recently met a problem on the Wipy 2.0, I'm trying to import a quite big module (more than 1000 lines) and I always get a memory error.
I did some research and it appears that my module is too big for the embedded compiler to fully load it.

The best solution seems to be the frozen bytecode one.
I don't have a lot of knowledges in low-level programming and I will need your help to achieve it.

So if I understood well, my objective is to precompile my python code, build a custom firmware around it and flash this firmware to the board. Once done I should be able to access my module as I do for native ones.

I found this two links and I tried to follow them :
http://esp-idf.readthedocs.io/en/latest ... setup.html
https://github.com/micropython/micropyt ... /README.md

Following the first link I now have the ESP32 toolchain, the ESP-IDF and the esp32 template project.
The step 4 has no logic for me because it's just building the github repository and nothing is added to it.

My problem now is that I don't understand how to integer my code to this application and load it to my board.

I basically have two questions :
Am I following the good procedure to achieve my goal?
Why do I need to build a custom firmware instead of just precompiling python code with py_compile and loading it into flash?

I thank you in advance for your help.
Arkaik

Post Reply