Skip to content

Fix NVIC_SetVector type in HAL for MAX32630FTHR #4308

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

Merged

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented May 11, 2017

Change the irq_handler parameter of NVIC_SetVector from a function
pointer to a uin32_t so it matches the cmsis specification. This
prevents the following problem from occurring in RTX5 when building
for IAR:
The error: Error[Pe167]: argument of type "void (*)(void)" is incompatible
with parameter of type "uint32_t".

Based on b5db960 from the CMSIS_5 branch.

Change the irq_handler parameter of NVIC_SetVector from a function
pointer to a uin32_t so it matches the cmsis specification. This
prevents the following problem from occurring in RTX5 when building
for IAR:
The error: Error[Pe167]: argument of type "void (*)(void)" is incompatible
with parameter of type "uint32_t".
@theotherjimmy theotherjimmy changed the title MAX32630FTHR: Fix NVIC_SetVector type in HAL Fix NVIC_SetVector type in HAL for MAX32630FTHR May 11, 2017
@c1728p9
Copy link
Contributor Author

c1728p9 commented May 11, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 192

All builds and test passed!

Copy link
Member

@pan- pan- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, anyone know why uint32_t was favored over uintptr_t ?

@geky
Copy link
Contributor

geky commented May 12, 2017

I'm guessing because the hardware definition is 32-bits. Perhaps in some weird world it could end up possible to have the compiler incorrectly emitting 64-bit pointers? Then the nvic taking in 32-bits would actually error.

Though at that point you'd probably notice something big was wrong anyways.

@psionprime
Copy link

psionprime commented Mar 11, 2019

Had a compiler (online) fault with uint32_t invalid pointer type nvic_setvector...looking around net seems this was changed a year or so ago but the onine compiler doesnt have the cast ...?

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

Successfully merging this pull request may close these issues.

9 participants