Skip to content

kinetis: Change ISR names to match vendor header IRQ names#7761

Closed
jnohlgard wants to merge 13 commits intoRIOT-OS:masterfrom
jnohlgard:pr/kinetis-isr-names
Closed

kinetis: Change ISR names to match vendor header IRQ names#7761
jnohlgard wants to merge 13 commits intoRIOT-OS:masterfrom
jnohlgard:pr/kinetis-isr-names

Conversation

@jnohlgard
Copy link
Copy Markdown
Member

This PR changes the names of the interrupt service routines (ISR) to match the corresponding interrupt request (IRQ) name in the vendor headers, as closely as possible. This will make maintaining multiple CPU ports easier, and the peripheral configuration will become easier as well since the names make more sense.

The new naming breaks some coding conventions by using CamelCase and uppercase letters for these functions, but all are prefixed with isr_, like the coding conventions dictate.

Use case: As a side project, I am working on merging all Kinetis CPUs into a single cpu directory to reduce code duplication. It will be easier to maintain and add new CPUs if the vectors can be partially generated directly from vendor headers. It will be easier to verify the implementation when the vector table in the binary can be compared with the IRQ list in the vendor header.

@jnohlgard jnohlgard added 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 CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 18, 2017
@jnohlgard jnohlgard force-pushed the pr/kinetis-isr-names branch from 8389bd8 to 4a0bce1 Compare October 20, 2017 08:54
@haukepetersen
Copy link
Copy Markdown
Contributor

On first sight, I am not too happy with this change. Having the vector names following the coding rules makes the code just so much nicer to look at, and I more pressingly feel that if we start to make an exception to the rules here, people will start to make these exceptions in many other places (be it for good reasons or not), leading to a more incoherent code base... But maybe I am to picky here?!

It will be easier to verify the implementation when the vector table in the binary can be compared with the IRQ list in the vendor header.

I see the point, but I imagine that this test is mostly done automatically using some kind of script, right? In that case, I think it is easy to convert a string from upper to lower case. Also when using some kind of regex to do these checks, it is mostly also simple to ignore the case.

But in the end I stated my doubts, but I will not block this PR if it is decided to go with it, I just won't be the one merging this :-)

@jnohlgard
Copy link
Copy Markdown
Member Author

@haukepetersen would you be more ok with this if I change all isr names into lowercase, but the same names as they have in this PR?

@jnohlgard
Copy link
Copy Markdown
Member Author

closing in favour of #7878
The same change will be applied by #7878, only in a slightly more compact form.

@jnohlgard jnohlgard closed this Oct 27, 2017
@jnohlgard
Copy link
Copy Markdown
Member Author

#7878 was merged, deleting this branch

@jnohlgard jnohlgard deleted the pr/kinetis-isr-names branch November 28, 2017 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants