8.2. How to contribute to PikaScript BSP
8.2.1. Steps to make BSP:
8.2.1.1. Make pikascript template project
The BSP of pikascript is very simple, it is a pikascript template project that can be compiled independently.
This project only needs to be able to run pikascript basically.
You can refer to the New Platform Porting Guide to ensure that
print('hello PikaScript!')
in main.py can be run normally.
8.2.1.2. Clean up project
Clean up compiled products, leaving only project files and source code. (The compilation products include intermediate files .o .d , binary products .bin, .hex , executable files .exe , etc.).
Clean up the auto-pull and auto-generate codes in the pikascript folder. Only the main.py, requsetment.txt, and pikaPackage.exe files can be kept in the pikascript folder.
Clean up unused source code and libraries, and control the size of the project to within 50MB. If the size of the project is still larger than 50MB after cleaning, you can create a new special warehouse to place the BSP, and only place a README.md containing a link to the special warehouse in pikscript/bsp.
8.2.1.3. Submit file
- Enter the pikascript code repository, either gitee or github, fork a pikascript repository, and then clone the forked repository locally.
- Create a new folder in the [repository after fork]/bsp directory, then copy it into the template project, use the git command to add files, and push it to the pikascript repository after fork.
cd pikascript/bsp
git add *
git commit -m 'add bsp'
git push
(Optional) Update BSP information in pikascript/README.md and pikascript/README_zh.md.
Open Pull Request and wait for merge.