Hi,
I am currently trying to use std::optional in my program, but the program crashes whenever has_value() is called.
Another thing that I have noticed, is that I can't place a breakpoint for the remainder of the function after the std::object is retrieved. The same library/function worked with an STM32 build system.
Fullscreen
1
2
3
4
5
6
7
for (int i = 0; i < Ceil(number_of_bits, 8); i++) {
response_data[i] = 0;
}
for (uint16_t i = 0; i < number_of_bits; i++) {
auto itm = register_1bit_.GetItem(start_addr + i);
if (itm.has_value()) {
my config file looks like this:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_IOTA_MAIN_BOARD=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y
# Enable RTT
CONFIG_USE_SEGGER_RTT=y
# enable GPIO
CONFIG_GPIO=y
# enable uart driver
CONFIG_SERIAL=y