-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
updated gdb debugging doc with WSL and extension version #1140
Conversation
Awesome! thank you for the PR. It looks good in my opinion, but perhaps @ataffanel would like to take a look as well? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does looks good to me, really nice that usb-ip is actually working! My only comment is about the necessity of the external GCC, if we could avoid it, it would be nice.
|
||
Configure your Machine for WSL and install a Ubuntu Distrobution. Instructions can be found here: https://learn.microsoft.com/en-us/windows/wsl/install . It has been tested on Windows 10 and 11 with Ubuntu 20.04. | ||
|
||
##### Install the GCC ARM embedded Toolchain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need gcc arm embedde as opposed to the ubuntu packages gcc-arm-none-eabi
and gdb-multiarch
? I have been trying to get rid of non-packaged gcc on other parts of the projects and documentation so I am curious why it is needed for that use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i..don't know anymore tbh. For some reason it didn't work so i searched for other methods, i did a quick and dirty delete of embedded and just ran sudo apt-get install -y gcc-arm-none-eabi
again. It seems to work fine for now. Let me make sure that it works on a clean install and I'll get back to you later. That would simplify the instructions for WSL a lot 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. One possible trick is that the vsCode extension expects gdb to be called arm-none-eabi-gdb
and I did not find any way to configure it so the linux instruction includes making a link so that the extension finds gdb:
sudo ln -s /usr/bin/gdb-multiarch /usr/local/bin/arm-none-eabi-gdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works, just by running sudo apt-get install -y gcc-arm-none-eabi
alone. and there is another thing i want to add, which is that you have to tell VSCode to not update Extensions automatically.
The only option i found is to add this
{
"extensions.autoCheckUpdates": false,
"extensions.autoUpdate": false
}
to .vscode/settings.json, but i haven't tested it over two days, normally vscode doesn't update extensions immediately.
How can I commit to this PR? I'm fairly new to github, can I just commit to my branch in my fork or do i have to do anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is the way, Your branch called 'new_branch' is the one linked to this PR, so if you commit to that one and push it to your own repo, it will automatically update this PR as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was busy on another project, but here is the finished PR. that extensions.autoUpdate: false
is not required since you can just check the ignore updates
Option in the Extension settings. I included it in the instructions.
I just got done fully validating the whole instructions for Debugging on WSL on a fresh everything windows pc. (since i broke my entire wsl system with a ros project)
--> Ready to merge from my end 👍
One thing I'd like to propose to you is the option of providing a importable WSL2 distro like you provided the VM. Maybe this would make it much easier for new and probably mostly windows users to start working without the need for a powerful computer. My Intel Pentium Surface Go 1st gen is more than enough to run WSL2 really smooth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I'd like to propose to you is the option of providing a importable WSL2 distro like you provided the VM. Maybe this would make it much easier for new and probably mostly windows users to start working without the need for a powerful computer. My Intel Pentium Surface Go 1st gen is more than enough to run WSL2 really smooth.
In principle I like the idea, I am not sure how to implement it in practice though. I am creating a new tickets to track the idea and experiment a bit with it: #1149.
Looks great to me, thanks a lot! I am merging the PR. |
Kimberly asked me to make it clearer in the instructions that you should use version 1.2.2 of Cortex Debug and to Include a section about how I got it running in WSL.
bitcraze/discussions#331
I also included a picture because I was pretty unsure at first and there was no picture at all where you could see the whole thing put together as it should be. (And I was too dumb to read, soldered on the nRF connector and tried to connect to the STM 🤦♂️)
Feel free to email me, it is also in my personal best interest to improve the documentation, because I'm just the first of many in a project at my institute specifically working with crazyflie drones.