PokittoLib on Github & mbed online synced

Hello all

PokittoLib on mbed online is now in sync with all the features developed by @Hanski and @spinal.

SD card read/write functions are now also included

One exception is MicroPython - that will require considerable work to get working and I need to onsult @Hanski on how to make it available on the online ide

@Hanski and @spinal, could you help to create online examples of your fantastic Sprite & Mode13 (256 colors) contributions ?

https://os.mbed.com/users/Pokitto/code/PokittoLib/

3 Likes

In EmBitz, python scripts are compiled to bytecode and frozen to rom image to use as little ram as possible. For that I need to use some Micropython tools and headers.

With online tools, should we just freeze the script as is, and let MP to covert it to bytecode on the fly? Or is it possible to use MP tools there?

I will make a version of MicroPython library, that allows you to load python scripts that are being frozen to rom image. No MP tools needed in that case.

2 Likes

@jonne Am I able to do any preprocessing with online IDE? To be able to freeze a python script file as a c-string I should make it a header file and put some escape sequences to make it a legal string.

Erm that’s a somewhat vague question. Preprocessor macros work the normal way and you can (although its not persistent across sessions) pass command line params as well (see below).

Do you mean some functionality beyond normal C preprocessor language (#if, #define etc) ?

I actually ment pre-build step as I need to convert a python script to a h/cpp file.

Looks like it is not possible. Have to think about other ways to solve this…