Hello Alice,
Yes, your example meet my requirement.
I am using cortex m0+ and you seem test on cortex m4 (k22). Am I wrong ?
CM0+ doesn't have fpu, maybe something is wrong with link option ?
My link option are :
arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -O3 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -T "../MKL46Z256xxx4_flash.ld" -Xlinker --gc-sections -Wl,-Map,"FreedomKL46Z.map" --specs=nano.specs -u _printf_float -specs=nosys.specs -Xlinker -z -Xlinker muldefs -o "FreedomKL46Z.elf" -Wl,--start-group [*.o files] -lc -lgcc -Wl,--end-group -Lm
Thanks for your help,
Jeremy