Description
I’m trying to build the Conexio Golioth project Hello. When I build it now I get these errors with the hardcoded credentials like the KCONFIGs aren’t accepted anymore?
Steps to Reproduce
C:/ncs/v2.9.1/conexio-firmware-sdk/samples/conexio_stratus/golioth_samples/hello/prj.conf:3: warning: attempt to assign the value ‘y’ to the undefined symbol GOLIOTH_SAMPLE_HARDCODED_CREDENTIALS
C:/ncs/v2.9.1/conexio-firmware-sdk/samples/conexio_stratus/golioth_samples/hello/prj.conf:52: warning: attempt to assign the value ‘“stratusPro_nrf9151@conexio-stratus”’ to the undefined symbol GOLIOTH_SAMPLE_PSK_ID
C:/ncs/v2.9.1/conexio-firmware-sdk/samples/conexio_stratus/golioth_samples/hello/prj.conf:53: warning: attempt to assign the value ‘“8ef15237651d0a82f28edb853592f6f9”’ to the undefined symbol GOLIOTH_SAMPLE_PSK
error: Aborting due to Kconfig warnings
Expected Behavior
It would build.
Actual Behavior
It does not build.
Environment
Zephyr 2.9.1 with Golioth 0.18.
Logs and Console Output
C:/ncs/v2.9.1/conexio-firmware-sdk/samples/conexio_stratus/golioth_samples/hello/prj.conf:3: warning: attempt to assign the value ‘y’ to the undefined symbol GOLIOTH_SAMPLE_HARDCODED_CREDENTIALS
C:/ncs/v2.9.1/conexio-firmware-sdk/samples/conexio_stratus/golioth_samples/hello/prj.conf:52: warning: attempt to assign the value ‘“stratusPro_nrf9151@conexio-stratus”’ to the undefined symbol GOLIOTH_SAMPLE_PSK_ID
C:/ncs/v2.9.1/conexio-firmware-sdk/samples/conexio_stratus/golioth_samples/hello/prj.conf:53: warning: attempt to assign the value ‘“8ef15237651d0a82f28edb853592f6f9”’ to the undefined symbol GOLIOTH_SAMPLE_PSK
error: Aborting due to Kconfig warnings
Attempts to Resolve
I can’t think of any to try.
@wischmi2 yes, hard coded credentials were removed in v0.18.0 . Shell commands can be used instead.
Are there instructions on how to do this for the Conexio Stratus 9161?
I’m building the Conexio version of the Golioth Hello code but I believe he assumes we can use the hardcoded credentials. When I try to build the Golioth version of the Hello program it crashes and gives me MBEDTLS_PK_C defined, but not all prerequisites.
This issue is specifically called out in a Golioth issue of the v18 code.
opened 04:27PM - 15 May 25 UTC
closed 10:01AM - 18 May 25 UTC
bug
### Golioth Firmware SDK Commit Hash
7c98d24e3c0f8f1ac46d17609c5cf59771e14f62
… ### Platform/OS
Zephyr SDK 0.17.1-rc1
### Hardware Target
nrf9160dk
### What host OS are you using?
Windows 11 Professional 24H2

### Current Behavior
After configuring the target board in VSCode using the nRF Connect plugin and compiling, compilation errors occur: **_#error "MBEDTLS_PK_C defined, but not all prerequisites"_** and **_#error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites"_**

### Expected Behavior
I hope to successfully compile the example code "hello"
`
/*
* Copyright (c) 2023 Golioth, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(hello_zephyr, LOG_LEVEL_DBG);
#include <golioth/client.h>
#include <samples/common/sample_credentials.h>
#include <string.h>
#include <zephyr/kernel.h>
#include <samples/common/net_connect.h>
struct golioth_client *client;
static K_SEM_DEFINE(connected, 0, 1);
static void on_client_event(struct golioth_client *client,
enum golioth_client_event event,
void *arg)
{
bool is_connected = (event == GOLIOTH_CLIENT_EVENT_CONNECTED);
if (is_connected)
{
k_sem_give(&connected);
}
LOG_INF("Golioth client %s", is_connected ? "connected" : "disconnected");
}
int main(void)
{
int counter = 0;
LOG_DBG("start hello sample");
k_sleep(K_SECONDS(5));
net_connect();
/* Note: In production, credentials should be saved in secure storage. For
* simplicity, we provide a utility that stores credentials as plaintext
* settings.
*/
const struct golioth_client_config *client_config = golioth_sample_credentials_get();
client = golioth_client_create(client_config);
golioth_client_register_event_callback(client, on_client_event, NULL);
k_sem_take(&connected, K_FOREVER);
while (true)
{
LOG_INF("Sending hello! %d", counter);
++counter;
k_sleep(K_SECONDS(5));
}
return 0;
}
`
### Steps To Reproduce
1. Create an application.




2. Configure the target board

3. Confirm and compile

4. Problem reproduction

### Logs, console output, or any kind of debug information
```shell
=========== Checkpoint: backup ===============
Restore: CONFIG_MBEDTLS_PSA_CRYPTO_C: False
Restore: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False
Restore: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False
Restore: CONFIG_MBEDTLS_USE_PSA_CRYPTO: True
Restore: CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT: False
Restore: CONFIG_MBEDTLS_THREADING: False
Restore: CONFIG_MBEDTLS_THREADING_ALT: False
=========== End psa_crypto_library_config ===============
CMake Warning at G:/nordic/golioth-ncs-workspace/zephyr/CMakeLists.txt:1002 (message):
No SOURCES given to Zephyr library:
..__nrf__subsys__net__lib__tls_credentials
Excluding target from build.
-- Configuring done (9.9s)
-- Generating done (0.6s)
-- Build files have been written to: I:/nrf-feasibility/build/nrf-feasibility
Dropping partition 'nrf_modem_lib_trace' since its size is 0.
-- Configuring done (15.1s)
-- Generating done (0.1s)
-- Build files have been written to: I:/nrf-feasibility/build
-- west build: building application
[5/441] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.99 (G:/nordic/golioth-ncs-workspace/zephyr), build: v4.0.99-ncs1-1
[11/441] Generating ../../tfm/CMakeCache.txt
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.48.1.windows.1")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: G:/nordic/ncs/toolchains/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
-- Found Python3: C:/Python313/python.exe (found version "3.13.1") found components: Interpreter
-- Found Python3: C:/Python313/python.exe (found suitable version "3.13.1", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: G:/nordic/golioth-ncs-workspace/zephyr/.cache
CMake Warning (dev) at G:/nordic/golioth-ncs-workspace/nrf/modules/trusted-firmware-m/tfm_boards/nrf9160/CMakeLists.txt:24 (install):
Policy CMP0177 is not set: install() DESTINATION paths are normalized. Run
"cmake --help-policy CMP0177" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done (1.5s)
-- Generating done (0.2s)
-- Build files have been written to: I:/nrf-feasibility/build/nrf-feasibility/tfm
[137/142] Linking C executable bin\tfm_s.axf
Memory region Used Size Region Size %age Used
FLASH: 32092 B 32 KB 97.94%
RAM: 11300 B 32 KB 34.48%
[18/441] Performing install step for 'tfm'
-- Install configuration: "MinSizeRel"
----- Installing platform NS -----
[20/441] Building C object modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto.dir/G_/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/library/pem.c.obj
FAILED: modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto.dir/G_/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/library/pem.c.obj
G:\nordic\ncs\toolchains\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=512 -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"nrf-psa-crypto-config.h\" -DNRF9160_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DPICOLIBC_DOUBLE_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -II:/nrf-feasibility/build/nrf-feasibility/zephyr/include/generated/zephyr -IG:/nordic/golioth-ncs-workspace/zephyr/include -II:/nrf-feasibility/build/nrf-feasibility/zephyr/include/generated -IG:/nordic/golioth-ncs-workspace/zephyr/soc/nordic -IG:/nordic/golioth-ncs-workspace/zephyr/lib/libc/common/include -IG:/nordic/golioth-ncs-workspace/zephyr/lib/posix/options/getopt -IG:/nordic/golioth-ncs-workspace/zephyr/soc/nordic/nrf91/. -IG:/nordic/golioth-ncs-workspace/zephyr/soc/nordic/common/. -IG:/nordic/golioth-ncs-workspace/zephyr/subsys/net/lib/coap/. -IG:/nordic/golioth-ncs-workspace/zephyr/subsys/net/lib/dns/. -IG:/nordic/golioth-ncs-workspace/zephyr/subsys/settings/include -IG:/nordic/golioth-ncs-workspace/zephyr/subsys/shell/modules/kernel_service/thread/.. -IG:/nordic/golioth-ncs-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/include -IG:/nordic/golioth-ncs-workspace/modules/lib/golioth-firmware-sdk/port/zephyr/../../include -IG:/nordic/golioth-ncs-workspace/modules/lib/golioth-firmware-sdk/examples/zephyr/common/include -IG:/nordic/golioth-ncs-workspace/nrf/include -II:/nrf-feasibility/build/nrf-feasibility/tfm/api_ns/interface/include -IG:/nordic/golioth-ncs-workspace/nrf/subsys/settings/include -IG:/nordic/golioth-ncs-workspace/nrf/modules/trusted-firmware-m/. -IG:/nordic/golioth-ncs-workspace/nrf/include/tfm -IG:/nordic/golioth-ncs-workspace/nrf/tests/include -IG:/nordic/golioth-ncs-workspace/modules/hal/cmsis/CMSIS/Core/Include -IG:/nordic/golioth-ncs-workspace/zephyr/modules/cmsis/. -IG:/nordic/golioth-ncs-workspace/nrf/modules/hal_nordic/. -IG:/nordic/golioth-ncs-workspace/modules/hal/nordic/nrfx -IG:/nordic/golioth-ncs-workspace/modules/hal/nordic/nrfx/drivers/include -IG:/nordic/golioth-ncs-workspace/modules/hal/nordic/nrfx/mdk -IG:/nordic/golioth-ncs-workspace/zephyr/modules/hal_nordic/nrfx/. -IG:/nordic/golioth-ncs-workspace/modules/lib/zcbor/include -IG:/nordic/golioth-ncs-workspace/nrfxlib/nrf_modem/include -II:/nrf-feasibility/build/nrf-feasibility/generated/interface_nrf_security_psa -IG:/nordic/golioth-ncs-workspace/nrf/subsys/nrf_security/include -IG:/nordic/golioth-ncs-workspace/modules/crypto/oberon-psa-crypto/include -IG:/nordic/golioth-ncs-workspace/nrf/subsys/nrf_security/src/utils -IG:/nordic/golioth-ncs-workspace/modules/crypto/oberon-psa-crypto/library -IG:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/library -IG:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/include -IG:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/include/library -isystem G:/nordic/golioth-ncs-workspace/nrfxlib/crypto/nrf_oberon/include -isystem G:/nordic/golioth-ncs-workspace/nrfxlib/crypto/nrf_oberon/include/mbedtls -fno-strict-aliasing -Os -imacros I:/nrf-feasibility/build/nrf-feasibility/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=G:/nordic/ncs/toolchains/arm-zephyr-eabi/arm-zephyr-eabi -imacros G:/nordic/golioth-ncs-workspace/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=I:/nrf-feasibility=CMAKE_SOURCE_DIR -fmacro-prefix-map=G:/nordic/golioth-ncs-workspace/zephyr=ZEPHYR_BASE -fmacro-prefix-map=G:/nordic/golioth-ncs-workspace=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -Wno-unused-function -Wno-unused-variable -MD -MT modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto.dir/G_/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/library/pem.c.obj -MF modules\nrf\subsys\nrf_security\src\CMakeFiles\mbedcrypto.dir\G_\nordic\golioth-ncs-workspace\modules\crypto\mbedtls\library\pem.c.obj.d -o modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto.dir/G_/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/library/pem.c.obj -c G:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/library/pem.c
In file included from I:/nrf-feasibility/build/nrf-feasibility/tfm/api_ns/interface/include/mbedtls/build_info.h:192,
from G:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/include/library/common.h:14,
from G:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/library/pem.c:8:
G:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/include/mbedtls/check_config.h:449:2: error: #error "MBEDTLS_PK_C defined, but not all prerequisites"
449 | #error "MBEDTLS_PK_C defined, but not all prerequisites"
| ^~~~~
G:/nordic/golioth-ncs-workspace/modules/crypto/mbedtls/include/mbedtls/check_config.h:1089:2: error: #error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites"
1089 | #error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites"
| ^~~~~
```
This issue is closed but there is no information on what the solution was or how to fix it.
marko
June 6, 2025, 9:23am
5
Hey @wischmi2 ,
Just a heads-up, the Conexio documentation is based on the Golioth Zephyr SDK, which was deprecated as of July 31, 2024, so it’s no longer up to date and shouldn’t be used as a reference.
Instead, use the Conexio Firmware SDK GitHub repo , particularly the golioth_samples/hello example . This sample is using the newer Golioth Firmware SDK , along with NCS v2.9.0.
They’re not yet on the latest Golioth Firmware SDK (v0.18.1
), so for now, I recommend you try building the golioth_samples/hello
example as-is from the Conexio Firmware SDK. Just make sure you’re using the correct versions: NCS v2.9.0 and Golioth Firmware SDK v0.17.0.
Hardcoded Golioth credentials are supported in Golioth Firmware SDK v0.17.0, so you’re good on that front.
Additionaly to be aware of, you’re currently trying to use Golioth Firmware SDK v0.18.0, which expects NCS v3.0.1, while you’re still on v2.9.1, so there’s a version mismatch.
@marko , thanks for the assist here with the Conexio SDK.
@wischmi2 , yes, currently the conexio SDK sample for Golioth is still using the Golioth Firmware SDK (v0.17.0
) as it is on NCS v2.9.0 atm. I will upgrade the Conexio SDK later to NCSv3.0.1 and to the latest Golioth SDK as well. It’s hard to keep up with the NCS releases every month
Reach out to Discord if the issue persists with the current Conexio SDK + Golioth.
Hi Rajeev, I was able to get the code building by going back to 0.17.0 Golioth sdk. Thanks for the info from everyone!
1 Like
@wischmi2 glad to hear that its up and running now.