2017-10-27 21:43:34 +08:00
|
|
|
if(CONFIG_GP_NONE)
|
|
|
|
set(gpopt none)
|
|
|
|
elseif(CONFIG_GP_LOCAL)
|
|
|
|
set(gpopt local)
|
|
|
|
elseif(CONFIG_GP_GLOBAL)
|
|
|
|
set(gpopt global)
|
|
|
|
elseif(CONFIG_GP_ALL_DATA)
|
|
|
|
set(gpopt data)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Set Global Pointer option based on Kconfig.
|
|
|
|
zephyr_cc_option(-mgpopt=${gpopt})
|
|
|
|
|
|
|
|
# TODO Find a way to pull this out of system.h somehow
|
|
|
|
# instead of having Kconfig for it
|
|
|
|
|
|
|
|
if(CONFIG_HAS_MUL_INSTRUCTION)
|
|
|
|
zephyr_cc_option(-mhw-mul)
|
|
|
|
else()
|
|
|
|
zephyr_cc_option(-mno-hw-mul)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_HAS_MULX_INSTRUCTION)
|
|
|
|
zephyr_cc_option(-mhw-mulx)
|
|
|
|
else()
|
|
|
|
zephyr_cc_option(-mno-hw-mulx)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_HAS_DIV_INSTRUCTION)
|
|
|
|
zephyr_cc_option(-mhw-div)
|
|
|
|
else()
|
|
|
|
zephyr_cc_option(-mno-hw-div)
|
|
|
|
endif()
|
|
|
|
|
2017-12-22 12:43:48 +08:00
|
|
|
set_property(GLOBAL PROPERTY E_KERNEL_ENTRY -e${CONFIG_KERNEL_ENTRY})
|
2017-10-27 21:43:34 +08:00
|
|
|
|
|
|
|
add_subdirectory(soc/${SOC_PATH})
|
|
|
|
add_subdirectory(core)
|