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

Add VSCode ST-link debug config #567

Merged
merged 2 commits into from
Aug 14, 2021

Conversation

hubmartin
Copy link
Contributor

Add launch configuration for debugging PineTime with ST-link and OpenOCD.

You also need cortex-debug extension https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug
In VSCode Ctrl+P ext install marus25.cortex-debug

Open project, hit F5. (or Ctrl+Shift+D and choose Debug OpenOCD ST-LINK and click Play button)

  • Breakpoints
  • Variables
  • Call stack
  • NRF52 registers thanks to nrf52.svd
  • ...

Not sure if this isn't mentioned in the documentation. I could write an short note, let me know where it would fit the best.

image

@geekbozu
Copy link
Member

geekbozu commented Aug 9, 2021

This has also been partially setup in PR #505 ...I just have not been able to test/build it on windows to confirm its working heh

That PR uses the same plugin cortex-debug.
Good job doing it as well! It took me a good bit of time to figure it all out for remote debugging as well!

@hubmartin
Copy link
Contributor Author

I overlooked that. Good to see that config file is similar. It's always lot of crafting of those launch.json files. I can confirm that my setup works in Ubuntu. Looking forward for docker builds.

@geekbozu
Copy link
Member

geekbozu commented Aug 9, 2021

Yeah it took some effort on my end the first time...I'm just shooting to help get an easy to setup run and use toolchain for anyone who wants to play with it, and containers seem like the way to go... it would be super nice to have VSCode work locally as well for those who need it! So maybe after/during 1.4s milestone we can get these merged and support both in one run! Since local stuff currently I feel is out of the scope of my PR :)

@hubmartin
Copy link
Contributor Author

In #505 there is not working local configuration, so this still makes sense to merge and add local non-docker debug with STLink/OOCD.

@hubmartin
Copy link
Contributor Author

@JF002 Can you please merge it? Its just launch config for vscode, shoudn't broke anything :) I'm using it in few branches I have PRs and it is pain in the ass to copy it for every PR I need to debug with ST-Link. Thank you.

@JF002 JF002 added this to the Version 1.4 milestone Aug 14, 2021
@JF002 JF002 merged commit dec4bab into InfiniTimeOrg:develop Aug 14, 2021
@JF002
Copy link
Collaborator

JF002 commented Aug 14, 2021

@hubmartin Done ;)

@hubmartin hubmartin deleted the vscode-stlink-debug branch August 14, 2021 19:27
jonvmey pushed a commit to jonvmey/InfiniTime that referenced this pull request Aug 21, 2021
* origin/develop: (37 commits)
  Add memory print usage
  Fix music app buttons
  Adjust inner padding in applist
  Clean up using variables
  Adjust previously missed scrollbar and firmware validation buttons
  Add image with example layouts
  Ui update
  Add VSCode ST-link debug config (InfiniTimeOrg#567)
  Improve metronome
  Set pin before loop
  Better pin configuration
  Try to fix bootloop
  Update contribute.md (InfiniTimeOrg#475)
  Code cleaning in Clock, WatchFaceAnalog, WatchFaceDigital and PineTimeStyle, inspired by PR InfiniTimeOrg#232 by nscooling.
  Setup plugins for Clang-tidy/format
  Fix intellisense
  Typos for days
  Updated documentation
  Added cmake variants
  added extra .sh build files
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants