From 9245b4aaac0e2cd1fadff4fe701dcc99030d420c Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Mon, 16 Sep 2024 08:49:39 +0200 Subject: [PATCH] Cortex M3 MPS2: fix alignment warning from assembler (#1266) * Cortex M3 MPS2: fix alignment warning from assembler Fix assembler alignment warnings for Cortex M3 MPS2: Warning: section does not have enough alignment to ensure safe PC-relative loads Signed-off-by: Florian La Roche --- .github/workflows/ci.yml | 4 ++-- .github/workflows/kernel-unit-tests.yml | 8 ++++---- .../FreeRTOS_Plus_TCP_Echo_Qemu_mps2/startup.c | 3 +-- .../build/gcc/startup_gcc.c | 3 +-- .../CORTEX_MPU_M3_MPS2_QEMU_GCC/init/startup.c | 15 +++++---------- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c50e56690..b9efe89356 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: if: success() && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-candidate' ) env: GIT_SHA: - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: doxygen.zip-${{ github.sha }} path: ./freertos/doxygen.zip @@ -144,7 +144,7 @@ jobs: Upload memory size report as artifact (for main and release-candidate ONLY) if: success() && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-candidate' ) - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: freertos-memory-estimates path: ./freertos_lts_memory_estimates.json diff --git a/.github/workflows/kernel-unit-tests.yml b/.github/workflows/kernel-unit-tests.yml index 46945c4eb6..7f189c0876 100644 --- a/.github/workflows/kernel-unit-tests.yml +++ b/.github/workflows/kernel-unit-tests.yml @@ -28,12 +28,12 @@ jobs: make -C FreeRTOS/Test/CMock lcovhtml lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt - name: Archive code coverage data - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage-data path: FreeRTOS/Test/CMock/build/cmock_test* - name: Archive code coverage html report - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage-report path: FreeRTOS/Test/CMock/build/coverage @@ -69,12 +69,12 @@ jobs: make -C FreeRTOS/Test/CMock lcovhtml lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt - name: Archive code coverage data - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage-data path: FreeRTOS/Test/CMock/build/cmock_test* - name: Archive code coverage html report - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage-report path: FreeRTOS/Test/CMock/build/coverage diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/startup.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/startup.c index 72a269c07e..fc9e254788 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/startup.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/startup.c @@ -133,9 +133,8 @@ void Default_Handler2( void ) " mrseq r0, msp \n" " mrsne r0, psp \n" " ldr r1, [r0, #24] \n" - " ldr r2, handler2_address_const \n" + " ldr r2, =prvGetRegistersFromStack \n" " bx r2 \n" - " handler2_address_const: .word prvGetRegistersFromStack \n" ); } diff --git a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/startup_gcc.c b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/startup_gcc.c index fe6d2b1e99..5ce6d6c790 100644 --- a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/startup_gcc.c +++ b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc/startup_gcc.c @@ -142,9 +142,8 @@ void HardFault_Handler( void ) " mrseq r0, msp \n" " mrsne r0, psp \n" " ldr r1, [r0, #24] \n" - " ldr r2, handler2_address_const \n" + " ldr r2, =prvGetRegistersFromStack \n" " bx r2 \n" - " handler2_address_const: .word prvGetRegistersFromStack \n" ); } diff --git a/FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/init/startup.c b/FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/init/startup.c index 4a9752d460..0a49d0f62b 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/init/startup.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/init/startup.c @@ -134,9 +134,8 @@ void HardFault_Handler( void ) " mrseq r0, msp \n" " mrsne r0, psp \n" " ldr r1, [r0, #24] \n" - " ldr r2, handler2_address_const \n" + " ldr r2, =prvGetRegistersFromStack \n" " bx r2 \n" - " handler2_address_const: .word prvGetRegistersFromStack \n" ); } @@ -149,9 +148,8 @@ void MemMang_Handler( void ) " ite eq \n" " mrseq r0, msp \n" " mrsne r0, psp \n" - " ldr r1, handler3_address_const \n" + " ldr r1, =vHandleMemoryFault \n" " bx r1 \n" - " handler3_address_const: .word vHandleMemoryFault \n" ); } @@ -163,9 +161,8 @@ void BusFault_Handler( void ) " ite eq \n" " mrseq r0, msp \n" " mrsne r0, psp \n" - " ldr r1, handler4_address_const \n" + " ldr r1, =vHandleMemoryFault \n" " bx r1 \n" - " handler4_address_const: .word vHandleMemoryFault \n" ); } @@ -177,9 +174,8 @@ void UsageFault_Handler( void ) " ite eq \n" " mrseq r0, msp \n" " mrsne r0, psp \n" - " ldr r1, handler5_address_const \n" + " ldr r1, =vHandleMemoryFault \n" " bx r1 \n" - " handler5_address_const: .word vHandleMemoryFault \n" ); } @@ -191,9 +187,8 @@ void Debug_Handler( void ) " ite eq \n" " mrseq r0, msp \n" " mrsne r0, psp \n" - " ldr r1, handler6_address_const \n" + " ldr r1, =vHandleMemoryFault \n" " bx r1 \n" - " handler6_address_const: .word vHandleMemoryFault \n" ); }