This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[NRF52832][SDK 14.0][Keil] Hardware UART + Ble compilation issue

Hi,

Trying to implement a simple Hardware UART in parrallel with Ble on a custom board with mdbt42 Raytac module. I have the following compilation error:

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Program Files (x86)\Keil\ARM\ARMCC\Bin'
Build target 'nrf52832_xxaa'
compiling main.c...
linking...
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_init (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_put (referred from main.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.
".\_build\nrf52832_xxaa.axf" - 2 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:04

I tried a lot of things including to add corresponding source file to project and add folder path to compiler. Ble beacon project and UART peripheral project works well separatly. I often have difficult to merge projects using softdevice and projects without.

Does someone can help figuring out what wrong ?

Bellow the source code:

#include <stdbool.h>
#include <stdint.h>
#include "nordic_common.h"
#include "nrf_soc.h"
#include "nrf_sdh.h"
#include "nrf_sdh_ble.h"
#include "nrf_delay.h"
#include "ble_advdata.h"
#include "app_uart.h"
#include "app_timer.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
#include "nrf_gpio.h"

uint32_t err_code;
uint8_t cr = 'a';

const app_uart_comm_params_t comm_params =
      {
          17,
          16,
          NULL,
          NULL,
          APP_UART_FLOW_CONTROL_DISABLED,
          false,
          UART_BAUDRATE_BAUDRATE_Baud115200
      };
			

int main(void)
{
    // Initialize.
		nrf_gpio_cfg_output(25);
		nrf_gpio_cfg_output(26);
		nrf_gpio_cfg_output(27);
	
		APP_UART_INIT(&comm_params,
                         NULL,
                         APP_IRQ_PRIORITY_LOWEST,
                         err_code);
	
    for (;; )
    {
				nrf_gpio_pin_toggle(25);
				nrf_gpio_pin_toggle(26);
				nrf_gpio_pin_toggle(27);
				app_uart_put(cr);
				nrf_delay_ms(1000);
    }
}

Alexander

Parents Reply Children
No Data
Related