FreeRTOS compile error: instruction not allowed in IT block — 'msr psp, r0'…

Sysprogs forums Forums VisualGDB FreeRTOS compile error: instruction not allowed in IT block — 'msr psp, r0'…

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #11877
    Mikko
    Participant

    Hi,

    I get this error while trying to compile program for STM32F429ZI containing FreeRTOS:

    Error 4 error : instruction not allowed in IT block -- msr psp,r0' 
    Error 2 error : instruction not allowed in IT block -- stmdb r0!,{r4-r11,r14}';
    Error 3 error : selected processor does not support Thumb mode vldmiaeq r0!,{s16-s31}'
    Error 1 error : selected processor does not support Thumb mode vstmdbeq r0!,{s16-s31}'

    I’m using FreeRTOS 7.6.0 with software floating point enabled with following flags:

    CFLAGS: -ggdb -fno-exceptions -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mcpu=cortex-m4 -D__irq=""
     CXXFLAGS: -ggdb -fno-rtti -fno-exceptions -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mcpu=cortex-m4 -D__irq=""
     ASFLAGS: -ggdb -fno-rtti -fno-exceptions -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mcpu=cortex-m4 -D__irq=""
    

    I have an additional linker input as well specified for cortex-m4f and I have included portable files for AMR_CM4F.

    I don’t understand why it gives me this error while I “should” have everything I need to have in place.

    -Mikko

    • This topic was modified 7 years, 2 months ago by Mikko.
    • This topic was modified 7 years, 2 months ago by Mikko.
    #11889
    support
    Keymaster

    Hi,

    Most likely the FreeRTOS port file you are using is not compatible with your CPU core and floating point mode. Please try changing FreeRTOS port via VisualGDB Project Properties -> Embedded Frameworks (or manually selecting a port.c file from a different folder if you are not referencing FreeRTOS via VisualGDB framework mechanism).

    #11933
    Mikko
    Participant

    Hi,

    I think you were right, even though I still get other errors, I don’t think they are completely FreeRTOS related.

    Thanks!

    #11938
    support
    Keymaster

    Hi,

    Good to know it works. If you encounter further errors, feel free to contact us again.

    #11940
    Mikko
    Participant

    Hi,

    Even tough it works somewhat(I use ARM_CM3 port.c), for some reason I can use ARM_CM4F port.c file in Keil and Eclipse. Is this more of a linking difference between IDEs? The little tricky part is that if I use Hardware FP I get rid of that error while using CM4F port.c -file, but as mentioned I have an additional linker input file which requires use of Software FP so then there will be conflict. Could this be resolved with additional flags or some modification of files?

    To make sure, yes, it works with _CM3 port.c -file, but I thought if there would be way to get _CM4F working same way as it does with other IDEs. It seem that with VisualGDB FreeRTOS you have to use CM3 with software floating and CM4F with hardware floating.

    -Mikko

    #11996
    support
    Keymaster

    Hi,

    Perhaps Keil/Eclipse enables the hardware FP implicitly or the version of port.c you use with those IDEs contains conditional statements that exclude FP-specific code?

    Please try searching the port.c file compiled with Eclipes for “vstmdbeq” and see if it has any #ifdef’s around it. If no, please check the exact command line used to build this file. Does it contain any FP-related settings?

    #12013
    Mikko
    Participant

    Hi,

    I got it working first converting it to stand-alone project and then manually selecting FP.

    Thanks anyway for suggestions.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.