Hello Nordic community,
I'm currently working on a project that involves BLE (Bluetooth Low Energy) using UART configuration alongside FRTOS (FreeRTOS) in a PCA10056 dk (nrf52840). After diving into the topic, I've found that integrating BLE with NUS (Nordic UART Service) into an FRTOS project can be quite challenging.
In my search for a solution, I stumbled upon a helpful resource: Creating a working BLE NUS (Nordic UART Service) example with FreeRTOS . This post suggests using a preconfigured system that already includes FRTOS and the NUS UART services.
I've experimented with this project using SES (Segger Embedded Studio), and the debugger functions smoothly. However, I'm more accustomed to working with makefiles and VSC (Visual Studio Code). Therefore, I have tried to build the project using make commands (and the same makefile of the project without any modification (which it is in the following path: usbd_ble_uart_freertos\pca10056\s140\armgcc)) and then debugging with Ozone. To my surprise, the same code did not work well. after performing:
/** * @brief Function for the SoftDevice initialization. * * @details This function initializes the SoftDevice and the BLE event interrupt. */ static void ble_stack_init(void) { ret_code_t err_code; err_code = nrf_sdh_enable_request(); APP_ERROR_CHECK(err_code);
the error code returned from nrf_sdh_enable_request(); is 8. But when I run the same project in SES, I do not have this error.
Could my issue be related to how the SoftDevice is being flashed? Just to reiterate, I'm utilizing the makefile provided by the SDK, found in the example directory at "usbd_ble_uart_freertos\pca10056\s140\armgcc". The only difference is that I added this line to get an .elf file output:
I am using the latest version of the SDK: nRF5_SDK_17.1.0_ddde560