Background: I'm trying to get the maximum performance of a board based on cortex-m85 and arm gcc 12.2-bet1.
I've read the realse note for arm gcc 12.2-bet1 and I could compile the code well with "-march=armv8.1-m.main+mve.fp+fp.dp+dsp". However, when I use "-mcpu=cortex-m85" to compile the code, it would report
"c:/program files (x86)/gnu arm embedded toolchain/10 2022.9/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: error: ./src/xxx.o: conflicting CPU architectures 2/21 c:/program files (x86)/gnu arm embedded toolchain/10 2022.9/bin/../lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ./src/xxx.o"
ps: I could compile the code with similar compiler options for cortex-m33 ("-mcpu=cortex-m33")
any suggestions are welcome.
Got a solution:
use "-mcpu=cortex-m85+nopacbti" instead to disable PACBTI extension and it will compile correctly