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

Migrate IceStudion from --board and --top-module flags to apio.ini #769

Open
zapta opened this issue Sep 22, 2024 · 7 comments
Open

Migrate IceStudion from --board and --top-module flags to apio.ini #769

zapta opened this issue Sep 22, 2024 · 7 comments

Comments

@zapta
Copy link

zapta commented Sep 22, 2024

Background: When IceStudio invokes apio commands it passes the project configuration using the flags --board and --top-module. These flags has been deprecated and may be deleted in future releases of apio, and the recommended way to convey the project configuration to apio is via a platformio like file called apio.ini file that looks like this:

[env]
board = icezum
top-model = main

This issue is for migrating IceStudio from flags based configuration to apio.ini based configuration. Implementation wise, IceStudio can maintain a stable apio.ini file with the latest project configuration or create an apio.ini from scratch on each invocation, for example by the apio create command.

For example, with the latter approach, the command

apio build --board icezum --top-module main

can be translated to this command sequence

apio create --board icezum --top-module main  --sayyes
apio build

Most likely, this will be a local change in the function apioRun.

function apioRun(commands, startMessage, endMessage) {

@cavearr
Copy link
Member

cavearr commented Sep 22, 2024

thanks @zapta i'm refactoring the toolchain module of Icestudio and i'm taking in mind your improvements in apio. In the next weeks i'm releasing it and this change in your way.

I'm maintain this thread open to check when the change will be done in Icestudio.

Thanks again!

@zapta
Copy link
Author

zapta commented Sep 22, 2024

Thanks @cavearr.

Please be aware of the upcoming changes in apio, the command 'apio init' is going to be replaced in the next release with 'apio create' and 'apio modify'.

If you migrate IceStudio before the next apio release, it may be easier for IceStudio to create apio.ini directly as a text file rather than using apio commands. This approach is clean and supported since apio.ini is intended to be maintained and edited by users and compatible with future apio releases.

@cavearr
Copy link
Member

cavearr commented Sep 22, 2024

Yes, this is the idea, to create apio.init i'm telling you to check it!

@zapta
Copy link
Author

zapta commented Sep 22, 2024

On a second thought, IceStudio writing directly apio.ini is preferred over using apio create because it will allow IceStudio do use down the road apio.ini vars that are not supported by apio create.

@zapta
Copy link
Author

zapta commented Sep 22, 2024

Hi @cavearr, some considerations regarding apio.ini mutations and apio make dependencies:

Currently apio doesn't track dependencies correctly. For example if the user builds, then modifies the board in apio.ini, and then upload, the upload does not rebuild for the new board. Same with the existing IceStudio unless if you run apio clean each time the user changes the board.

This can be fixed in apio by adding apio.ini as a dependency to apio commands such as build, assuming that IceStudio will write apio.ini only when it's really changes, to avoid unnecessary rebuilds.

In any case, I am not sure how you plan to migrate IceStudio to use apio.in but whatever you do we will make apio to handle it gracefully.

@cavearr
Copy link
Member

cavearr commented Sep 23, 2024

Hi @zapta ,i'm very happy to see your implication with apio , go ahead!!!

My plan is using all your advances in the integration with Icestudio. I'm now decoupling the toolchain mechanics to do more flexible in general.

@zapta
Copy link
Author

zapta commented Sep 23, 2024 via email

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

2 participants