HBehrens / puncover

Analyses C/C++ build output for code size, static variables, and stack usage
MIT License
419 stars 93 forks source link

Initial fix for https://github.com/HBehrens/puncover/issues/79 #80

Closed jeanbaptistelab closed 11 months ago

jeanbaptistelab commented 1 year ago

Wrap initial default gcc_tools_base detection in try/except. This is just to get the "argparse" part of the code going so users get a chance to specify the "gcc_tools_base" through the "--gcc-tools-base" cmd line argument, but it does not ensure that the given base is valid which will cause a similar exception later if:

But at least, it allows users to execute puncover at all (if only to get the help ;))

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.61 :tada:

Comparison is base (6cea2b0) 80.89% compared to head (728fb61) 81.51%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #80 +/- ## ========================================== + Coverage 80.89% 81.51% +0.61% ========================================== Files 11 11 Lines 1298 1298 ========================================== + Hits 1050 1058 +8 + Misses 248 240 -8 ``` [see 2 files with indirect coverage changes](https://codecov.io/gh/HBehrens/puncover/pull/80/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Heiko+Behrens) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Heiko+Behrens). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Heiko+Behrens)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

theadib commented 1 year ago

in the Zephyr case: if the environment variable ZEPHYR_TOOLCHAIN_VARIANT="gnuarmemb" then GNUARMEMB_TOOLCHAIN_PATH="/opt/gcc-arm-none-eabi-10.3-2021.10" points to the arm toolchain.

however this can be overwritten by argument. The code shall not crash before setting the argument.

current workaround is to change the local path, so that arm-none-eabi-objdump is in executeable.

noahp commented 11 months ago

@jeanbaptistelab I believe the change in https://github.com/HBehrens/puncover/commit/0bd63573b92b89aadf9aff716188ed15e364c0ca should also fix this PR, closing for now but re-open if more work is needed!