Skip to content

buildsystem/CI: Use of BOARD_INSUFFCIENT_MEMORY becomes a maintainace burdon #11128

@maribu

Description

@maribu

Description

Currently for every test and application the BOARD_INSUFFICIENT_MEMORY variable needs to be manually maintained. This makes adding new boards with low RAM/FLASH a nightmare. Also, boards will practically never be removed from BOARD_INSUFFCIENT_MEMORY, even though newer toolchains and improvements in code could result in lower RAM/ROM requirements.

Additionally, the BOARD_INSUFFICIENT_MEMORY approach reduces compilation test coverage. E.g. a test will not be compiled at all when blacklisted via BOARD_INSUFFCIENT_MEMORY, but only the linking stage will fail because of insufficient RAM/flash. Any possible issue that the compilation stage would uncover remain unrevealed.
Update: Only the linking step is skipped when blacklisted via BOARD_INSUFFICIENT_MEMORY

Brainstorming of Possible Alternatives

  1. Let make fail with a custom exit code upon linking stage. The CI can handle treat this return code not as an error
    • Pros:
      • Relatively straight forward
    • Cons:
      • No obvious disadvantages
  2. Add a special Make target that overrides link time checks
    • Pros:
      • Relatively straight forward
      • No changes in the CI required except for using that specific target
    • Cons:
      • A really ugly hack
      • A user might not read the doc, notice that the make target "ci_build" magically makes the error go away and will try to flash the result
  3. Add something like RAM_PROVIDED and FLASH_PROVIDED to every MCU, let boards override those in case of bootloaders. Add RAM_REQUIRED and FLASH_REQUIRED to every test and example
    • Pros:
      • No obvious advantages
    • Cons:
      • A lot of effort to add those to every board
      • A maintenance burden to keep them up to date
      • RAM/flash requirements depend on the toolchain, the CPU/board specific code, the name of the git branch baked into the "hello message" upon boot, and the alignment of the stars

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CIArea: Continuous Integration of RIOT componentsArea: build systemArea: Build systemState: staleState: The issue / PR has no activity for >185 daysType: cleanupThe issue proposes a clean-up / The PR cleans-up parts of the codebase / documentationType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions