2019-07-25 16:44:41 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
|
|
|
|
2020-11-26 07:36:13 +08:00
|
|
|
if(COMPILER STREQUAL gcc)
|
|
|
|
# GNU compiler options
|
|
|
|
# -mcpu=hs38_linux includes -matomic -mcode-density -mdiv-rem
|
|
|
|
# -mswap -mnorm -mll64 -mmpy-option=9 -mfpu=fpud_all
|
|
|
|
zephyr_cc_option(-mcpu=${GCC_M_CPU})
|
|
|
|
zephyr_cc_option(-mno-sdata)
|
|
|
|
zephyr_cc_option_ifdef(CONFIG_FPU -mfpu=fpud_all)
|
|
|
|
else()
|
|
|
|
# MWDT compiler options
|
|
|
|
zephyr_cc_option(-arcv2hs -core2 -Xatomic -Xll64 -Xunaligned -Xcode_density
|
|
|
|
-Xdiv_rem=radix4 -Xswap -Xbitscan -Xmpy_option=qmpyh
|
|
|
|
-Xshift_assist -Xbarrel_shifter -Xtimer0 -Xtimer1 -Xrtc)
|
|
|
|
zephyr_cc_option_ifdef(CONFIG_FPU -Xfpu_mac -Xfpud_div)
|
2021-05-21 12:14:04 +08:00
|
|
|
|
|
|
|
zephyr_ld_options(-Hlib=hs38_full)
|
2020-11-26 07:36:13 +08:00
|
|
|
endif()
|
2019-07-25 16:44:41 +08:00
|
|
|
|
|
|
|
zephyr_sources(
|
|
|
|
soc.c
|
|
|
|
)
|