2.8. Play Python on Raspberry Pi Pico in MDK

    The resources and price of the Raspberry Pi Pico are really good, it is fun to play with, not to mention there is a big community behind it. One question for most of the MCU developer is that can we use MDK to develop Raspberry Pi Pico and play with PikaScript? Why not? Thanks to a open-source project called Pico_Template, dream becomes reality. Please note that Pico_Template allows you to compile the latest pico-sdk using the Arm Compiler 6, debug without an extra pico and retarget printf to MDK without using any Serial2USB adapter.

    For details, see:

    As we mentioned before, binding C modules in MicroPython is very complicated and difficult to debug. Is there a more convenient way to do it for python running on MCUs?

    YES! Our answer to this question is PikaScript. PikaScript is a completely rewritten ultra-lightweight python vitual machine, with zero dependency on toolchain, simple configuration, ultra-low memory footprint (i.e. you can use it with less than 4KB of SRAM). Using framework based C module development tools, your API calling written in Python can be automatically connect to the your C modules. Cannot be more simple or convenient, isn’t it? No need to manually handle any global tables, macro functions, module registration, etc.

    For details, see: I’m going to use the cheapest single-chip microcomputer to run python, and I also need to use MDK to develop it, what’s the matter

    In addition to pico, the portability of pikascript allows you to use it on a wide variety of platforms. For example: stm32g0, stm32f1, ch32, apm32, cm32, as well as Pingtou’s w801, Boliu’s bl-706…

    The very popular ESP32C3, Godson architecture.

    _images/1640497097922-8490fdc1-ba88-48a4-888b-3859384ca650.webp

    In fact, PikaScript is deeply integrated with rt-thread, it supports rt-thread full series of BSP via software packages.

    Let’s see how to play PikaScript on Raspberry Pi pico using MDK:

    If you can see the following information (or similar) on the Debug(printf) View, congrats!

    _images/1640497099248-1358725f-072c-4810-a999-c9d372575f19.webp

    For getting technical support, please raise issues on github. Thank you.