1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_library_include_directories(${ZEPHYR_BASE}/drivers) 4 5if(COMPILER STREQUAL gcc) 6 # GNU compiler options 7 # -mcpu=hs38_linux includes -matomic -mcode-density -mdiv-rem 8 # -mswap -mnorm -mll64 -mmpy-option=9 -mfpu=fpud_all 9 zephyr_cc_option(-mcpu=${GCC_M_CPU}) 10 zephyr_cc_option(-mno-sdata) 11 zephyr_cc_option_ifdef(CONFIG_FPU -mfpu=fpud_all) 12else() 13 # MWDT compiler options 14 zephyr_compile_options(-arcv2hs -core2 -Xatomic -Xll64 -Xunaligned -Xcode_density 15 -Xdiv_rem=radix4 -Xswap -Xbitscan -Xmpy_option=qmpyh 16 -Xshift_assist -Xbarrel_shifter -Xtimer0 -Xtimer1 -Xrtc) 17 zephyr_compile_options_ifdef(CONFIG_FPU -Xfpu_mac -Xfpud_div) 18 19 zephyr_ld_options(-Hlib=hs38_full) 20endif() 21 22set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "") 23