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

Fix NVIC_SetVector type in HAL for MAX32630FTHR #4308

Merged
merged 1 commit into from May 12, 2017

Conversation

Projects
None yet
8 participants
@c1728p9
Contributor

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.

MAX32630FTHR: Fix NVIC_SetVector type in HAL
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 from MAX32630FTHR: Fix NVIC_SetVector type in HAL to Fix NVIC_SetVector type in HAL for MAX32630FTHR May 11, 2017

@c1728p9

This comment has been minimized.

Contributor

c1728p9 commented May 11, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented May 12, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 192

All builds and test passed!

@pan-

pan- approved these changes May 12, 2017

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

@theotherjimmy theotherjimmy merged commit 0501a14 into ARMmbed:master May 12, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@sg- sg- removed the ready for merge label May 12, 2017

@geky

This comment has been minimized.

Member

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.

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