-
Notifications
You must be signed in to change notification settings - Fork 78
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
improvements for pros4 #224
Comments
possibly the migration to a more modern build system, like CMake |
Also potentially add a HAL that thinly wraps the SDK to decouple the kernel from the SDK. |
Switch the compiler to llvm/clang, which has better tooling and more optimizations than gcc, along with the move to cmake. Automated documentation, ie doxygen, whether it be a full migration to a new doxygen-based setup or take the autogenerated documentation and feed into read the docs (I don't think this is a great idea but I'm also still having trouble making a perfect doxygen prototype). Motor set PID command (and related helpers) being conditionally hidden using a macro, so that:
|
I don't think clang has support for linking against arm yet, does it? Is it still "experimental" or something?
Does this really matter for us? We would just invoke
Traditionally, gcc has been the better optimizing compiler between the two of them. They have pretty much caught up, though. |
ARM support is listed on the LLD webpage.
Counterpoint: using Clang and LLD would enable us to support Link-Time Optimization, which can greatly improve cross-unit optimizations, both for performance and code size. This could be especially useful for reducing monolithic executable size. There is (to my understanding) no equivalent system on the GNU stack. |
Maybe they have added support for our Arm architecture recently. Remember that not long ago, Vex used clang for compiling and gcc for linking.
GCC has LTO. |
My bad, I was not aware of that. Looks to be pretty similar. So it probably just comes down to feature set then (including C++20 support if that's what we want to do). |
with CMake you would be able to use either GCC or clang as and when you want. the one thing to watch out for is arm-none-eabi newlib support with clang---i'm still not sure how that works exactly |
Yeah this is the most finicky part. In general it works, but you need to explicitly tell it where to look for headers and libraries; that info is built-in for GCC because it's all packaged together. |
I know they're in seperate namespaces, but I still feel like we should keep the 393 motors as ADI motors and the V5 motors as normal motors. What are your guy's opinions on this? (Gonna change the 393s to motor for now). |
In my (narrow) experience, I've noticed that clang can do more optimizations, and I've also read that the STL implementation and internals are much smaller and lighter. Also, for example, clang was able to expand a constexpr'd function containing a loop and calculate the return (container) during compile time, whereas gcc could not. |
This has a fairly high cost to do as we wouldn't want to support multiple different tool chains (and I don't think? you can call into different each other due to name mangling, among other things). This means installing clang on all users of pros, which is pretty high cost. From last I heard from people way more familiar with this then I am, they were about equal, with each optimizing some areas better/worse then the other. It's not something I think we should change, as it's a fair amount of work for potentially little benefit. If we're talking about CMake for new projects, my only worry about that is that idiomatic cmake is that you add files you're compiling to a list, as it might not be able to detect some changes if you glob it. Thought given our target audience, this workflow break might be fine. I've heard people say they've never had issues with it before though, so that might also be a good approach. |
I would also like to add to this that users already have the gcc toolchain installed, which has proven to be a difficult task for many. |
I second this. One nice thing about LLVM/Clang is that there's no "cross-compiler"; one set of toolchain binaries support all target. This means that users (especially on Linux) are more likely to already have things they need installed. I don't think this should be a high priority per se, but it's something to consider.
That sounds like we'd be re-introducing issues like #167, which I think we'd really like to avoid. There are so many build systems that do these things properly nowadays that there's no excuse to have that kind of bug. IMO this should be a key requirement.
Not sure what is meant by this? |
Here's the deal: changing the compiler we ship (with windows installs) is out of scope of this issue. The reasonable compromise is that we can provide toolchain files for GCC and for clang and let users supply their own compiler if they care to. |
Sounds good about the toolchain topic, I'm not qualified to argue for either side. |
This is easily fixed using cmake functions, and I'm about 75% sure this can be made to work with dependency detection as well |
I'm definitely not qualified to give my opinion as a developer. However as an advanced user I think that offering the option is fine but there are already enough flame wars about things like this for no reason and adding an other thing after you all said it doesn't really matter doesn't make sense. There are much better things to work on than changing a fundamental thing like that. |
Closed due to plans being relatively more finalized and a redundant discussion board. |
There's been some discussion around changes we'd like for pros4. In particular,
are the major ones that we were discussing. Some of these changes breaking, so that's why we're thinking of a major version increment. It also coincides nicely with some other changes.
There was discussion elsewhere about what other changes people like to see, so part of the reason why this exists is to help document that.
The text was updated successfully, but these errors were encountered: