From 70f25eb329b7a1892e73032ba5fa1f93d628bf08 Mon Sep 17 00:00:00 2001 From: David Leach Date: Tue, 25 Jun 2019 15:06:40 -0500 Subject: [PATCH] logging: Fix misspelled CONFIG_RISCV32 The conditional CONFIG_RISCV32 was misspelled in is_rodata() resulting in the test failing all strings that are in RODATA section. Additionally, it was using wrong section names for riscv. Fixes #17065 Signed-off-by: David Leach --- subsys/logging/log_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/subsys/logging/log_core.c b/subsys/logging/log_core.c index 09bef2dd5ba..c58df406d45 100644 --- a/subsys/logging/log_core.c +++ b/subsys/logging/log_core.c @@ -125,13 +125,12 @@ static u32_t count_s(const char *str, u32_t nargs) */ static bool is_rodata(const void *addr) { -#if defined(CONFIG_ARM) || defined(CONFIG_ARC) || defined(CONIFG_RISCV32) || \ - defined(CONFIG_X86) +#if defined(CONFIG_ARM) || defined(CONFIG_ARC) || defined(CONFIG_X86) extern const char *_image_rodata_start[]; extern const char *_image_rodata_end[]; #define RO_START _image_rodata_start #define RO_END _image_rodata_end -#elif defined(CONFIG_NIOS2) +#elif defined(CONFIG_NIOS2) || defined(CONFIG_RISCV32) extern const char *_image_rom_start[]; extern const char *_image_rom_end[]; #define RO_START _image_rom_start