Hi so I’m trying to use a CM4 Port on a CM7 MCU and I keep running into this error:
ccmG4nWC.s: Assembler messages:
ccmG4nWC.s:330: Error: selected processor does not support vstmdbeq r0!,{s16-s31}' in Thumb mode ccmG4nWC.s:332: Error: instruction not allowed in IT block --
stmdb r0!,{r4-r11,r14}’
ccmG4nWC.s:352: Error: selected processor does not support vldmiaeq r0!,{s16-s31}' in Thumb mode ccmG4nWC.s:354: Error: instruction not allowed in IT block --
msr psp,r0’
*** [.pio\build\nucleo_h743zi\libcd9\Source\portable\GCC\ARM_CM4F\port.o] Error 1
The problem is regarding the following lines in port.c:
void xPortPendSVHandler( void )
{
/* This is a naked function. */
__asm volatile
(
" mrs r0, psp \n"
" isb \n"
" \n"
" ldr r3, pxCurrentTCBConst \n"/* Get the location of the current TCB. */
" ldr r2, [r3] \n"
" \n"
" tst r14, #0x10 \n"/* Is the task using the FPU context? If so, push high vfp registers. */
" it eq \n"
" vstmdbeq r0!, {s16-s31} \n"
" \n"
" stmdb r0!, {r4-r11, r14} \n"/* Save the core registers. */
" str r0, [r2] \n"/* Save the new top of stack into the first member of the TCB. */
" \n"
" stmdb sp!, {r0, r3} \n"
" mov r0, %0 \n"
" cpsid i \n"/* ARM Cortex-M7 r0p1 Errata 837070 workaround. */
" msr basepri, r0 \n"
" dsb \n"
" isb \n"
" cpsie i \n"/* ARM Cortex-M7 r0p1 Errata 837070 workaround. */
" bl vTaskSwitchContext \n"
" mov r0, #0 \n"
" msr basepri, r0 \n"
" ldmia sp!, {r0, r3} \n"
" \n"
" ldr r1, [r3] \n"/* The first item in pxCurrentTCB is the task top of stack. */
" ldr r0, [r1] \n"
" \n"
" ldmia r0!, {r4-r11, r14} \n"/* Pop the core registers. */
" \n"
" tst r14, #0x10 \n"/* Is the task using the FPU context? If so, pop the high vfp registers too. */
" it eq \n"
" vldmiaeq r0!, {s16-s31} \n"
" \n"
" msr psp, r0 \n"
" isb \n"
" \n"
#ifdef WORKAROUND_PMU_CM001 /* XMC4000 specific errata workaround. */
#if WORKAROUND_PMU_CM001 == 1
" push { r14 } \n"
" pop { pc } \n"
#endif
#endif
" \n"
" bx r14 \n"
" \n"
" .align 4 \n"
"pxCurrentTCBConst: .word pxCurrentTCB \n"
::"i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY )
);
}
I was wondering if theres a CM7 Port of FreeRTOS, I havent been able to find it
edit:
I was actually able to find the CM7 Port, and I tried the port.c of the CM7 Version but I still get the same error.
edit #2:
Okay so basically with PlatformIO, In my platform.ini file. Instead of:
extra_scripts = extra.py
I did
extra_scripts = pre: extra.py
And in the extra.py is where I have my compiler flags