forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nashif/cmake_anas2
WIP: improve sanitycheck and add more SoCs and samples
- Loading branch information
Showing
22 changed files
with
175 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
zephyr_library_include_directories(PRIVATE ${PROJECT_SOURCE_DIR}/drivers) | ||
|
||
if(CONFIG_SOC_QUARK_D2000) | ||
target_compile_definitions(zephyr PUBLIC | ||
QM_LAKEMONT | ||
-DSOC_SERIES=quark_d2000 | ||
) | ||
endif() | ||
|
||
target_cc_option(zephyr PUBLIC -march=lakemont -mtune=lakemont -msoft-float) | ||
|
||
if(CONFIG_X86_IAMCU) | ||
set_property(GLOBAL APPEND PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES -D__IAMCU) | ||
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT "elf32-iamcu") | ||
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH "iamcu:intel") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,25 @@ | ||
zephyr_library() | ||
|
||
zephyr_library_include_directories(PRIVATE ${PROJECT_SOURCE_DIR}/drivers) | ||
|
||
if(COMPILER STREQUAL "clang") | ||
else() | ||
target_cc_option(zephyr PUBLIC -march=lakemont -mtune=lakemont) | ||
if(CONFIG_SOC_QUARK_SE_C1000) | ||
target_compile_definitions(zephyr PUBLIC | ||
QM_LAKEMONT | ||
-DSOC_SERIES=quark_se | ||
) | ||
endif() | ||
|
||
target_cc_option(zephyr PUBLIC -msoft-float -march=pentium) | ||
target_cc_option(zephyr PUBLIC -march=lakemont -mtune=lakemont -msoft-float) | ||
|
||
if(CONFIG_X86_IAMCU) | ||
target_cc_option(zephyr PUBLIC -miamcu) | ||
set_property(GLOBAL APPEND PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES -D__IAMCU) | ||
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT "elf32-iamcu") | ||
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH "iamcu:intel") | ||
else() | ||
target_cc_option(zephyr PUBLIC -mno-iamcu) | ||
endif() | ||
|
||
target_compile_definitions(zephyr PUBLIC QM_LAKEMONT=1) | ||
|
||
set(SOC_SERIES quark_se) # PARENT_SCOPE or global property? | ||
|
||
# ccflags-y +=-I$(srctree)/arch/x86 | ||
# ccflags-y +=-I$(srctree)/include/drivers | ||
# ccflags-y +=-I$(srctree)/drivers | ||
# asflags-y := ${ccflags-y} | ||
|
||
zephyr_library_sources_ifdef(CONFIG_SOC_QUARK_SE_C1000 | ||
soc.c | ||
soc_config.c | ||
eoi.c | ||
power.c | ||
soc_power.S | ||
target_sources(zephyr PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR}/soc.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/soc_config.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/eoi.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/power.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/soc_power.S | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD arduino_101) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD quark_d2000_crb) | ||
set(BOARD arduino_101) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c) | ||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD nucleo_f103rb) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD nucleo_f103rb) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD arduino_101) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD arduino_101) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD arduino_101) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD qemu_x86) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD qemu_x86) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD qemu_x86) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD qemu_x86) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD qemu_x86) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if(DEFINED ENV{BOARD}) | ||
set(BOARD $ENV{BOARD}) | ||
else() | ||
set(BOARD qemu_x86) | ||
endif() | ||
|
||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) | ||
project(NONE) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
target_sources_ifdef(CONFIG_OPENOCD_SUPPORT zephyr PRIVATE | ||
${CMAKE_CURRENT_LIST_DIR}/openocd.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
target_sources_ifdef(CONFIG_SYS_LOG zephyr PRIVATE | ||
${CMAKE_CURRENT_LIST_DIR}/sys_log.c) | ||
target_sources_ifdef(CONFIG_KERNEL_EVENT_LOGGER zephyr PRIVATE | ||
${CMAKE_CURRENT_LIST_DIR}/event_logger.c | ||
${CMAKE_CURRENT_LIST_DIR}/kernel_event_logger.c | ||
) |