From c38427eea442b5a58b0b95ad88ff769be3abcc0d Mon Sep 17 00:00:00 2001 From: creiter64 <106512497+creiter64@users.noreply.github.com> Date: Mon, 13 Jan 2025 23:48:10 +0100 Subject: [PATCH] Fix function parameter shadowing global variable. (#1221) The function vApplicationFPUSafeIRQHandler gets the value of ICCIAR as parameter, but a constant containing the address of ICCIAR was also defined. Fix the name of the constant to align it with what it actually holds. --- portable/GCC/ARM_CA9/port.c | 6 +++--- portable/GCC/ARM_CA9/portASM.S | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/portable/GCC/ARM_CA9/port.c b/portable/GCC/ARM_CA9/port.c index 0fd9dd471..67bb0fc8c 100644 --- a/portable/GCC/ARM_CA9/port.c +++ b/portable/GCC/ARM_CA9/port.c @@ -208,9 +208,9 @@ volatile uint32_t ulPortYieldRequired = pdFALSE; volatile uint32_t ulPortInterruptNesting = 0UL; /* Used in the asm file. */ -__attribute__( ( used ) ) const uint32_t ulICCIAR = portICCIAR_INTERRUPT_ACKNOWLEDGE_REGISTER_ADDRESS; -__attribute__( ( used ) ) const uint32_t ulICCEOIR = portICCEOIR_END_OF_INTERRUPT_REGISTER_ADDRESS; -__attribute__( ( used ) ) const uint32_t ulICCPMR = portICCPMR_PRIORITY_MASK_REGISTER_ADDRESS; +__attribute__( ( used ) ) const uint32_t ulICCIARAddress = portICCIAR_INTERRUPT_ACKNOWLEDGE_REGISTER_ADDRESS; +__attribute__( ( used ) ) const uint32_t ulICCEOIRAddress = portICCEOIR_END_OF_INTERRUPT_REGISTER_ADDRESS; +__attribute__( ( used ) ) const uint32_t ulICCPMRAddress = portICCPMR_PRIORITY_MASK_REGISTER_ADDRESS; __attribute__( ( used ) ) const uint32_t ulMaxAPIPriorityMask = ( configMAX_API_CALL_INTERRUPT_PRIORITY << portPRIORITY_SHIFT ); /*-----------------------------------------------------------*/ diff --git a/portable/GCC/ARM_CA9/portASM.S b/portable/GCC/ARM_CA9/portASM.S index 4dec1d72e..5df123479 100644 --- a/portable/GCC/ARM_CA9/portASM.S +++ b/portable/GCC/ARM_CA9/portASM.S @@ -33,10 +33,10 @@ .set SVC_MODE, 0x13 .set IRQ_MODE, 0x12 - /* Hardware registers. */ - .extern ulICCIAR - .extern ulICCEOIR - .extern ulICCPMR + /* Hardware registers addresses. */ + .extern ulICCIARAddress + .extern ulICCEOIRAddress + .extern ulICCPMRAddress /* Variables and functions. */ .extern ulMaxAPIPriorityMask @@ -317,9 +317,9 @@ vApplicationIRQHandler: POP {PC} -ulICCIARConst: .word ulICCIAR -ulICCEOIRConst: .word ulICCEOIR -ulICCPMRConst: .word ulICCPMR +ulICCIARConst: .word ulICCIARAddress +ulICCEOIRConst: .word ulICCEOIRAddress +ulICCPMRConst: .word ulICCPMRAddress pxCurrentTCBConst: .word pxCurrentTCB ulCriticalNestingConst: .word ulCriticalNesting ulPortTaskHasFPUContextConst: .word ulPortTaskHasFPUContext