Skip to content

Commit

Permalink
Revert "sdfw_services: regenerate zcbor encoders/decoders with curren…
Browse files Browse the repository at this point in the history
…t version"

This reverts commit 48d68a3.

This commit breaks compatibility with older versions of SDFW.
We have as a target for the next release to enable getting
entropy from SDFW by default. This means that applications/tests
which needs entropy will use SDFW for the first time.
If this commit is not reverted all the affected testing CI plans
will have to update their SDFW in order to pass if this commit
is not reverted. So we concluded to revert this commit now in order
to allow enabling entropy from the SDFW and open another PR
to reapply this commit which can be merged when all the affected
CI plans are updated to the required SDFW version.

Signed-off-by: Georgios Vasilakis <[email protected]>
  • Loading branch information
Vge0rge committed Jan 16, 2025
1 parent 2ee7988 commit b013a62
Show file tree
Hide file tree
Showing 24 changed files with 1,954 additions and 913 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand All @@ -22,45 +22,47 @@
#error "The type file was generated with a different default_max_qty than this file"
#endif

#define log_result(state, result, func) \
do { \
if (!result) { \
zcbor_trace_file(state); \
zcbor_log("%s error: %s\r\n", func, \
zcbor_error_str(zcbor_peek_error(state))); \
} else { \
zcbor_log("%s success\r\n", func); \
} \
} while (0)

static bool decode_echo_service_rsp(zcbor_state_t *state, struct echo_service_rsp *result);
static bool decode_echo_service_req(zcbor_state_t *state, struct zcbor_string *result);

static bool decode_echo_service_rsp(zcbor_state_t *state, struct echo_service_rsp *result)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_decode(state) &&
((((zcbor_int32_decode(state, (&(*result).echo_service_rsp_ret)))) &&
((zcbor_tstr_decode(state, (&(*result).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));
bool tmp_result =
(((zcbor_list_start_decode(state) &&
((((zcbor_int32_decode(state, (&(*result).echo_service_rsp_ret)))) &&
((zcbor_tstr_decode(state, (&(*result).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

static bool decode_echo_service_req(zcbor_state_t *state, struct zcbor_string *result)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_decode(state) &&
((((zcbor_tstr_decode(state, (&(*result)))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));
bool tmp_result = (((zcbor_list_start_decode(state) &&
((((zcbor_tstr_decode(state, (&(*result)))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

int cbor_decode_echo_service_req(const uint8_t *payload, size_t payload_len,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand All @@ -22,45 +22,47 @@
#error "The type file was generated with a different default_max_qty than this file"
#endif

#define log_result(state, result, func) \
do { \
if (!result) { \
zcbor_trace_file(state); \
zcbor_log("%s error: %s\r\n", func, \
zcbor_error_str(zcbor_peek_error(state))); \
} else { \
zcbor_log("%s success\r\n", func); \
} \
} while (0)

static bool encode_echo_service_rsp(zcbor_state_t *state, const struct echo_service_rsp *input);
static bool encode_echo_service_req(zcbor_state_t *state, const struct zcbor_string *input);

static bool encode_echo_service_rsp(zcbor_state_t *state, const struct echo_service_rsp *input)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_encode(state, 2) &&
((((zcbor_int32_encode(state, (&(*input).echo_service_rsp_ret)))) &&
((zcbor_tstr_encode(state, (&(*input).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 2))));
bool tmp_result =
(((zcbor_list_start_encode(state, 2) &&
((((zcbor_int32_encode(state, (&(*input).echo_service_rsp_ret)))) &&
((zcbor_tstr_encode(state, (&(*input).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 2))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

static bool encode_echo_service_req(zcbor_state_t *state, const struct zcbor_string *input)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_encode(state, 1) &&
((((zcbor_tstr_encode(state, (&(*input)))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 1))));
bool tmp_result = (((zcbor_list_start_encode(state, 1) &&
((((zcbor_tstr_encode(state, (&(*input)))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 1))));

if (!tmp_result) {
zcbor_trace_file(state);
zcbor_log("%s error: %s\r\n", __func__, zcbor_error_str(zcbor_peek_error(state)));
} else {
zcbor_log("%s success\r\n", __func__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

int cbor_encode_echo_service_req(uint8_t *payload, size_t payload_len,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
# Copyright (c) 2022 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
Expand Down
Loading

0 comments on commit b013a62

Please sign in to comment.