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

Feature request: Specify maximum size of binary #1412

Closed
someburner opened this Issue Mar 4, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@someburner

someburner commented Mar 4, 2018

Right now it appears pio only checks size before uploading. For CI and OTA purposes, it would be really nice if one could specify size as a build parameter and to fail the build if it is too large. May as well add minimum feature too as a sanity check for similar purposes.

@ivankravets

This comment has been minimized.

@someburner

This comment has been minimized.

someburner commented Mar 6, 2018

Seen it.. I cannot get it to execute within a virtual environment, but even if I could, it seems like a lot of code duplication and mess to have it in a project when it could be added as its own flag. I wouldnt have made a request if I thought it was something specialized. Is there a reason for reluctance for additional build flags?

@me21

This comment has been minimized.

me21 commented Mar 19, 2018

It can be done by providing custom linker script. If .text and .data cannot fit into the region of memory, the linker will abort with error.

@ivankravets ivankravets added help wanted and removed enhancement labels Jun 1, 2018

@ivankravets ivankravets added this to the 3.5.4 milestone Jun 1, 2018

@ivankravets ivankravets added feature and removed help wanted labels Jun 1, 2018

@ivankravets ivankravets modified the milestones: 3.5.4, 3.6.0 Jun 2, 2018

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jun 4, 2018

UPDATE: New PIO Core 3.6 will automatically calculate program memory usage and provide all checks. See bfc94d3

@ivankravets ivankravets modified the milestones: 4.0, 3.6 Aug 2, 2018

ivankravets added a commit that referenced this issue Aug 6, 2018

ivankravets added a commit that referenced this issue Aug 6, 2018

Merge tag 'v3.6.0' into develop
Bump version to 3.6.0 (issues #1594 #1412 #1462 #1735)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment