I have very little test project for PIC32MX440F512H, which builds (with XC32 v1.21) and works correctly.
Then I tried to generate 16-bit code, set checkbox "Generate 16-bit code", additional option appeared: -mips16
But now I get a lot of errors, here's a part of output:
make -f nbproject/Makefile-Orion.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `D:/projects/trcomp_bundle/project_common/fw_test_pic32/appl/fw_test_pic32.X'
make -f nbproject/Makefile-Orion.mk dist/Orion/debug/fw_test_pic32.X.debug.elf
make[2]: Entering directory `D:/projects/trcomp_bundle/project_common/fw_test_pic32/appl/fw_test_pic32.X'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s: Assembler messages:
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:223: Error: unrecognized opcode `rdpgpr'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:226: Error: unknown opcode `mfc0 $k0,$13'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:229: Error: unknown opcode `mfc0 $k1,$14'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:232: Error: illegal operands `srl'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:238: Error: illegal operands `sw'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:241: Error: unknown opcode `mfc0 $k1,$12'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:244: Error: illegal operands `sw'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:247: Error: unrecognized opcode `ins'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:250: Error: unrecognized opcode `ins'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:253: Error: unknown opcode `mtc0 $k1,$12'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:256: Error: illegal operands `sw'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:277: Error: illegal operands `sw'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:280: Error: illegal operands `sw'
d:\home\progr\LOCALS~1\Temp\ccnv5akn.s:283: Error: illegal operands `sw'
.................
I tried to clean project and rebuild, result is the same. If I remove that option, project is built successfully again.
What could be wrong?