diff options
author | Paul Fagerburg <pfagerburg@google.com> | 2021-01-22 18:37:45 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-25 20:55:46 +0000 |
commit | 0f7a6d893cd3ae751a587d763e8d01394b69255e (patch) | |
tree | d02fc17e4830f8307cf5b032591dd8e561e7cb42 /zephyr | |
parent | c109df3a44c7a7e3b0504812d89aa7b68c76da73 (diff) | |
download | chrome-ec-0f7a6d893cd3ae751a587d763e8d01394b69255e.tar.gz |
zephyr: test: provide Kconfig defaults for tests
When we're building a unit test, provide defaults for many of the
hardware options that don't need to be included in a unit test, or
have to be there for the linker's sake but aren't actually used.
BUG=b:178220157
BRANCH=none
TEST=`zmake testall`
Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: Iaab2a3a3a8175e7e08099467947cf183b707cef6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645695
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/Kconfig | 3 | ||||
-rw-r--r-- | zephyr/app/ec/Kconfig | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig index a1d2d142e5..55f3b74c12 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -208,6 +208,7 @@ endif # PLATFORM_EC_FLASH menuconfig PLATFORM_EC_KEYBOARD bool "Keyboard support" select HAS_TASK_KEYSCAN + default n if ARCH_POSIX default y help Enable compilation of support for scanning a keyboard and providing @@ -275,6 +276,7 @@ config PLATFORM_EC_HOOKS config PLATFORM_EC_I2C bool "I2C shim" + default n if ARCH_POSIX default y help Enable compilation of the EC i2c module. Once enabled, it will be @@ -285,6 +287,7 @@ config PLATFORM_EC_I2C menuconfig PLATFORM_EC_HOSTCMD bool "Host commands" + default n if ARCH_POSIX default y if AP select HAS_TASK_HOSTCMD help diff --git a/zephyr/app/ec/Kconfig b/zephyr/app/ec/Kconfig index 22519a20fa..44f8690f64 100644 --- a/zephyr/app/ec/Kconfig +++ b/zephyr/app/ec/Kconfig @@ -42,51 +42,64 @@ config CROS_EC_ACTIVE_COPY When the active copy name is output to a console, this string will be displayed. +# When building for the host, we still need values for the various memory +# sizes, though they aren't actually used, so just set some reasonable-looking +# values and then ignore them. config CROS_EC_RAM_SIZE hex "The total available RAM size." + default 0x0000f800 if ARCH_POSIX help This value describes the total available RAM size for the chip. config CROS_EC_DATA_RAM_SIZE hex "The total available RAM size for data." + default 0x00010000 if ARCH_POSIX help This value describes the total available RAM size for data on the chip. config CROS_EC_RAM_BASE hex "Base address of RAM for the chip." + default 0x200c0000 if ARCH_POSIX help Base address of RAM for the chip. config CROS_EC_PROGRAM_MEMORY_BASE hex "The base address of the program memory region." + default 0x10090000 if ARCH_POSIX help This will be used (among other things) to calculate the current PC's offset within the program memory. config CROS_EC_RO_MEM_OFF hex "The RO region's offset." + default 0x0 if ARCH_POSIX help This will be used to determine if the current PC is in the RO section. config CROS_EC_RO_SIZE hex "The size of the RO region." + default 0xb000 if ARCH_POSIX help This will be used (along with SYSTEM_RO_MEM_OFF) to determine if the current PC is in the RO section. config CROS_EC_RW_MEM_OFF hex "The RW region's offset." + default 0xb000 if ARCH_POSIX help This will be used to determine if the current PC is in the RW section. config CROS_EC_RW_SIZE hex "The size of the RW region." + default 0x75000 if ARCH_POSIX help This will be used (along with SYSTEM_RW_MEM_OFF) to determine if the current PC is in the RW section. +# By default, a unit test doesn't need shimmed tasks. config SHIMMED_TASKS bool "Add support for shimming in platform/ec tasks as Zephyr threads" + default n if ARCH_POSIX help When this option is enabled, a shimmed_tasks.h header with the CROS_EC_TASK_LIST defined needs to be included for the project to |