attdona / riot-code Goto Github PK
View Code? Open in Web Editor NEWRIOT integrated development for Visual Studio Code
RIOT integrated development for Visual Studio Code
Hi, thanks a lot for your great work; especially the VS Code Extension. I was wondering, is there a way to debug and set up break points in VS Code on a target board? For instance using ST-Link/GDB on B-L475E-IOT01A?
Thanks!
The RIOT Init command hangs on "RIOT setup, please wait", and generates only the tasks.json
file (with correct content) and a riot_paths.json
file with this strange content
{
"browse": {
"path": []
}
}
All settings are configured correctly (make
command completes with success)
This is the environment I'm working on:
OS: Ubuntu 22.04 (on X11)
Board: ESP8266
The project I've tested is Arduino hello-world example.
Does anyone know any hint?
In the current implementation workspace_root is changed to point at RIOTBASE, if RIOT is added as a workspace folder to the project.
Say for example I have ~/RIOT-Projects/hello
for a new project. I want ~/RIOT-Projects/hello
to be my workspace_root
. Also I configure the workspace with a subdirectory src
as the "build" directory. RIOT-OS is installed somewhere else on my system. Here is how my code-workspace looks like.
{
"folders": [
{
"path": "."
},
{
"path": "/home/kees/src/RIOT"
}
],
"settings": {
"riot.build_dir": "src",
"editor.tabSize": 8,
"riot.compiler": "arm-none-eabi-gcc",
"riot.board": "sodaq-sff",
"riot.make_defs": "QUIET=1 USB_VID=2341 USB_PID=804d",
"files.exclude": {
"**/*~": true
}
}
}
So, I have added RIOT as a workspace folder. Unfortunately the plugin is modifying workspace_root
. And now it is trying to find src
in the RIOT code. And it looks like it is attempting to modify my vscode setting in the RIOT folder. Hmm, I don't like that.
If I don't add RIOT as a workspace folder then "RIOT init" doesn't do anything.
What I propose is to somehow separate RIOTBASE
and workspace_root
. And maybe even to add something like riot.base
to the config.
If the project is not included inside the RIOT folder, but contains a link to the RIOTBASE in the Makefile, the initialization of c_cpp_properties.json and tasks.json for VS Code does not work. Error message: "Unable to setup anything: open RIOT folder first."
Two possible solutions might be: Read RIOTBASE from Makefile or define RIOTBASE in VS Code.settings.
The build task need to be fixed after introducing #5
Add version
property to c_cpp_properties.json
and set group=build
for clean
and flash
tasks.
I'm facing a weird bug using the lastest ubuntu and lastest vscode.
I used a downloaded toolchain (the one in ubuntu repo is broken) and each time I try to compile i get :
> Executing task: 'PATH=/home/heik/Bureau/gcc-arm-none-eabi-7-2018-q2-update/bin:$PATH make' QUIET=1 BOARD=saml21-xpro <
/bin/bash: PATH=/home/heik/Bureau/gcc-arm-none-eabi-7-2018-q2-update/bin:$PATH make: Aucun fichier ou dossier de ce type
Le processus du terminal s'est achevé avec le code de sortie 127
I have the following parameters set (user settings) :
// RIOT target board
"riot.board": "saml21-xpro",
// make working dir
"riot.build_dir": "examples/hello-world",
// compiler name used for retrieving system includes
"riot.compiler": "arm-none-eabi-gcc",
// override default compiler configured with PATH env
"riot.compiler_path": "/home/heik/Bureau/gcc-arm-none-eabi-7-2018-q2-update/bin",
// verbose output setting
"riot.quiet": "QUIET=1",
Looks like there is some issue with the args in tasks.json because if I remove the following
"args": [
"${config:riot.quiet}",
"BOARD=${config:riot.board}"
],
and hardcoded them here
"command": "PATH=${config:riot.compiler_path}:$PATH make",
I'm able to compile but this is override each time I change a setting :/
Hello @attdona,
I'd like to know if you are planning to update this extension in any point of time ? There is a couple a things that I'd like to add but the extension seems quite outdated nowadays and won't compile out of the box.
Thanks for your work !
I'm thinking to update automatically tasks.json
when the property riot.build_dir
changes.
This is the only way to change tasks names to reflect the current app (ie the basename of riot.build_dir
directory)
To avoid rewriting tasks.json
in case it is manually modified a new property has to be defined:
// set to false to disable automatic update of tasks.json
riot.sync_tasks: true
Upgrade riot-code to run on Windows.
Prerequisite: a valid RIOT build env setup following this recipe:
https://github.com/RIOT-OS/RIOT/wiki/Build-RIOT-on-Windows-OS
Right now we have riot.quiet
which is supposed to be filled in with QUIET=0
or QUIET=1
.
May I suggest to change riot.quiet
and name it riot.make_defs
, or riot.build_defs
or something else. The default can still be QUIET=0
or QUIET=1
.
This setting can then be used to pass one or more defines on the make command line. For example,
"riot.make_defs": "QUIET=1 USB_VID=2341 USB_PID=804d",
Today I suddenly start seeing the "RIOT setup, please wait ..." message when I do RIOT init. It shows that message forever. And it does not update riotbuild.h
anymore.
I also upgrade my vscode program to 1.40.1 (but that didn't help).
In my environment, I defined new bindir as follows:
BINDIRBASE ?= $(CURDIR)/../../bin
it appears that riot-code assumes that bin is always under make folder, hence it fails. will be great to have a config value where we can provide relative path for bindir as this is common scenario.
Commit 6cf3ec6 broke setting riot.compiler_path
. If you set this you get:
Executing task in folder hello-world: PATH=/tmp/compiler/path:$PATH ${make_str}
Hi,
I would like to know if it is possible to add a new variable in User/setting.json file to add the toolchain location to the PATH variable.
In my case, I have different version of arm-none-eabi-gcc install under /usr and I would like to easily switch between them.
Currently the only solution I've found is the following :
"terminal.integrated.env.linux": {"PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dylan/Software/nordic/nRF5x-Command-Line-Tools_9_7_1_Linux-x86_64/nrfjprog:/usr/gcc-arm-none-eabi-5_4-2016q3/bin"},
But I had to rewrite the whole PATH variable within User/settings.json which is not very convenient.
Maybe there is a better way but I didn't find it yet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.