Description
Description
Nuvoton's NUMAKER_PFM_M2351 target is M23 based. Currently, it only supports ARMC6 toolchain. Its GCC support has merged into master but is not enabled due to some reason. Testing on recent master and GCC, it compiles failed with:
[Warning] @,: Compiler version mismatch: Have 7.3.1; expected version >= 6.0.0 and < 7.0.0 Building project mbed-os-example-blinky (NUMAKER_PFM_M2351, GCC_ARM) Scan: mbed-os-example-blinky Using ROM region application in this build. Region application: size 0x40000, offset 0x10040000 Using RAM region application_ram in this build. Region application_ram: size 0x10000, offset 0x30008000 Compile [ 0.1%]: mbed_tz_context.c Compile [ 0.3%]: MCR20Drv.c Compile [ 0.4%]: at24mac.cpp Compile [ 0.5%]: NanostackRfPhyAtmel.cpp Compile [ 0.6%]: NanostackRfPhyMcr20a.cpp Compile [ 0.8%]: main.cpp Compile [ 0.9%]: rf_configuration.c Compile [ 1.0%]: fslittle_test.c Compile [ 1.1%]: at24mac_s2lp.cpp Compile [ 1.3%]: NanostackRfPhys2lp.cpp Compile [ 1.4%]: FlashIAPBlockDevice.cpp [ERROR] C:\Users\ccli8\AppData\Local\Temp\ccq605pf.s: Assembler messages: C:\Users\ccli8\AppData\Local\Temp\ccq605pf.s:898: Error: instruction not supported in Thumb16 mode -- `subs r0,r4,r1' C:\Users\ccli8\AppData\Local\Temp\ccq605pf.s:961: Error: instruction not supported in Thumb16 mode -- `adds r1,r2,#1'
It seems the error comes from mbed-os/platform/internal/mbed_atomic_impl.h. GCC doesn't translate in UAL syntax. If I roll back mbed-os to 5.12.4, it compiles OK.
Steps to reproduce
GCC:
GNU Tools for Arm Embedded Processors 7-2018-q2-update
mbed-os-example-blinky:
0b8957a (HEAD -> master, origin/master, origin/HEAD) Merge pull request #173 from jamesbeyond/test
mbed-os:
541dee4 (HEAD -> master, origin/master, origin/HEAD) Merge pull request #10553 from korjaa/semihosting_docs
-
Enable NUMAKER_PFM_M2351 GCC support by add
GCC_ARM
in mbed-os/targets/targets.json for NUMAKER_PFM_M2351 target:"supported_toolchains": ["ARMC6", "GCC_ARM"],
-
Uner mbed-os-example-blinky root directory, compile by running:
mbed compile -m NUMAKER_PFM_M2351 -t GCC_ARM
Issue request type
[ ] Question
[ ] Enhancement
[X] Bug