FPGAwars / apio

:seedling: Open source ecosystem for open FPGA boards
https://github.com/FPGAwars/apio/wiki
GNU General Public License v2.0
801 stars 137 forks source link

[Feature Request] Provide a 'create a new project' functionality. #419

Open zapta opened 1 month ago

zapta commented 1 month ago

Platformio has the command pio project create that creates a complete and buildable skeletal hello world project. https://docs.platformio.org/en/latest/core/userguide/project/cmd_init.html .

Apio on the other hand has the command apio create that creates just an apio.ini file and theapio examples command that creates a non skeletal project and requires the user to manually select the example.

This feature request is for a command that accepts creates a full skeletal project for a given board. For example

apio new --board icezum

or

apio examples --board icezuum --new_project

Implementation wise, the new project can be added to the apio_examples repo as examples with the reserved name new_projects and for boards that don't have a new_project example, their definition can include new_project = <example-name> to indicate the example to use.

zapta commented 1 week ago

This can be an extension of the new 'apio create' command, and the startup project can be an adaption of the existing 'template' examples.

$ apio examples --list | grep -i template
Alhambra-II/Template                    |  Project template for the Alhambra-II board
EDU-CIAA-FPGA/Template                  |  Project template for the EDU-CIAA-FPGA board
go-board/template                       |  Project template for the Nandland go-board
icestick/template                       |  Project template for the icestick board
icezum/Marcha-Imperial                  |  Project template for the icezum board
icezum/template                         |  Project template for the icezum board
icoboard/template                       |  Project template for the icoboard board
kefir/template                          |  Project template for the Kéfir I board
TinyFPGA-B2/template                    |  Project template for the TinyFPGA-B2 board
TinyFPGA-BX/template                    |  Project template for the TinyFPGA-BX board