Skip to content

Commit

Permalink
Removed VSCode section for now from README
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaooooo authored May 3, 2021
1 parent bbdec24 commit 43c0b41
Showing 1 changed file with 0 additions and 68 deletions.
68 changes: 0 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,74 +443,6 @@ cutecom&
Then please configure your terminal program to use /dev/ttyUSB1 with a 115200
baud rate, 8 data bits and 1 stop bit.

## Vscode integration

SDK examples can be compiled and run on boards from Vscode.

### Setup

The GDB version included in the GAP toolchain is too old to properly work with the debug, you need to download and install the riscv toolchain and make sure riscv64-unknown-elf-gdb is in the PATH.

Vscode is using some files such as tasks.json and launch.json to know how to build and run on the target.

Once the SDK is configured, you can generate a sample version of these files from an example with:

~~~~~shell
cd examples/pmsis/helloworld
make vscode
~~~~~

Everything should be properly setup for building the example but you need to modify a few files for the execution. For the build, you may just need to modify the file .vscode/script/build.sh to put the proper platform on this command:
~~~~~shell
make all platform=fpga
~~~~~


Then modify .vscode/tasks.json and modify the openocd command to put the absolute path to the files and add any needed option:

~~~~~shell
"command": "<OCD install path>/openocd.exe -f <OCD install path>/scripts/tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg -f <SDK install path>/tools/gap8-openocd-tools/tcl/gap9revb.tcl"
~~~~~

And finally modify .vscode/launch.json and modify the gdb command to match your IP address and openocd gdb port:

~~~~~shell
"text": "target extended-remote <IP address>:3333",
~~~~~

### Launch Vscode

From your example folder, execute:

~~~~~shell
code .
~~~~~

You should see vscode with all the files from your example visible on the left panel. You can now edit and save all the files.

### Build the example

Click on "Terminal"->"Run Task"->"Build from Makefile"->"Continue without scanning the task output" to build your test.

Check any problem that occurs in the terminal window of vscode. If you don’t see anything happening, you may have run vscode without the --log trace option.


### Launch Openocd

Click on "Terminal"->"Run Task"->"Openocd"->"Continue without scanning the task output"

You should see on the terminal window, Openocd being launched and connecting to the target.

You can keep this terminal opened for several runs of your test, and you can kill it with the trash icon if something goes really wrong or you want to close it.


### Launch the example

Click on "Run"->"Start Debugging" and then do normal vscode debug operations, like running, stopping, adding breakpoints and so on.

All the printf from the application is visible on the openocd terminal.



## Documentation

Expand Down

0 comments on commit 43c0b41

Please sign in to comment.