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

ble_app_uart_c compile effors: SDK 12.3, NFR51-DK, Keil 5.28

Hello again Nordic Pro's,

I have a mildly modiffied version of ble_app_uart_c that compiles and runs fine on an NRF52-DK board.  I am now trying to use the same code on a NRF51-DK board and I get the follwing build error and warnings:

I cannot find the problem.  Can someone please help?

Thanks

Robin @ TL

Build target 'nrf51422_xxac'
compiling bsp_nfc.c...
..\..\..\..\..\..\components\boards\boards.h(93): error: #40: expected an identifier
bool bsp_board_led_state_get(uint32_t led_idx);
..\..\..\..\..\..\components\libraries\bsp\bsp_nfc.c: 0 warnings, 1 error
compiling boards.c...
..\..\..\..\..\..\components\boards\boards.h(93): error: #40: expected an identifier
bool bsp_board_led_state_get(uint32_t led_idx);
..\..\..\..\..\..\components\boards\boards.c: 0 warnings, 1 error
compiling bsp_btn_ble.c...
..\..\..\..\..\..\components\boards\boards.h(93): error: #40: expected an identifier
bool bsp_board_led_state_get(uint32_t led_idx);
..\..\..\..\..\..\components\libraries\bsp\bsp_btn_ble.c: 0 warnings, 1 error
compiling bsp.c...
..\..\..\..\..\..\components\boards\boards.h(93): error: #40: expected an identifier
bool bsp_board_led_state_get(uint32_t led_idx);
..\..\..\..\..\..\components\libraries\bsp\bsp.c(206): warning: #223-D: function "bsp_board_led_state_get" declared implicitly
if (bsp_board_led_state_get(BSP_LED_INDICATE_INDICATE_ADVERTISING))
..\..\..\..\..\..\components\libraries\bsp\bsp.c(227): warning: #223-D: function "bsp_board_led_state_get" declared implicitly
if (bsp_board_led_state_get(BSP_LED_INDICATE_ADVERTISING_WHITELIST))
..\..\..\..\..\..\components\libraries\bsp\bsp.c(249): warning: #223-D: function "bsp_board_led_state_get" declared implicitly
if (bsp_board_led_state_get(BSP_LED_INDICATE_ADVERTISING_SLOW))
..\..\..\..\..\..\components\libraries\bsp\bsp.c(269): warning: #223-D: function "bsp_board_led_state_get" declared implicitly
if (bsp_board_led_state_get(BSP_LED_INDICATE_ADVERTISING_DIRECTED))
..\..\..\..\..\..\components\libraries\bsp\bsp.c: 4 warnings, 1 error
compiling main.c...
..\..\..\..\..\..\components\boards\boards.h(93): error: #40: expected an identifier
bool bsp_board_led_state_get(uint32_t led_idx);
..\..\..\main.c: 0 warnings, 1 error
compiling ble_conn_params.c...
compiling ble_nus_c.c...
compiling ble_srv_common.c...
compiling ble_advdata.c...
compiling ble_db_discovery.c...
compiling nrf_drv_clock.c...
compiling nrf_drv_common.c...
compiling app_button.c...
compiling nrf_drv_gpiote.c...
compiling app_fifo.c...
compiling app_error.c...
compiling hardfault_implementation.c...
compiling nrf_drv_uart.c...
compiling app_util_platform.c...
compiling app_error_weak.c...
compiling sdk_errors.c...
compiling app_uart_fifo.c...
compiling app_timer.c...
compiling nrf_assert.c...
compiling retarget.c...
compiling SEGGER_RTT.c...
compiling nrf_log_frontend.c...
compiling nrf_log_backend_serial.c...
compiling softdevice_handler.c...
".\_build\nrf51422_xxac.axf" - 5 Error(s), 4 Warning(s).
Target not created.
Build Time Elapsed: 00:00:03

Parents
  • Hi,

    Did you port the nRF52 project to nRF51, or did you start out with a project for nRF51? 

    bsp_nfc.c should be removed from the project, there is no NFC on nRF51. The errors "#40: expected an identifier" is typically caused by something being wrongly defined. Are you using the unmodified PCA10028.h board header file? Can you post the full project?

    Best regards,
    Jørgen

  • Hello again Jorgen,

    I did not do anything to "port" the 52 code although it was the first project I worked on.  All I did was open the project in the pca10028 directory structure, presuming it would have all the correct files included.  

    I will upload the full project later today, but ask that you try compiling the 10028 board under keil to see if you have the same issue.

    I presume NFC can be removed in the config file? 

    Thanks again,

    Robin @ TL

Reply
  • Hello again Jorgen,

    I did not do anything to "port" the 52 code although it was the first project I worked on.  All I did was open the project in the pca10028 directory structure, presuming it would have all the correct files included.  

    I will upload the full project later today, but ask that you try compiling the 10028 board under keil to see if you have the same issue.

    I presume NFC can be removed in the config file? 

    Thanks again,

    Robin @ TL

Children
No Data
Related