-
Notifications
You must be signed in to change notification settings - Fork 3k
Bare-metal profile #9800
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
Bare-metal profile #9800
Conversation
@theotherjimmy, thank you for your changes. |
I filled out the required sections to my satisfaction. Removing do not merge. |
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.
Looks simple !
into mbed OS to the hal, drivers, and platform.
How HAL gets in? I see requires only for platform and drivers. I could not find anything in these 2 folders that would pull in HAL (.json file requires HAL) ?
We got build profiles in the tools, this is in the components? What else is coming there? Should Readme be there describing the profiles ?
@0xc0170 in order:
It has no mbed_lib.json, so it's pulled in with the same rules as the targets directory and the user's application: No lib = pulled in.
Suggest a better location if you prefer.
Nothing else is planned. Perhaps a Readme would be fine. |
This PR is at risk of missing 5.12 release as it's marked as "needs: review". Code freeze is coming! On Friday 1st. Please review the changes ASAP. |
CI started whilst reviews are completed |
Ok, maybe it's time for sleep. Duplicate job stopped. |
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.
Please don't use "components" directory - these aren't the droids you are looking for (I'm so regretting allowing it to be created in the first place). The initial idea was to keep "drivers" for external HW components there, but now it became a go to directory for everything. Could we put the build profiles under tools? As it's a part of the build system. Also we need design document, but I won't block the merging based on that. Also changes to the Handbook and maybe blog post (?) to introduce the concept @SenRamakri
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
@bulislaw They can't go under tools, as no device-related code is under tools, and it's ignored, and it's data, not a tool. |
This is not part of the build system. It's data, and I it's designed that way so that we don't have to worry about breaking changes or needing to update the online compiler for changes to the "build profile" (I still don't like calling it that, as it's neither a build nor a profile) |
Perhaps that intention needs to be documented. |
What concept? |
@bulislaw Please suggest another location (other than tools; this is not a tool, and tools is not scaned so it would not work) for this library. |
This 4 lines represent bigger concept, corresponding tools changes are more than 4 lines I'm sure. The idea of build profiles deserves a design doc (it may be it was introduced with other PR).
Actually the name needs to be changed as build profiles are "debug", "devel" and "release". Build variants? Scan profiles?
How about build profile (eg debug) definitions? Isn't that data as well? I still think tools directory is the only logical place. If we need to work around the online compiler, I'd rather stuff it in platform than components. |
Scan profiles was suggested during design. It's more of a library set than anything else. We can call them scan profiles; I'm not going to bikeshed further on this topic in this PR. Instead, I'm going to remove the directory from the path.
Yes it is, and a user can add their own and pass them in. These may be in the tools dir, as they are not scanned. That's the big deal here:
The tools directory is not scanned and therefore cannot conntain a library.
I'll move it to platform and It'll be |
679714d
to
d1de429
Compare
Changes addressed. Please re-review.
CI started |
Test run: FAILEDSummary: 1 of 8 test jobs failed Failed test jobs:
|
Info: A CI config issue appears to be affecting Other build failures should still be investigated, if any. Will restart CI when appropriate. |
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.
Looks good for now, we may need to rethink that later (if we add more profiles, we'll need an uber directory in platform to keep it tidy).
CI restarted |
@bulislaw Agreed, having this in an "uber-directory" is a bridge we can cross when we get there. |
Test run: FAILEDSummary: 1 of 13 test jobs failed Failed test jobs:
|
Ci restarted (iar8 exporter issue will be resolved separately). |
@theotherjimmy It's probably obvious from your description but does this library/profile leave out eventQueues? Maybe eventQueues are considered to be in rtos territory, but no matter how simple the application I'd never go bare metal without an event loop. |
@loverdeg-ep You bring up an interesting point. Since we'd like to bring this in before code freeze, I'd propose opening an issue for the question, linking to this PR. I personally know of many simple use-cases where an RTOS is overkill, and even an Event Queue might not be needed. |
@cmonr Not trying to stop the press, just vacuuming info. |
Description
This pull request provides the "bare-metal profile" that allows for mbed OS
to be built "bare-metal" or without an rtos. Requirinng the bare-metal
library limits the code built into mbed OS to the hal, drivers, and
platform.
The following table is the difference when using bare metal with release profile
on a simplified blinky example.
Total Static RAM memory (data + bss): 5856(-6240) bytes
Total Flash memory (text + data): 33760(-8616) bytes
Further, build time is reduced from 25sec to 8sec on my desktop and
1m22s to 13s on my mid-2014 mac book pro.
Pull request type
Reviewers
?
Release Notes
Mbed OS may now be built without the rtos by creating an
mbed_app.json
withthe following contents: