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

Bazel Support For STM32 MCU's #985

Conversation

garethellis0
Copy link
Contributor

Please fill out the following before requesting review on this PR

Description

Opening this PR because I'm pretty sure I totally broke codecov with #937.

  • created a bazel toolchain with both clang and arm-none-eabi-gcc
  • created a demo project for compiling firmware for frankie_v1 (naming and restructuring of firmware can wait for another PR I think)
  • added a script for writing the built firmware to the demo board and debugging it with gdb
  • added a script to convert clangs code coverage results into something codecov can understand

Testing Done

Please fill out the following before requesting review on this PR

Description

Opening this PR because I'm pretty sure I totally broke codecov with #937.

  • created a bazel toolchain with both clang and arm-none-eabi-gcc
  • created a demo project for compiling firmware for frankie_v1 (naming and restructuring of firmware can wait for another PR I think)
  • added a script for writing the built firmware to the demo board and debugging it with gdb
  • added a script to convert clangs code coverage results into something codecov can understand

Testing Done

Code can build, and be flash and debugged on the stm23h7 demo board

Resolved Issues

Length Justification

Toolchain is massive, demo project is pretty massive (but should require minimal review).

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing

- created a bazel toolchain with both `clang` and `arm-none-eabi-gcc`
- created a demo project for compiling firmware for `frankie_v1` (naming and restructuring of firmware can wait for another PR I think)
- added a script for writing the built firmware to the demo board and debugging it with gdb
- added a script to convert clangs code coverage results into something codecov can understand
@garethellis0
Copy link
Contributor Author

@MathewMacDougall @jonathanlew - the main thing to review here is the convert_profdata_to_lcov.sh script, everything else is basically the same (though I would appreciate a quick overall sanity check to make sure I didn't totally bugger anything else).

Copy link
Contributor

@jonathanlew jonathanlew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garethellis0
Copy link
Contributor Author

I was waiting to see if it showed up, gonna open one more totally clean PR which should get it..........

@garethellis0
Copy link
Contributor Author

sigh looks like codecov got knackered somehow. I've seen similar issues before when there is odd stuff happening between master and a branch. Currently I'm inclined to merge, and that should fix it...........

@garethellis0
Copy link
Contributor Author

garethellis0 commented Oct 25, 2019

Other things to note about coverage:

  • we're now counting tests in the line count
  • we seem to be counting some comments in the line count

Both of these are definitely regressions, and I am extremely unhappy about that. However I really don't think we can do much better, and code coverage should still serve as a good indicator where we need to improve.

We're waiting for bazel to get their stuff together, there are several tickets open right now, and the resolution of any of them should clear things up.

@garethellis0
Copy link
Contributor Author

After offline discussion with Mat, we've agreed that the ideal would be to redo the toolchain for a version of gcc that bazel supports for coverage (see this issue: bazelbuild/bazel#7719), but we need to get this in ASAP to unblock elec, and it's functional, so it will have to do for now.

@garethellis0 garethellis0 merged commit 7e032d6 into UBC-Thunderbots:master Oct 26, 2019
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