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

any plan to support icestudio and apio? #3

Closed
jemisa opened this issue Jul 14, 2020 · 12 comments
Closed

any plan to support icestudio and apio? #3

jemisa opened this issue Jul 14, 2020 · 12 comments

Comments

@jemisa
Copy link

jemisa commented Jul 14, 2020

It's' a visual editor for open FPGA boards, at https://github.com/FPGAwars/icestudio (sample config for boards: https://github.com/FPGAwars/icestudio/tree/develop/app/resources/boards, need to create a folder and 3 config files, and generates pinout.json from pinout.pcf (I'm assuming src/common/io.pcf is the proper pinout ) )

it relies on apio, a wrapper of other tools (
https://apiodoc.readthedocs.io/en/stable/source/contribute/support_new_board.html explains how to add a board to apio

@wuxx
Copy link
Owner

wuxx commented Jul 15, 2020

thanks for the advice, maybe support in future :)

@jemisa
Copy link
Author

jemisa commented Jul 19, 2020

Thanks.
I'm trying to do it myself.

I'm unclear on the difference between
icesprog leds.bin
and
cp leds.bin /media/mylogin/iCELink
Both do program

Can you explain what is the role of icesprog ?

@wuxx
Copy link
Owner

wuxx commented Jul 20, 2020

there are two way to program, as you say, one is use icesprog, the other way is drag and drop, first one use usb hid to program. and the the latter use usb msc bulk to program.
drag and drop program speed is faster, because it use the usb bulk transfer.
and icesprog is multi-functional, it can probe/write/read the spi-flash.

@jemisa
Copy link
Author

jemisa commented Jul 20, 2020

Thank you for the answers.

Here is what I did to make it work for asio

STEP 1:
If you want to use icesprog, put icesprog somehere in your path
add
"icesprog": {
"command": "icesprog",
"args": ""
},
to
apio/resources/programmers.json

if you prefer to use the usb method, you need to make a bash script and put in your path as icesugar-copy
#!/bin/bash
vars=( df | grep iCELink )
ICELINK_DIR=${vars[5]}
cp "$1" "${ICELINK_DIR}"

but I found out that the directory is unmounted after one copy... so I prefer to use icesprog

STEP 2:
add
"icesugar-copy": {
"command": "icesugar-copy",
"args": ""
},
to
apio/resources/programmers.json

then add
"icesugar": {
"name": "icesugar iCE40 by MuseLab",
"fpga": "iCE40-UP5K-SG48",
"programmer": {
"type": "icesprog"
},
"usb": {
"vid": "1d50",
"pid": "602b"
}
}
to
apio/resources/boards.json
(if you prefer to use the icesugar-copy as programmer, change the "type" to be "icesugar-copy" (it should match the name in the programmers.json )

then install apio

to use:
cd src/basic/verilog/leds
cp the common/io.pcf in the current folder then
apio build --board icesugar
apio upload --board icesugar

@aalku
Copy link

aalku commented Oct 11, 2020

Thank you @jemisa
I made it work on Windows but don't know how to correctly prepare it to make it distributable and I didn't do the copy on Linux part yet.

My changes to apio are here
https://github.com/aalku/apio

And I created this issue in order to get help with it.
FPGAwars/apio#214

Any help is welcome. This is a nice and cheap board and it would be nice to get it officially supported.

@aalku
Copy link

aalku commented Oct 13, 2020

Could you please release icesprog source or make a windows (libusbK?) binary so we can add it as apio programmer in a new toolchain?

the copy method does not support specifying an offset as far as I know.

@wuxx
Copy link
Owner

wuxx commented Oct 13, 2020

yes, already commit under tools/src/ :)

@aalku
Copy link

aalku commented Oct 13, 2020

Thank you! I'll try to create a windows binary with mingw. Wish me luck. 😂❤

@aalku
Copy link

aalku commented Oct 13, 2020

I had to make a couple of tiny changes but I made it work on windows.
I'm quite confident the c change is compatible with Linux but I don't know about hidapi-libusb being called just hidapi arround.

icesprog-mingw64.zip

@aalku
Copy link

aalku commented Oct 24, 2020

@jemisa I've got apio toolchain here:
https://github.com/aalku/toolchain-icesprog/releases/tag/v1.0.0

apio fork supporting it here:
https://github.com/aalku/apio

I'm working with FPGAwars to include it on icestudio but I don't know when will it be working by default on nightly release or when the next stable release will be available. There are some steps ahead.

@Obijuan
Copy link

Obijuan commented Nov 15, 2020

The support of the icesugar in icestudio is almost finished! Thanks to @aalku Here you can see an screenshot of a simple test circuit:

icesugar-screenshot3

It is available in the develop branch. It is supported in Windows and Linux. The next step is add support for mac

@jemisa
Copy link
Author

jemisa commented Nov 23, 2020

https://mobile.twitter.com/Obijuan_cube/status/1330902188797939713 announces its support.
Thank @Obijuan and @aalku

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