Skip to content

Conversation

@maribu
Copy link
Member

@maribu maribu commented Dec 21, 2025

Contribution description

  • rename irqs/<CPU_FAM>/irqs.h to irqs/<CPU_FAM>/stm32_irqs.h to reduce chance of a name conflict (irqs.h might not be unique)
  • add irqs/<CPU_FAM> to the include paths
  • add the #include "stm32{f0,f1,f2,f3,f4,f7,l0,...}xx.h" to the generated stm32_irqs.h

==> Now we can just go for #include "stm32_irqs.h and drop a lot of preprocessor conditionals

Testing procedure

The generated binaries should not change

Issues/PRs references

None

@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: cpu Area: CPU/MCU ports labels Dec 21, 2025
@maribu
Copy link
Member Author

maribu commented Dec 21, 2025

image

Output of elf_diff for the default example of the Nucleo-F767ZI.

@maribu maribu added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 21, 2025
@maribu maribu requested a review from crasbe December 21, 2025 14:49
@riot-ci
Copy link

riot-ci commented Dec 21, 2025

Murdock results

✔️ PASSED

b60df58 cpu/stm32: simplify handling of generated IRQ header

Success Failures Total Runtime
10968 0 10968 11m:15s

Artifacts

@aabadie aabadie enabled auto-merge December 22, 2025 08:38
@aabadie aabadie added this pull request to the merge queue Dec 22, 2025
@aabadie aabadie removed this pull request from the merge queue due to a manual request Dec 22, 2025
@aabadie
Copy link
Contributor

aabadie commented Dec 22, 2025

IIRC, once this is in master, users who already built firmwares for stm32 will have to manually remove the previously generated STM32 IRQ headers.

@maribu maribu force-pushed the cpu/stm32/simplify-irqs-header branch from d77faa4 to 1f1b55a Compare December 22, 2025 10:15
- rename `irqs/<CPU_FAM>/irqs.h` to `irqs/<CPU_FAM>/stm32_irqs.h` to
  reduce chance of a name conflict (`irqs.h` might not be unique)
- add `irqs/<CPU_FAM>` to the include paths
- add the `#include "stm32{f0,f1,f2,f3,f4,f7,l0,...}xx.h"` to the
  generated `stm32_irqs.h`

==> Now we can just go for `#include "stm32_irqs.h` and drop a lot of
    preprocessor conditionals
@maribu maribu force-pushed the cpu/stm32/simplify-irqs-header branch from 1f1b55a to b60df58 Compare December 22, 2025 10:18
@maribu
Copy link
Member Author

maribu commented Dec 22, 2025

I added a simple cleanup and a note to remove the cleanup after the next release branch has been created.

This will only remove the irqs.h for CPU family one is building for. Since we do not really have infrastructure for cleaning up after an update, I have no idea how to do this better.

@maribu
Copy link
Member Author

maribu commented Dec 23, 2025

Hmm, I wonder if it is better to just document that users should run git clean -Xdf after updates to remove all temporary files after each and every update. That feels more sensible than trying to manage that here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants