Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support multiple build env variations. #493

Open
cavearr opened this issue Dec 12, 2024 · 6 comments
Open

[Feature Request] Support multiple build env variations. #493

cavearr opened this issue Dec 12, 2024 · 6 comments
Assignees

Comments

@cavearr
Copy link
Member

cavearr commented Dec 12, 2024

@zapta, @Obijuan this is a suggestion for improve tha Apio ini file:

Add the ability in Apio.ini of add defines to use into verilog files.

For example:

[env]
board = Sipeed-Tang-Nano-1k
top-module = main
defines =
-KEY1=VALUE1
-KEY2=VALUE2

This defines will be passed as yosys argument with -D option.

In other hand could be interesting the capability of passing defines in build command as argument for example:

apio build --defines KEY1=VALUE1,KEY2=VALUE2

In other way we could define multiple target boards to use the same file for multiple targets, for example:

[env]
board = Sipeed-Tang-Nano-1k
top-module = main

[env:Alhambra-ii]
defines =
-myBoard=ALHAMBRA

[env:Fomu]
defines =
-myBoard=FOMU
-LED=RGB

We could do :

apio build => This only will apply env block

or

apio buils --env Fomu. => This will apply env + env:Fomu blocks

@JohannesSchramm
Copy link

I like the proposed ideas, it is similar to the ini file from platformio, which i use quite a lot.

I would also like to see a testbench argument that could be used instead of the --testbench option on the command line.

E.g.

testbench = top_tb.v

@zapta
Copy link
Collaborator

zapta commented Dec 12, 2024

@cavearr, @JohannesSchramm, these are very good ideas and in the spirit of platformio. The next step is making apio.ini required and the central source of project configuration, eliminating the configuration flags such as --board and --fpga. This will make adding new project controls much more maintainable.

@cavearr, this is related to item 2 here #453. Any news related to items 2-5?

@cavearr
Copy link
Member Author

cavearr commented Dec 12, 2024

Hi @zapta today or tomorrow i'm finishing icestudio integration and testing and we could remove the flags.

About the config file i could do it if you have other tasks , count with me, if we decide go in this way i'm advance in Icestudio part to have an apio.ini editor to customize the apio.ini for icestudio projects.

Let's go team!

@zapta
Copy link
Collaborator

zapta commented Dec 12, 2024

Hi @cavearr, I can do it and already have a pending change for part of the works but am waiting for OK from you for items 2-5.

@zapta
Copy link
Collaborator

zapta commented Dec 23, 2024

@cavearr

  1. Please ignored my previous post. I was referring to a different feature.
  2. Please rename this issue to [Feature Request] Support multiple build env variations.

@cavearr cavearr changed the title [For discussion] Improvements Apio.ini [Feature Request] Support multiple build env variations. Dec 23, 2024
@cavearr
Copy link
Member Author

cavearr commented Dec 23, 2024

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants