Creating a custom board in icestudio

103 views
Skip to first unread message

Rob Holmes

unread,
Feb 3, 2025, 10:46:50 AM2/3/25
to FPGAwars: explorando el lado libre
Hi all,

I'm finally have some time to get back to my project, however i after upgrading icestudio etc i have lost my custom board.

Do i still need to:
  1. fork APIO to add my custom board
  2. and then add the json files to  \icestudio\package.nw\resources\boards

Wondering if there is an easier way since its a year since i last did this.

Thankyou as always.

charli va

unread,
Feb 3, 2025, 11:01:59 AM2/3/25
to fpga-wars-explora...@googlegroups.com
Hi Rob, in next days, you could define your own folders for your own boards, and in much cases you don't need to integrate in apio if you wan't, we are working a lot for putting a lot of new features ready as soon as possible. 

for the moment if you have hurry to start, you could do some things:

1) If you want to integrage in APIO, you could do it now working in your own folder  (always in develop branch). Check the DEVELOPER.md file at https://github.com/FPGAwars/apio we are working a lot to upgrade it and now have a lot of new features (develop branch) feel free to ask in the issues tab at github if you have any doubt.

2) If you want to integrate in Icestudio for the moment you need to integrate first in APIO (step 1), then if we don't release the custom folder  feature at this moment, you could do a link from  boards folder into icestudio package to your own folder (copying the icestudio files in this folder first) in osx or linux with the command ln -s....


If you hace any dout feel free to ask us.



--
Has recibido este mensaje porque estás suscrito al grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Para ver este debate, visita https://groups.google.com/d/msgid/fpga-wars-explorando-el-lado-libre/c547349c-bf3a-4294-a978-5aaebe004fb7n%40googlegroups.com.

Rob Holmes

unread,
Feb 3, 2025, 12:50:25 PM2/3/25
to fpga-wars-explora...@googlegroups.com
Thankyou for the reply, much appreciated.

Ive done it the old way for now:

Adding my notes here as i always forget and have to figure it out each time, and at least ill be able to look back at this thread :)

1.  git clone https://github.com/FPGAwars/apio.git

2.  add board definition to apio/resources/boards.jsonc

3.  commit and push the fork to personal github

4. Copy boards folder (info.json, pinout.json rules.json etc) to \icestudio\package.nw\resources\boards\myboardname

5.  Edit \icestudio\package.nw\resources\boards\menu.json and add board.

6. Install apio from personal fork  pip3 install -U git+https://github.com/myrepo/apio.git@develop#egg=apio







Has recibido este mensaje porque estás suscrito a un tema del grupo "FPGAwars: explorando el lado libre" de Grupos de Google.
Para cancelar la suscripción a este tema, visita https://groups.google.com/d/topic/fpga-wars-explorando-el-lado-libre/ecfI4FoIo_0/unsubscribe.
Para cancelar la suscripción a este grupo y a todos sus temas, envía un correo electrónico a fpga-wars-explorando-el...@googlegroups.com.
Para ver este debate, visita https://groups.google.com/d/msgid/fpga-wars-explorando-el-lado-libre/CAEQ-VCb9mdRe30o3HM9Ls4e3d7R5_nU158e2hYpYQyrJg4Qmew%40mail.gmail.com.

charli va

unread,
Feb 3, 2025, 1:27:55 PM2/3/25
to fpga-wars-explora...@googlegroups.com
Hi Rob!, i recomended you to use develop branch of apio, very soon, we release the new stable from there and you obtain the last yosys toolbox and the latest features of apio that changes a lot.

Now you could develop your integration working in your own directory you only need to put board.jsonc in your folder together your apio.ini folder and when all works in apio, if you want to put for other users, and integrate in icestudio, you move to apio/resources/boards.jsonc and other stuff and make a PR but you could work completely in your folder (soon in icestudio too).

Here you have detailed info about developing apio https://github.com/FPGAwars/apio/blob/develop/DEVELOPERS.md

And if you want to see all new commands https://github.com/FPGAwars/apio/blob/develop/COMMANDS.md

If you want read this thread in which we discuss this issue:  https://github.com/FPGAwars/apio/issues/384 and comment if you need.

Have a nice day!

Rob Holmes

unread,
Feb 3, 2025, 3:02:47 PM2/3/25
to fpga-wars-explora...@googlegroups.com

Rob Holmes

unread,
Feb 4, 2025, 4:39:46 AM2/4/25
to fpga-wars-explora...@googlegroups.com
Ok, run into an issue trying install the development toolchain.. works fine with stable but with develop i get the below errors and when trying to verify i get

No such command Verify.

Any guidance would be appreciated.

image.png

Rob Holmes

unread,
Feb 4, 2025, 4:49:32 AM2/4/25
to fpga-wars-explora...@googlegroups.com
Apologies, it works with the WIP version of icestudio

Democrito

unread,
Feb 4, 2025, 6:01:26 AM2/4/25
to FPGAwars: explorando el lado libre
To work with the development version you need to have “Git” installed, I will tell you this in case you don’t have it installed.

Democrito

unread,
Feb 4, 2025, 6:02:48 AM2/4/25
to FPGAwars: explorando el lado libre
Sorry, I didn't notice the last message. So we understand that it works for you now.

Rob Holmes

unread,
Feb 4, 2025, 6:12:39 AM2/4/25
to fpga-wars-explora...@googlegroups.com
Thankyou for your continued assistance, its greatly appreciated.

Im struggling a bit with the following message, when verifying or trying to build..

image.png

there is a file called apio.ini in what is assume is the project directory with the following contents.

image.png
my board.jsonc file is as follows

image.png

Probably doing something silly here, just cant spot it


Democrito

unread,
Feb 4, 2025, 7:10:47 AM2/4/25
to FPGAwars: explorando el lado libre
Sometimes this error appears only once and when you hit "build" or "upload" again, it usually works fine.

If the error persists, you should wait for @Charliva to answer you because he knows these things well.

Rob Holmes

unread,
Feb 4, 2025, 7:14:42 AM2/4/25
to fpga-wars-explora...@googlegroups.com
Thankyou,  iv'e been trying repeatedly all morning and not managed to get past this sadly.

beni...@gmail.com

unread,
Feb 4, 2025, 7:49:59 AM2/4/25
to FPGAwars: explorando el lado libre
Democrito,  Why does the error appear only once?
It only happens to me immediately after I select the board in the first synthesis. Later it works perfectly.

Thanks 
Fernando 

charli va

unread,
Feb 4, 2025, 8:04:01 AM2/4/25
to fpga-wars-explora...@googlegroups.com
Hi team! this error should be fixed in the next wip, but in the case of Rob could be other thing because he is trying a new feature that we are deploying in the new version of apio (a lot of changes are comming :). ). that consists in integrate boards without needed to put inside apio , now you could define the boards.json or boards.jsonc (if you use jsonc you could comment the json file, jsonc is "json with comments") and we never try it in icestudio  because is something newer in Apio (we work in it in Apio  two weeks ago).

Rob could you send us your board.jsonc and your ,.ice to try to replicate in my environment and detect the possible problem?

 in other way your path contains spaces? if contains spaces apio not work well for the moment you need to use a path without spaces (there are some new tools in the oss cad suite that don't support spaces).

Thanks !

Rob Holmes

unread,
Feb 4, 2025, 8:16:52 AM2/4/25
to fpga-wars-explora...@googlegroups.com
ips.zip

Rob Holmes

unread,
Feb 4, 2025, 8:24:21 AM2/4/25
to fpga-wars-explora...@googlegroups.com
I was unsure of the naming convention boards.jsonc vs board.jsonc, but ive tried both. 

Its not immediate but if i remove apio.ini i get the following

"D:\.icestudio\venv\Scripts\apio.exe" create --board iCE40-VGA-IPS -p "D:\development\fpga\ips\ice-build\ips"

Active env options [APIO_HOME_DIR].
Error: No such board 'iCE40-VGA-IPS'
Run 'apio boards' for the list of board names.

Once i add it back i get

"D:\.icestudio\venv\Scripts\apio.exe" build --verbose-pnr -p "D:\development\fpga\ips\ice-build\ips"

Active env options [APIO_HOME_DIR].
Error: Missing project file apio.ini.



Rob Holmes

unread,
Feb 4, 2025, 11:22:34 AM2/4/25
to fpga-wars-explora...@googlegroups.com
@Charliva   Also just noticed something....

Its looking for the apio.ini file in a location i wasnt expecting... and with a capital A.. might both be red herrings but in case its not..

image.png

spotted after i changed this line to output where it was looking for it.

image.png

charli va

unread,
Feb 4, 2025, 11:29:03 AM2/4/25
to fpga-wars-explora...@googlegroups.com
Hi Rob! yes this is a bug, i'm preparing a new wip for this afternoon and this will be fixed,  thanks for review it!

In other way i'm looking for your problem, you are the first user that use this new feature to integrate a board :) sorry  but you will be our lab rabbit ;)

The problem is for the FPGA, your model is not well integrated in Apio yet, but don't worry i'm trying to fix in short, tell you soon.



charli va

unread,
Feb 4, 2025, 11:48:54 AM2/4/25
to fpga-wars-explora...@googlegroups.com
Hi Rob, i'm telling you, is working now.

First you could use apio commands if you have setup your apio for use in terminal.

All works only with apio dev ok?

The problem will be for the name of the fpga, Apio needs to idenfitfy with concise literal. You could view all the supported chips with the commando:

$> apio fpgas

The output is for example:
Captura de pantalla 2025-02-04 a las 17.32.40.png

in our case we need the literal for your fpga iCE40-LP1K-CB121 that in apio is ice40lp1k-cb121. and should be lowercase exactly like in FPGA-ID column.

Changing this in your boards.jsonc (this is important, you need to rename to boards.jsonc in plural):

Captura de pantalla 2025-02-04 a las 17.35.45.png

and if now you do the command for example $> apio lint    
Captura de pantalla 2025-02-04 a las 17.36.13.png

You have a correct output, it's wrong because now we are trying to work in the folder where you put apio.ini file by hand and there are no code (apio works with verilog not with .ice files), and in this moment apio not found any verilog fail and so on no main module.

For trying if we are going in the best way, we could copy the main.v and main.pcf file generated by your icestudio in ice-build folder (copy at the root folder), and then execute for example apio lint again :

Captura de pantalla 2025-02-04 a las 17.41.54.png

All works!!!

now if you try in your copy of icestudio with your definition icestudio   should create the apio.ini file and in this place copy your boards.jsonc and then the commands should be work.

How you are with this i'll move some tasks to do now, i'll try to deploy the support for integrating new boards in Icestudio this days and if you want you could help us to test it, count with you? 😉

Have a nive afternoon!

Rob Holmes

unread,
Feb 4, 2025, 12:02:26 PM2/4/25
to fpga-wars-explora...@googlegroups.com
Thankyou very much for the time, happy to test at any time.

Ah, apologies i missed that the format of the FPGA had changed to lowercase, its been a year since i last looked at the project and as it used to work i assumed incorrectly that the format was correct.

Not sure if this a sound workaround for me for now, but moving apio.ini and boards.jsonc into the ice-build folder has allowed a build to run...


image.png




charli va

unread,
Feb 4, 2025, 12:11:01 PM2/4/25
to fpga-wars-explora...@googlegroups.com
yes all is correct!! you could view the apio output from icestudio from here:

Captura de pantalla 2025-02-04 a las 18.09.43.png

Tell us your next steps! i'm telling you in the next days when i have ready the new panels in Icestudio to manage the board integration.

Thanks a lot!

Reply all
Reply to author
Forward
0 new messages