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

Update 'IDEs Support' section in README #3309

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -678,15 +678,46 @@ Now we can proceed as with Spike, debugging works in a similar way:

Further information about GDB debugging is available [here](https://sourceware.org/gdb/onlinedocs/gdb/) and [here](https://sourceware.org/gdb/onlinedocs/gdb/Remote-Debugging.html#Remote-Debugging).

## <a name="ide"></a> Building Rocket Chip with an IDE
## <a name="ide"></a> IDEs Support

The Rocket Chip Scala build uses [mill](https://github.com/com-lihaoyi/mill) as build tool.
IDEs like [IntelliJ](https://www.jetbrains.com/idea/) and [VSCode](https://code.visualstudio.com/)
are popular in the Scala community and work with Rocket Chip. Use:
```
mill mill.bsp.BSP/install
```
to use one of these IDEs, there is one minor peculiarity of the Rocket Chip build that must be addressed.

IDEs like [IntelliJ](https://www.jetbrains.com/idea/) and [VSCode](https://code.visualstudio.com/) are popular in the Scala community and work with Rocket Chip.

The Rocket Chip currently uses `nix` to configure the build and/or development environment, you need to install it first depending on your OS distro.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Rocket Chip currently uses `nix` to configure the build and/or development environment, you need to install it first depending on your OS distro.
Rocket Chip currently uses `nix` to configure the build and/or development environment. You need to install it first depending on your OS distro.


Then follow the steps:

1. Generate BSP config by running:

```
mill mill.bsp.BSP/install
```

2. Patch the `argv` in `.bsp/mill-bsp.json`, from

```json
{"name":"mill-bsp","argv":["/usr/bin/mill","--bsp","--disable-ticker","--color","false","--jobs","1"],"millVersion":"0.10.9","bspVersion":"2.0.0","languages":["scala","java"]}
```

to

```json
{"name":"mill-bsp","argv":["/usr/bin/nix","develop","-c","mill","--bsp","--disable-ticker","--color","false","--jobs","1"],"millVersion":"0.10.9","bspVersion":"2.0.0","languages":["scala","java"]}
```

### For IntelliJ users

3. Install and configure [Scala](https://plugins.jetbrains.com/plugin/1347-scala) plugin.

4. BSP should be automatically run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. BSP should be automatically run.
4. BSP should run automatically.

If it doesn't, click `bsp` on the right bar, then right-click on your project to reload.

### For VSCode users

3. Install and configure [Metals](https://marketplace.visualstudio.com/items?itemName=scalameta.metals) extension.

4. Execute VSCode command `Metals: Import build`.

## <a name="contributors"></a> Contributors

Expand Down