PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run with 4KB of RAM (such as STM32G030C8 and STM32F103C8), and is very easy to deploy and expand.

Overview

PikaScript

中文页|

CI

Star please~

1. Abstract

PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run with 4KB of RAM and 32KB of flash (such as STM32G030C8 and STM32F103C8).

It's very easy to bind C function to python module with the help of Pika Pre-compiler.

【Video】PikaScript hand by hand

Get PikaScript:

Use Pika package manager PikaPackage.exe

  1. Run the PikaPackage.exe directly, then the pikascript repo would be downloaded auto in the /tmp/pikascript folder of your current disc partition.

  2. Add requestment.txt to the same folder of PikaPackage.exe then run PikaPackage.exe. The run-time core, pre-compiler and moudles would be installed in the current folder.

  3. Released modules:packages.toml

Quick Start

You can use simulation project to quick start without hardware,or use the out-of-the-box develop board Pika-Pi—Zero.

image

The board based on STM32G030C8T6 MCU, only 64kB Flash, 8kB RAM can run PikaScript with total peripheral device (GPIO、TIME、IIC、RGB、KEY、LCD、RGB). CH340 is deployed to support USB to serial with Type-C USB, support download python script py serial, there are 4 RGB on the board and support the LCD.

Document

1. PikaScript-Quick start within 3 minutes

2. PikaScript-Architecture and principle

3. PikaScript-Deploy within 10 minutes

4. PikaScript-Standard develop workflow

5. PikaScript-Demo show

6. Arm-2D simulation

Folders

src - core code

bsp - mcu/board support

port - OS support

document - developt document

examples - example scripts

package - packages and moudles

pikaCompiler - pre-compiler write by Rust, used to bind C function to python moudle.

pikaPackageManager - pacakge manager

2.Device driver

MCU/Board bsp gpio uart pwm adc i2c spi rgb oled
PikaPi Zero
stm32g030c8
stm32g070cB
stm32f103c8
ch32v103r8t6
cm32m101a

3.Characteristic

(1)Run environment

Support run in mcu without OS or file system. Can run in everywhere with RAM ≥ 4kB and FLASH ≥ 32kB,such as stm32g030, stm32f103c8t6,esp8266.

(2)Develop enviroment

Support run and program python scripts by serial.

微信交流群

Support IDEs like Keil, IAR, rt-thread studio and segger embedded studio to develop C moudle.

Support build tools like CMake, makeFile and Scons.

Zero dependencies, zero configuration, out-of-the-box, easy to integrated into privious C projcet.

Eazy to extern customized C moudles.

Support linux.

(3)Syntax

Support subaggregate of python 3 standard syntax.

Support class and method define, encapsulation-inheritance-polymorphism and moudles in compile time - Based on Pika Pre-compiler.

Support method invoke, argument define, new object, free object, control flow(if\while) and operator ( + - * / < == > ). - Based on Pika Runtime Core.

Syntax Compile-Time Run-Time
Class Define
Class Inherit
Method Define
Method Override
Method Invoke
Module Import
Argument Define
Argument Assignment
Object New
Object Free
Object Nest

Operator

+ - * / == > < >= <=

Control flow

if while for

(4)Develop standard.

Readability first, nearly never use macro function and global argument.

Complete unit testes based on google test.

4.Both talk and show the code:

E-mail: [email protected]

Tencent QQ: 645275593

QQ group:

微信交流群

5.Contribute

Content Contributer
QEMU simulation with ARM-2D liuduanfei
Donate:GD32E103TB muc 2 pic 信息牛(WeChat)
Rt-thread bsp template Meco Jianting Man
Donate:EC600S-CN 4G module 移远模块
Donate:BL706 board 博流智能 bouffalolab
Donate:CM32M101A board 孟巍(WeChat)
Donate:APM32F030R8 board 极海半导体 陈成
Donate:APM32E103VB board 极海半导体 陈成
Donate:APEX-Link debugger 极海半导体 陈成
format code,add gitattribute Meco Jianting Man
demo/simulation-keil 千帆(WeChat)
demo/stm32f103zet6/demo01-led-stm32f103zet6 甜航
demo/stm32f103zet6/demo02-led-stm32f103zet6_tworoot 甜航
demo/stm32f407zgt/demo01-led-stm32f407vgt 甜航

6.Test and develop Core

Test core in linux(ubuntu20.04 is recommend):

step1: Clone the repo

git clone https://github.com/pikastech/pikascript
cd pikascript/port/linux

step2: Compile the project

sh init.sh # Only nedded in the first time.
sh make.sh # Compile the project.

step3: Run the unit tests.

sh gtest.sh

step4: Run the banchmark

sh test-banchmark.sh

step5: Run the demo

./build/src/boot/demo06-pikamain/pikascript_demo06-pikamain

7.Demo

The scripts in demos are in the examples folder.

Demo 01 GPIO

mmexport1631351506111

Hnet-image (2)

Demo 02 USART

mmexport1631351902469

Hnet-image (3)

Demo 03 ADC

mmexport1631351527609

mmexport1631351523907

Demo 04 PWM output

image

Demo 05 RGB

image

The maximum RAM usage of these demos is only 3.56K, which is 4.56K if the 1K stack is included, and the maximum Flash usage is 30.4K. Refer to the 20K RAM and 64K Flash of STM32F103C8T6, less than 25% RAM and less than 50% Flash are used.

A quick comparison can be made between the microPython chip STM32F405RG and the PikaScript chip STM32G070CB.

RAM resource comparison

image

Flash Resource Comparison

image

Reference price comparison (take the selling price of 10 pieces in Lichuang Mall on September 11, 2021 as reference)

image

About the custom extern module ?

In addition to device drivers, developing custom Python modules for MCU is very easy. The following two demos are extensions of the custom module, which developed python interfaces for the ARM-2D image driver library.

Boxes~

Hnet-image (7)

Rotating suns~

Hnet-image (6)

Comments
  • Python shell is really broken

    Python shell is really broken

    Based on the code from pikascript.com and all ==latest versions for the STM32F103C8 and a slight adaption to call into pikaScriptShell(pikaMain) and giving the firmware the needed char __platform_getchar(void) function, I successfully get a Python shell on my Bluepill board.

    >miniterm.py -e --eol CRLF COM6 115200
    ======[pikascript packages installed]======
    PikaStdDevice==latest
    PikaStdLib==latest
    STM32F1==latest
    pikascript-core==latest
    ===========================================
    memory used now: 140 B
    memory used max: 848 B
    
    >>>
    >>>
    

    While some functions work

    >>> 2**8
    256.000000
    >>> "A" + "B"
    AB
    >>> print("Hello" + " world")
    Hello world
    >>> x = 3.0
    >>> y = 5.0
    >>> x +y
    8.000000
    

    Others are really broken

    >>> 1+1
    0
    >>> 20 + 30
    0
    >>> 2 * 3
    0
    >>> int("3")
    [error] convert to int type faild.
       STR 3                (#1)
     -> RUN int             (#3)
    >>> print("A" if True else "False")
    AifTrueelseFalse
    >>> len("ABC")
    NameError: name 'len' is not defined
       STR ABC              (#1)
     -> RUN len             (#5)
    

    Is there something wrong with how I build the shell or did I miss something else?

    The project is at https://github.com/maxgerhardt/pikascript-pio-bluepill/ and is using PlatformIO, very easy to use + upload + debug.

    opened by maxgerhardt 11
  • Support built-in lists and dicts

    Support built-in lists and dicts

    Same setup as in #96

    >>> myList = [1,2,3]
    NameError: name '[1,2,__get__' is not defined
       NUM 3                (#1)
     -> RUN [1,2,__get__            (#3)
    >>> myList = ["123"]
    NameError: name '[__get__' is not defined
       STR 123              (#1)
     -> RUN [__get__                (#5)
    

    Really weird error messages too.

    opened by maxgerhardt 10
  • Bluepill template built with arm-gcc does not fit 128K Flash

    Bluepill template built with arm-gcc does not fit 128K Flash

    I have got the bluepill template for pikascript and then made a Makefile to compile with arm-none-eabi-gcc, the code is in this repository.

    I was able to compile all .c files in the template into objects and them link them successfully, I could also build a binary firmware.

    The issue is that the size is WAY too big for 128K bluepill flash memory, so I would like to know what objects may not be compiled to build a smaller binary.

    Thanks in advance!

    opened by Chandler-Kluser 9
  • 关于建立PikaScript的Benchmark的建议

    关于建立PikaScript的Benchmark的建议

    从商业推广和优化的角度考虑,现在急需要为PikaScript建立一个浅显易懂又极具说服力的Benchmark。

    推荐如下: 1、选一个主流的平台,比如Cortex-M(推荐以M0和M3为参考,前者是Thumb后者是Thumb2) 2、选一个以穷举为主的算法,推荐计算从0到100之间的素数。这个算法的好处是: - 只能穷举 - 容易检验结果是否正确 - 包含流控 3、为算法实现对应的 C、Lua、mpy和PikaScript版本 4、统计这些版本所用的周期数,并以C版本为基准来给性能打分: 假设C所用周期数为 A,PikaScript 所用的周期数为B,则性能评分为: (A/B * 100 %) 表示对应的脚本算法性能是C语言的百分比。 5、建议测试 -O0、-Oz、-Os和-Ofast 下的跑分(以GCC为蓝本) 6、将Lua、mpy和PikaScript的跑分、所需的资源等信息列成表格,供大家参考。

    opened by GorgonMeducer 8
  • Function Definition Not Working in PikaScriptShell

    Function Definition Not Working in PikaScriptShell

    In the script console, I can't seem to be able to define a function that will be executed later due to a syntax error (?)

    >>> def a():
    ...    print("A")
    ...    print("B")
    ... 
    [error]: Syntax error.
    >>>
    >>> a()
    >>> 
    

    This code works in a Python shell as regular.

    >>> def a():
    ...    print("A")
    ...    print("B")
    ...
    >>> a()
    A
    B
    
    opened by maxgerhardt 6
  • Class Defintion Not Working in PikaScriptShell

    Class Defintion Not Working in PikaScriptShell

    >>> class MyClass(TinyObj):
    ...     __init__(self):
    ...         self.val = 123
    ... 
    >>> x = MyClass()
    >>> x.val
    NameError: name 'x.val' is not defined
     -> REF x.val           (#1)
    

    :(

    >>> x.val = 456
    >>> x.val
    NameError: name 'x.val' is not defined
     -> REF x.val           (#1)
    

    Seems classes can't support arbitrary attributes?

    opened by maxgerhardt 5
  • Loop problems

    Loop problems

    With my referenced project

    >>> for i in range(0, 10):
    ... print(i)
    [error] print: can not print val
       REF i                (#56)
     -> RUN print           (#63)
    

    And while loops hang up completely

    >>> i = 0
    >>> i
    0
    >>> while i != 10:
    ... i +=1
    
    <hangs>
    
    opened by maxgerhardt 5
  • Compiling STM32F103C8 booter from Makefile

    Compiling STM32F103C8 booter from Makefile

    The repo says

    https://github.com/pikasTech/pikascript/blob/5d5d4974d56f1b6482d7d521d054768f8cd06279/bsp/stm32f103c8/Makefile#L61-L65

    but the folder https://github.com/pikasTech/pikascript/tree/5d5d4974d56f1b6482d7d521d054768f8cd06279/bsp/stm32f103c8 doesn't have a Core/src folder, only Boot. How can this compile?

    opened by maxgerhardt 5
  • Linux doesn't build

    Linux doesn't build

    When I follow https://github.com/pikasTech/pikascript#6test-and-develop-core, I get all sorts of errors which I have to correct.

    max@max-VirtualBox:~/pika/pikascript/port/linux$ sh make.sh # Compile the project.
    api-make-linux.sh: 2: ./rust-msc-latest-linux: not found
    api-make-win10.sh: 2: ./rust-msc-latest-win10.exe: Permission denied
    make.sh: 2: cd: can't cd to build
    make: *** No targets specified and no makefile found.  Stop.
    

    And then

    max@max-VirtualBox:~/pika/pikascript/port/linux$ cp ../../tools/pikaCompiler/rust-msc-latest-linux package/pikascript/
    

    after that

    max@max-VirtualBox:~/pika/pikascript/port/linux$ sh make.sh
    analyzing file: main.py
    analyzing file: PikaStdLib.py
    analyzing file: PikaStdData.py
    analyzing file: GTestTask.py
    analyzing file: PikaStdTask.py
    analyzing file: PikaStdData.py
    analyzing file: PikaMath.py
    analyzing file: PikaStdDevice.py
    analyzing file: PikaDebug.py
    analyzing file: PikaStdData.py
    api-make-win10.sh: 2: ./rust-msc-latest-win10.exe: Permission denied
    make.sh: 2: cd: can't cd to build
    make: *** No targets specified and no makefile found.  Stop. 
    

    But when I do

    max@max-VirtualBox:~/pika/pikascript/port/linux$ cp ../../tools/pikaCompiler/rust-msc-latest-win10.exe package/pikascript/.
    max@max-VirtualBox:~/pika/pikascript/port/linux$ chmod +x package/pikascript/rust-msc-latest-*
    max@max-VirtualBox:~/pika/pikascript/port/linux$ sh make.sh
    analyzing file: main.py
    analyzing file: PikaStdLib.py
    analyzing file: PikaStdData.py
    analyzing file: GTestTask.py
    analyzing file: PikaStdTask.py
    analyzing file: PikaStdData.py
    analyzing file: PikaMath.py
    analyzing file: PikaStdDevice.py
    analyzing file: PikaDebug.py
    analyzing file: PikaStdData.py
    api-make-win10.sh: 2: ./rust-msc-latest-win10.exe: Exec format error
    make.sh: 2: cd: can't cd to build
    make: *** No targets specified and no makefile found.  Stop.
    
    opened by maxgerhardt 3
  • PikaScript, ESP32C3,LittleFS, Compile and write to FS every boot?

    PikaScript, ESP32C3,LittleFS, Compile and write to FS every boot?

    Hello. I am running pikascript on the esp32C3, i am using LittleFS. when i run the python code with pikaVM_runSingleFile(), no Problem. When i run python code that import other python file, using pikaVM_runFile(), the code run ok, but seem like pikascript is compiling the code and saving in the filesystem in every boot, this is not so good for the flash memory. There are some way to solve this? i see in the docs, that we can use the py.o files or the pikaModules.py.a file, but i don't figure out how to use it.

    Thanks in advance if you can point me in the right direction.

    my code ...

    #test.py
    import app
    import loop
    
    print("test")
    
    #loop.py
    for i in range(1,10):
        print("Hola",i)
    
    #app.py
    print("Hola MassLink")
    print(6+5)
    
    //main.c
    /*
     * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
     *
     * SPDX-License-Identifier: CC0-1.0
     */
    
    #include <stdio.h>
    
    #include "freertos/FreeRTOS.h"
    #include "freertos/task.h"
    
    #include "esp_log.h"
    #include "esp_littlefs.h"
    #include "dirent.h"
    
    #include "driver/uart.h"
    
    #include "pikaScript.h"
    #include "PikaVM.h"
    
    
    
    static const char *TAG = "MassLink";
    
    FILE* __platform_fopen(const char* filename, const char* modes){
        return fopen(filename, modes);
    }
    
    int __platform_fclose(FILE* stream){
        return fclose(stream);
    }
    
    size_t __platform_fwrite(const void* ptr, size_t size, size_t n, FILE* stream){
        return fwrite(ptr, size, n, stream);
    }
    
    size_t __platform_fread(void* ptr, size_t size, size_t n, FILE* stream){
        return fread(ptr, size, n, stream);
    }
    
    char __platform_getchar()
    {
        char data = 0xff;
        do
        {
            vTaskDelay(1);
            data = getchar();
        } while (data == 0xff);
        return data;
    }
    
    void app_main(void)
    {
        ESP_LOGI(TAG, "Initializing LITTLEFS");
    
        esp_vfs_littlefs_conf_t conf = {
                .base_path = "/fs",
                .partition_label = "storage",
                .format_if_mount_failed = true,
                .dont_mount = false,
        };
        
        // Use settings defined above to initialize and mount LittleFS filesystem.
        // Note: esp_vfs_littlefs_register is an all-in-one convenience function.
        esp_err_t ret = esp_vfs_littlefs_register(&conf);
    
        if (ret != ESP_OK) {
            if (ret == ESP_FAIL) {
                ESP_LOGE(TAG, "Failed to mount or format filesystem");
            } else if (ret == ESP_ERR_NOT_FOUND) {
                ESP_LOGE(TAG, "Failed to find SPIFFS partition");
            } else {
                ESP_LOGE(TAG, "Failed to initialize SPIFFS (%s)", esp_err_to_name(ret));
            }
            return;
        }
    
    
        size_t total = 0, used = 0;
        ret = esp_littlefs_info(conf.partition_label, &total, &used);
        if (ret != ESP_OK)
        {
                ESP_LOGE(TAG, "Failed to get LittleFS partition information (%s)", esp_err_to_name(ret));
        }
        else
        {
                ESP_LOGI(TAG, "Partition size: total: %d, used: %d", total, used);
        }
    
    #
        
    
        // Use POSIX and C standard library functions to work with files.
        
        
        
        PikaObj *pikaMain;
        pikaMain = newRootObj("pikaMain", New_PikaMain);
        
        pikaVM_runSingleFile(pikaMain, "loop.py");
        pikaVM_runSingleFile(pikaMain, "app.py");
    
        pikaVM_runFile(pikaMain, "test.py");
    
        
        // All done, unmount partition and disable LITTLEFS
        esp_vfs_littlefs_unregister(conf.partition_label);
        ESP_LOGI(TAG, "LITTLEFS unmounted");
    
    
        pikaScriptShell(pikaScriptInit());
    }
    

    // this is the output of the monitor

    I (304) MassLink: Initializing LITTLEFS
    I (321) MassLink: Partition size: total: 1048576, used: 20480
    Hola 1
    Hola 2
    Hola 3
    Hola 4
    Hola 5
    Hola 6
    Hola 7
    Hola 8
    Hola 9
    Hola MassLink
    11
    (pikascript) pika compiler:
      compiling test.py...
      compiling loop.py...
      compiling app.py...
      linking /fs/pikascript-api/pikaModules_cache.py.a...
      loading pikaModules_cache_py_a[]...
    (pikascript) all succeed.
    
    Hola MassLink
    11
    Hola 1
    Hola 2
    Hola 3
    Hola 4
    Hola 5
    Hola 6
    Hola 7
    Hola 8
    Hola 9
    test
    I (948) MassLink: LITTLEFS unmounted
    ======[pikascript packages installed]======
    pikascript-core==v1.11.6 (2022/10/28 14:38:46)
    ESP32==v0.1.0
    PikaStdDevice==v1.11.0
    PikaStdLib==v1.11.6
    ===========================================
    hello PikaScript!
    mem used max:
    3.18 kB
    >>> 
    
    opened by laldana73 2
  • ESP32 GPIO

    ESP32 GPIO

    Thanks for your awesome pikascript. I am Testing with an esp32c3. pikascript is running... i have the pikascript shell, but i don't find how to turn on a GPIO pin. is this functionality already implemented? i am trying ... io1 = ESP32.GPIO() io1.setPin('5') here i have to put a string io1.setMode('out)

    here trow an error [error] no match gpio port.

    is GPIO implemented for ESP32? or do i have to implement the functionality?

    Thanks Again. Great Project

    opened by laldana73 2
  • v1.12

    v1.12

    Language

    • [x] #222
    • [x] #202
    • [x] #271
    • [x] #270
    • [x] #224
    • [x] #225
    • [x] #226
    • [x] #261
    • [x] #263
    • [x] #264
    • [x] #265
    • [x] #266
    • [x] #267
    • [x] #268
    • [x] #269
    • [x] #275
    • [x] #276
    • [x] #277
    • [x] #281
    • [x] #280

    Lib

    • [x] #223
    • [x] #228
    • [x] #262
    • [x] #272
    • [x] #278

    Bug Fix

    • [x] #220
    • [x] #221
    • [x] #229
    • [x] #282
    good first issue 
    opened by pikasTech 0
  • W806工程的UART 1连接后FreeRTOS崩溃,出现CPU Exception 49错误

    W806工程的UART 1连接后FreeRTOS崩溃,出现CPU Exception 49错误

    error 我使用的是合宇Air103的开发板,兼容W806工程。在测试UART功能时,发现若将GPS模块或者TTL连接至开发板的UART 1(PA_06和PA_07)后开发板复位后会出现CPU Exception 49错误无法启动,错误信息如上图,且板载的UART接口目前只有id为1可用,其他UART接口均无响应。程序如下图(同pika Document中2.2.6.2节UART Demo程序) program

    opened by Kaiserreich-UnOfficial 3
Releases(v1.11.0)
  • v1.11.0(Sep 16, 2022)

    Language

    1. Support is keyword #188
    2. Support in keyword #189
    3. Support assert keyword #190
    4. Support Defalut Function parameters #170
    5. Support method for basic type like int, str #183
    6. support multiline calls like foo(a, \n b) #197
    7. support add(), sub() magic method #198
    8. floating point numbers expressed in scientific notation #217
    9. Support multi value return and multi value assign #200
    10. can a dead-loop python program add an exit interface #201
    11. Support keyword parameters #207
    12. Support if a in list and if a in dict #208
    13. Support super() #209
    14. Support slice for list #210
    15. Support for k,v in d.items #213
    16. Support int64 type hint for c module #214
    17. Exit when error occord #215
    18. exception for slicing strings containing Chinese #218

    Library

    1. support exec() builtin #193
    2. support dir() builtin #194
    3. Support getattr() and setattr() builtin #195
    4. Support range(a) and range(a, b, c) #216

    Bug Fix

    1. Bug: try ... except for dict no attr not work #204
    2. parse problem #187
    3. unspecified member variables in a list, tuple, or dictionary cause
    4. Support void line and no new line for obj_run() #196
    Source code(tar.gz)
    Source code(zip)
    pikascript_template_v1.11.0.zip(8.91 MB)
  • v1.10.0(Aug 5, 2022)

    Feature Updates:

    Performance

    • Speed increase up to 78%

    Language

    • Support "try ... exception" #169

    • Support 0bxxx #171

    • Support function chain like < String('test').split('t') > #172

    • Support slice nesting like < a = x[ y[ z ] ] > #173

    • Support slice chain like < a[x][y] > #174

    • Support < fun()[x] > #177

    • Support Tuple literal #178

    • Support bind .pyi from other *.py expect main.py #180

    • Support <del> keyword https://gitee.com/Lyon1998/pikascript/issues/I5KDES

    Library

    • Support binascii module #176
    • Support open() builtin #181
    • Support sleep() for windows and linux #186

    Bug fix:

    • Bug: print(None) return other string #175
    • Bug: For loop error inner loop after continue #179
    • Bug: stack error when arg size > int16_t #185
    • Some python operators operate incorrectly or do not meet expectations https://gitee.com/Lyon1998/pikascript/issues/I5JN75
    • The output for in [dict] is incorrect https://gitee.com/Lyon1998/pikascript/issues/I5JWSR

    Incompatible updates:

    • The order of the entry parameters for the .pyi-generated function has changed

    Migration Guide:

    • Update the order of the entry parameters in C module.
    Source code(tar.gz)
    Source code(zip)
    pikascript_template_v1.10.0.zip(8.82 MB)
  • v1.9.0(Jul 1, 2022)

    Overview

    This is the most trustworthy version of PikaScript to date, one that has received a lot of feedback from real-world engineering and offers a lot of practical improvements and bug fixes.

    Feature Updates:

    Language

    1. Support [] index for bytes #123
    2. Support __str__ magic method for print() and str() #127
    3. Support __len__ magic method for len()
    4. Support 0o100 Octal literal #130
    5. Support Tab in python script #132
    6. check overflow for pika VM #135
    7. Support void line in function define in *.py for preCompiler #138
    8. Support define Function in C Module #144
    9. Support __del__() magic method for C Module #147
    10. Support class property #150
    11. Support call back in other python files #152
    12. Support <None> #153
    13. Support virtual interrupt and callback #110
    14. Support use \ to combine multiline
    15. Support get Kernal Version #156
    16. Support d = {'a':x, 'b':y, 'c':z} #165
    17. Support obj_runChar() to push char to REPL #133
    18. Support slice for string and bytes #121

    Library

    1. Support read/writeBytes API for StdDevice #125
    2. Add TemplateDevice to test StdDevice and supply reference demo #126
    3. Support chr(), hex(), ord(), id() builtin #128
    4. Support bytes() builtin #131
    5. Support int() for bytes like: < int(b'test'[0]) > #134
    6. Support int_to_bytes() transfer #137
    7. Support unix-time and utc-time for PikaStdDevice.Time() #146
    8. Support format and variable pars for printf() #149
    9. Support callback for PikaStdDevice #151

    Bug Fix:

    1. Error in __user_free on ac5. #114
    2. pre-compiler need two void line in end #113
    3. fix bytecode align error on M1 core #129
    4. fix parse faild when meet some comments #166
    5. fix parse issue when met xx_import #164
    6. '~-1' is not equal '0' #163
    7. a[1] = 1 not work inner function() #155
    8. for_loop runError in module #145
    9. parse error when '[' inner the string #140
    10. memory leak when < str(PikaStdData.String('test')) > #141
    11. can not run function import from anothor module #142
    12. Bluepill template built with arm-gcc does not fit 128K Flash #139
    13. Lexer Error if the end of line is . #136
    14. Exception output when creating PikaStdDevice.Time() #143

    Incompatible updates:

    Use double in C while float in python #148

    Migration Guide:

    Use double in C Module.

    Source code(tar.gz)
    Source code(zip)
    pikascript_template_v1.9.0.zip(8.80 MB)
  • v1.8.0(May 16, 2022)

    Feature Updates:

    1. Support pc-side python files are compiled into bytecode and packaged into firmware, and multi-python files are supported (no file system required).
    2. Memory management uses reference counting and supports factory methods.
    3. A comprehensive troubleshooting of memory hazards was carried out using valgrind.

    Feature Interpretation Video:

    https://www.bilibili.com/video/BV14t4y1x7nv

    Incompatible updates:

    The python declaration file suffix of the C module is modified from .py to .pyi, and the syntax content remains unchanged.

    Migration Guide:

    Modify the .py file suffix of the C module to .pyi.

    Source code(tar.gz)
    Source code(zip)
    pikascript_template.zip(8.78 MB)
  • v1.7.0(Apr 22, 2022)

    1. use self in py method declarations in C modules to better support pylance smart hints.
    2. Support for defining functions in REPL.
    3. Support defining classes in REPL. 4.
    4. enhance the stability of REPL, enhance the error prompting.
    5. support built-in mode for list and dict (requires configuration).
    6. Add ctypes module to provide cpython-like ctypes compatibility.
    7. support import as, from import, from import as syntax in scripts.
    8. Enhance the stability of pre-compiler and fix some bugs.
    9. support bytes basic data type.
    10. support s = '\x33\x44' literal value escaping.
    11. Support b = b'\0x00\x03\x04' to create bytes variables.

    image

    Source code(tar.gz)
    Source code(zip)
    pikascript_template_v1.7.0.zip(7.17 MB)
  • v1.2.0(Nov 3, 2021)

  • v0.8.1(Sep 29, 2021)

  • v0.7.6(Sep 26, 2021)

  • v0.7.5(Sep 22, 2021)

  • v0.7.4(Sep 18, 2021)

  • v0.7.3(Sep 13, 2021)

  • v0.7.2(Sep 12, 2021)

  • v0.7.1(Sep 8, 2021)

  • v0.7.0(Sep 5, 2021)

  • v0.6.0(Aug 31, 2021)

  • v0.5.0(Aug 25, 2021)

  • v0.4.0(Aug 23, 2021)

  • v0.3.0(Aug 22, 2021)

  • v0.2.0(Aug 17, 2021)

  • v0.1.1(Aug 11, 2021)

  • v0.0.1(Aug 4, 2021)

The pico can be used to program other devices. Raspberry pi made such an effort. However there is no board yet, that is open-source and can be used with OpenOCD as a general-purpose programmer

pico-probe-programmer The pico can be used to program other devices. Raspberry pi made such an effort. However there is no board yet, that is open-sou

martijn 22 Oct 15, 2022
Python Standalone Deploy Environment

PyStand Python 独立部署环境。Python 3.5 以后,Windows 下面都有一个 Embedded Python 的 独立 Python 运行环境,这个 PyStand 就是配合 Embedded Python 使用的。

Linwei 207 Dec 26, 2022
Jimp-native is a fast C++ re-implementation of Jimp with zero system dependencies and minimal overhead!

Jimp native Make your sever-side Jimp code run 10x faster! Jimp-native is a fast C++ re-implementation of Jimp with zero system dependencies and minim

Sjoerd 17 Oct 10, 2022
A zero-configuration fan daemon for ThinkPads

zcfan Zero-configuration fan control daemon for ThinkPads. Features Extremely small (~250 lines), simple, and easy to understand code Sensible out of

Chris Down 25 Dec 23, 2022
Rampin - Try to make Windows preload files into RAM by memory mapping and touching them.

rampin A small C program to try keep a file or few in Windows RAM cache. For a Unix (not only Linux) alternative see vmtouch. Takes one or more filena

Błażej Roszkowski 1 Apr 11, 2022
BladeBit - Fast Chia (XCH) RAM-only k32-only Plotter

BladeBit Chia Plotter A fast RAM-only, k32-only, Chia plotter. Requirements 416 GiB of RAM are required to run it, plus a few more megabytes for stack

Harold Brenes 237 Dec 12, 2022
An embedded CAN bus sniffer which is able to monitor any of the vehicle internal CAN bus and perform some action by triggering new CAN messages.

An embedded CAN bus sniffer which is able to monitor any of the vehicle internal CAN bus and perform some action by triggering new CAN messages. In this way certain vehicle functionality can be triggered by responding to custom steering wheel button events, or use the vehicle virtual cockpit to display OBD-PIDs values instead of relying on an external display to present new information to the user

null 18 Dec 28, 2022
This Program Enables And Disables Hyper-V Hypervisor So You Can Use Other Virtualisation Tools Such As (VMware, VirtualBox) Simultaneously.

Hyper-V-Switch This Program Enables And Disables Hyper-V Hypervisor So You Can Use Other Virtualisation Tools Such As (VMware, VirtualBox) Simultaneou

RaynerSec 4 Nov 10, 2022
oZKS (Ordered Zero-Knowledge Set) is a library that provides an implementation of an Ordered (and Append Only) Zero-Knowledge Set.

Ordered Zero-Knowledge Set - oZKS Introduction oZKS is a library that provides an implementation of an Ordered (and Append Only) Zero Knowledge Set. A

Microsoft 11 Dec 20, 2022
mCube's ultra-low-power wake-on-motion 3-axis accelerometer

MC3635 mCube's ultra-low-power wake-on-motion 3-axis accelerometer Based on mCube's Arduino demo driver, this sketch is specific for the MC3635 3-axis

Kris Winer 4 Aug 26, 2022
A couple of demos showing how to use the Ultra Low Power coprocessor on the ESP32

ESP32 Ultra Low Power (ULP) coprocessor You can watch a video explanation of this code here This repo contains two demo project: ulp-gpio Shows you ho

atomic14 8 Nov 9, 2022
A python library to run metal compute kernels on MacOS

metalcompute for Python A python library to run metal compute kernels on MacOS Usage Example execution from M1-based Mac running MacOS 12.0: > ./build

Andrew Baldwin 21 Nov 7, 2022
A diagnostic program that can be run on a SEGA Naomi system

naomidiag A diagnostic program that can be run on a SEGA Naomi system. Aims to provide basic diagnostic functionality for calibrating your CRT, testin

Jennifer Taylor 5 Feb 6, 2022
Template for C++ GUI apps that can run in the browser

GGWeb Template for making a GUI app with C++ / Dear ImGui / SDL / OpenGL / Emscripten that can run both natively and in the browser. Example: https://

Georgi Gerganov 26 Dec 20, 2022
sampctl-runner: Easy way to build and run package..

sampctl-runner Easy way to build and run package.. Usage Just enter the name of the repository from pawn.json and let the program do other things.. Ex

Emmett 1 Apr 17, 2022
Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Pavel Stehule 1.9k Jan 4, 2023
A set of very empty header files that can be used when building apps with Cosmopolitan

cosmo-include A set of very empty header files that can be used when building apps with Cosmopolitan Why? When you build an application with Cosmopoli

null 26 Dec 21, 2022
Sokoban written in C using VIM in Termux. A very easy game

Ncurses Sokoban Installation and how to use apt update apt install git git clone https://github.com/JyanJohn/sokoban cd sokoban make ./soko

Jyan 2 Nov 15, 2021