Kinetis Design Studio [beta]
Version: 1.0.1 [beta]
Create a new Kinetis Design Studio Project.
Select processor = MKL25Z128VLK4
Add component MQXLite
Generate Processor Expert code.
Build debug target...
'Building file: ../MQXLITE/psp/cortex_m/core/M0/dispatch.S'
'Invoking: Cross ARM GNU Assembler'
arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g3 -x assembler-with-cpp -I"C:/Users/srl/workspace.kds/test1/MQXLITE/include" -I"C:/Users/srl/workspace.kds/test1/MQXLITE/config" -I"C:/Users/srl/workspace.kds/test1/MQXLITE/kernel" -I"C:/Users/srl/workspace.kds/test1/MQXLITE/psp/cortex_m" -I"C:/Users/srl/workspace.kds/test1/MQXLITE/psp/cortex_m/core/M0" -I"C:/Users/srl/workspace.kds/test1/MQXLITE/psp/cortex_m/compiler/cwgcc" -MMD -MP -MF"MQXLITE/psp/cortex_m/core/M0/dispatch.d" -MT"MQXLITE/psp/cortex_m/core/M0/dispatch.o" -c -o "MQXLITE/psp/cortex_m/core/M0/dispatch.o" "../MQXLITE/psp/cortex_m/core/M0/dispatch.S"
../MQXLITE/psp/cortex_m/core/M0/dispatch.S: Assembler messages:
../MQXLITE/psp/cortex_m/core/M0/dispatch.S:276: writing to APSR without specifying a bitmask is deprecated
'Finished building: ../MQXLITE/psp/cortex_m/core/M0/dispatch.S'
Message was edited by: Stephen Langstaff
Hi Stephen,
it looks like the GCC v 4.8.0 which is in KDS evaluates the move to special register wrong way (msr APSR, rn).
For Cortex M0 (M0+) the syntax does not specify status register fields
Syntax MSR spec_reg, Rn
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0662b/BABGIDDI.html
For Cortex M4 the syntax requires optional flags
Syntax MSR{cond} spec_reg, Rn
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/BABEEJCI.html
When checking the syntax MSR APSR_nzcvq, Rn (which is OK for GCC 4.8.0) with IAR on M0+ the compiler emits
Error[447]: The selected cpu/core does not support status register fields.
So you can try do following workaround to which should work on all compilers supported by PEx:
Modify the code in "c:\Freescale\KDS_1.1\eclipse\ProcessorExpert\lib\mqxlite\V1.1.x\source\psp\cortex_m\core\M0\dispatch.S" on line 276 following way.
#ifdef __GNUC__
msr APSR_nzcvq, r1
#else
msr APSR, r1
#endif
After that when you regenerate project (or create new one) you should be able to compile it.
Regards Petr
I thought I'd report that this bug is still present in KDS 1.1.1. If I create a new project for the KE06 using Processor Expert, it compiles, but this error still shows up.
Hi Stephen Langstaff ,
I have reproduced this problem and logged this problem as a defect to DevTech team. report number: ENGR00320240
I will keep you posted.
Best Regards,
ZhangJun
I have seen this occasionally as well when targeting a KE06, but I seem to be able to launch the debugger despite the error.