Skip to content

Commit

Permalink
Merge pull request #513 from zapta/develop
Browse files Browse the repository at this point in the history
Assorted changes
  • Loading branch information
cavearr authored Jan 2, 2025
2 parents 523a7e4 + aef87d1 commit 86fac3d
Show file tree
Hide file tree
Showing 49 changed files with 2,808 additions and 3,364 deletions.
301 changes: 6 additions & 295 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,309 +2,20 @@
"version": "0.2.0",
"configurations": [
{
"name": "Apio",
"name": "Run apio",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"build"
"test",
"ledon_tb.v"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
"cwd": "${workspaceFolder}/test-examples/TB/alhambra-ii/icestudio/ledon"
},
{
"name": "Apio boards",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"boards",
"-l"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio build",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"build"
],
"env": {
"APIO_DEBUG": ""
},
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio clean",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"clean"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio create",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"create",
"--board",
"--alhambra-ii",
"--top-module",
"main",
"--sayyes"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio drivers",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"drivers",
"--ftdi-install"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio examples",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"examples",
"list"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio format",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"format"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio graph",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"graph",
"--svg"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio install",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"install",
"drivers",
"-p",
"windows_amd64"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio lint",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"lint"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio modify",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"modify",
"--board",
"alhambra-ii",
"--top-module",
"main"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio packages",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"packages",
"install",
"--force"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio raw",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"raw",
"--",
"yosys",
"--version"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio report",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"report",
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio system",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"system",
"info"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio time",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"time",
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio uninstall",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"uninstall",
"examples"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio upload [alhambra-ii]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"upload"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Apio upload [TinyFPGA-BX]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"upload"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/TinyFPGA-BX/02-jumping-LED"
},
{
"name": "Apio upload [fomu]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"upload"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/fomu/02-jumping-LED"
},
{
"name": "Apio upload [blackice]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"upload"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/BlackIce/02-jumping-LED"
},
{
"name": "Apio verify",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/apio/main.py",
"args": [
"verify"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/test-examples/alhambra-ii/02-jumping-LED"
},
{
"name": "Attach remote",
"name": "Attach remote debugger",
"type": "debugpy",
"request": "attach",
"connect": {
Expand All @@ -314,7 +25,7 @@
"justMyCode": false,
},
{
"name": "Apio test",
"name": "Run an apio test",
"type": "debugpy",
"request": "launch",
"module": "pytest",
Expand Down
10 changes: 3 additions & 7 deletions COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ Usage: apio boards [OPTIONS]
directory, which will override Apio’s default 'boards.json' file.
Examples:
apio boards # List all boards
apio boards | grep ecp5 # Filter boards results
apio boards --project-dir foo/bar # Use a different
apio boards # List all boards
apio boards | grep ecp5 # Filter boards results
Options:
-p, --project-dir path Set the root directory for the project.
Expand Down Expand Up @@ -824,7 +823,7 @@ Usage: apio system info [OPTIONS]
[Advanced] The default location of the Apio home directory, where
preferences and packages are stored, is in the .apio directory under the
user’s home directory. This location can be changed using the APIO_HOME
user’s home directory. This location can be changed using the APIO_HOME_DIR
environment variable.
Options:
Expand Down Expand Up @@ -918,9 +917,6 @@ Options:
--ftdi-id ftdi-id Set the FTDI id.
-s, --sram Perform SRAM programming.
-f, --flash Perform FLASH programming.
-v, --verbose Show detailed output.
--verbose-yosys Show detailed yosys output.
--verbose-pnr Show detailed pnr output.
-p, --project-dir path Set the root directory for the project.
-h, --help Show this message and exit.
```
5 changes: 3 additions & 2 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is intended for APIO developers.

## Pre commit tests
Before submitting a new commit, make sure to run successfuly the following command
Before submitting a new commit, make sure to run successfully the following command
in the root directory of the repository.:

```shell
Expand Down Expand Up @@ -88,7 +88,8 @@ The debug target can be viewed here https://github.com/FPGAwars/apio/blob/develo

## Debugging SConstruct scripts (subprocesses) with Visual Studio Code.

To debug the scons scripts, which are run as apio subprocesses, we use a different method or remote debugging. Enable the ``wait_for_remote_debugger(env)`` call in the SConstruct script, run apio from the command line, and once it reports that it waits for a debugger, run the VCS ``Attach remote`` debug target to connect to the SConstruct process.
To debug the scons scripts, which are run as apio subprocesses, we use a different method or remote debugging.
To activate, define the sytem env var ``APIO_SCONS_DEBUGGER`` (the value doesn't matter), run apio from the command line, and once it reports that it waits for a debugger, run the VCS ``Attach remote`` debug target to connect to the SConstruct process.


## Using the dev repository for apio commands.
Expand Down
Loading

0 comments on commit 86fac3d

Please sign in to comment.