fusesoc/blinky

Cannot run blinky

hossein1387 opened this issue · 4 comments

I am trying to run the simple blinky example and I keep getting the following error:

ERROR: 'fusesoc:utils:blinky' or any of its dependencies requires 'blinky', but this core was not found

What I did was the following:

git clone https://github.com/fusesoc/blinky.git
cd blinky/
fusesoc run --target=sim fusesoc:utils:blinky --help

I read the documentation and some issues in this repo. I also tried the following command and I still get the same error:

fusesoc core show fusesoc:utils:blinky

Is there anything that I am missing here?

olofk commented

Hi,

Yes. You're missing that FuseSoC doesn't know where to find your cores. The regular way to use fusesoc ist to first create an empty directory to use as a workspace. Once in that workspace you can start adding core libraries. This repository is such a library and you can add it with fusesoc library add blinky https://github.com/fusesoc/blinky. Since you have already cloned it, it's also possible to do fusesoc library add blinky /path/to/cloned/rapo instead. Let me know if that works better

Thank you very much @olofk for your help. And thanks for your awesome tool! It is now fixed and I am able to run the blinky project. Here is what I did:


1. git clone https://github.com/fusesoc/blinky.git
2. cd blinky/
3. fusesoc library add blinky .
4. fusesoc run --target=verilator blinky

at this point I got a file named fusesoc.conf which I believe is here by mistake?? because according to you I should have created an empty directory for fusesoc workspace. So I created an empty directory, I removed the fusesoc.conf from the blinky project and I ran the following:

fusesoc library add blinky /absolut/path/to/blinky

I then moved to blinky directory but then I was not able to run the blinky project, and I got the error as before:

ERROR: 'blinky' or any of its dependencies requires 'blinky', but this core was not found

So I am not sure if fusesoc.conf should be in every directory (it does not make sense to me).

olofk commented

Hi @hossein1387. FuseSoC needs a fusesoc.conf file to know where to find the core libraries. It will look for this file in two places.

  1. The current directory. This is called the local config file
  2. ~/.config/fusesoc/fusesoc.conf. This is called the global config file.

The ieda is that you can have different workspace directories with different core libraries loaded, but also have some global libraries that is used by all workspaces.

I then moved to blinky directory but then I was not able to run the blinky project, and I got the error as before:

Yes, this is because there is no fusesoc.conf here anymore. Instead of running from within the blinky repo, you should run from the directory where you did fusesoc library add..., because that's where the new fusesoc.conf was created

Thank you very much for your help. I am now trying to use fusesoc in my risc-v accelerator project!