Skip to content

"Insufficient flash" error message doesn't always seem to work #439

Open

Description

@steveklabnik

While working on #438 I got a lot of linker errors when sizes were wrong. But when working on fixing up sidecar, I got:

Error: task-net has insufficient flash: specified 65536 bytes, needs 65620

I remembered we were working on this but forgot it was merged; when I got the linker errors I assumed it was still in a branch. But clearly it's working sometimes and not other times.

Activity

  1. steveklabnik commented on Feb 24, 2022

    @steveklabnik
    ContributorAuthor

    As an example, after fixing the app.toml to have the right amount for task-net, here's the next error I got:

    error: linking with `rust-lld` failed: exit code: 1
      |
      = note: "rust-lld" "-flavor" "gnu" "C:\\Users\\steve\\Documents\\Oxide\\hubris\\target\\thumbv7em-none-eabihf\\release\\deps\\task_udpecho-25fcf3909630cdca.task_udpecho.740dc942-cgu.0.rcgu.o" "--as-needed" "-L" "C:\\Users\\steve\\Documents\\Oxide\\hubris\\target\\thumbv7em-none-eabihf\\release\\deps" "-L" "C:\\Users\\steve\\Documents\\Oxide\\hubris\\target\\release\\deps" "-L" "target" "-L" "C:\\Users\\steve\\.rustup\\toolchains\\nightly-2022-02-22-x86_64-pc-windows-msvc\\lib\\rustlib\\thumbv7em-none-eabihf\\lib" "--start-group" "--end-group" "-Bstatic" "C:\\Users\\steve\\.rustup\\toolchains\\nightly-2022-02-22-x86_64-pc-windows-msvc\\lib\\rustlib\\thumbv7em-none-eabihf\\lib\\libcompiler_builtins-e8b9a93ab984480c.rlib" "-Bdynamic" "--eh-frame-hdr" "-znoexecstack" "-L" "C:\\Users\\steve\\.rustup\\toolchains\\nightly-2022-02-22-x86_64-pc-windows-msvc\\lib\\rustlib\\thumbv7em-none-eabihf\\lib" "-o" "C:\\Users\\steve\\Documents\\Oxide\\hubris\\target\\thumbv7em-none-eabihf\\release\\deps\\task_udpecho-25fcf3909630cdca" "--gc-sections" "-Tlink.x" "-z" "common-page-size=0x20" "-z" "max-page-size=0x20"
      = note: rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 57 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 76 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 92 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 118 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 136 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 152 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 168 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 184 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 200 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 216 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 232 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 275 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 292 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 292 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 336 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 364 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 380 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 388 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 412 bytes
              rust-lld: error: section '.rodata' will not fit in region 'FLASH': overflowed by 412 bytes
              rust-lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
    
  2. added a commit that references this issue on Jun 10, 2022
  3. cbiffle commented on Apr 27, 2023

    @cbiffle
    Collaborator

    Can definitely confirm that this still doesn't always work.

  4. added this to the Unscheduled milestone on Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions