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

xtask sizes is incorrect with regards to the kernel #474

Closed
steveklabnik opened this issue Mar 24, 2022 · 0 comments · Fixed by #595
Closed

xtask sizes is incorrect with regards to the kernel #474

steveklabnik opened this issue Mar 24, 2022 · 0 comments · Fixed by #595
Assignees
Labels
build Affects or requires changes in the build system developer-experience Fixing this would have a positive impact on developer experience

Comments

@steveklabnik
Copy link
Contributor

The kernel doesn't require a power of two memory size, but xtask sizes doesn't know that, and so will give incorrect results.

@steveklabnik steveklabnik added developer-experience Fixing this would have a positive impact on developer experience build Affects or requires changes in the build system labels Mar 24, 2022
@steveklabnik steveklabnik self-assigned this Mar 24, 2022
mkeeter added a commit that referenced this issue Jun 10, 2022
This PR implements task autosizing, at long last!

It builds on the previous work with relocatable task builds (#584). After
building the relocatable task ELF file, it runs a "dummy link" against a
linker script with "infinite" memory (in practice, the entirety of memory
available on the chip). It then parses the resulting (static) binary to extract
sizes.

After finding sizes for every task, it runs the same memory packer as before,
then relinks each task with the resulting memory.

Task sizes are based on the target microcontroller, with a new `alignment`
parameter passed to `allocate_one`.

There are extensive changes to `cargo xtask sizes` to make it more generically
useful, decoupling the suggestions from the "find the size of a static ELF".

WARNING: this changes the format of the exported JSON files!

In addition, there are a bunch of new helper functions in `Config` to help with
task and memory sizing / alignment.

This fixes #474 and maybe #439, and deprecates #476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Affects or requires changes in the build system developer-experience Fixing this would have a positive impact on developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant