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

Building ble_app_uart_s110_pca10028 in Eclipse - can't resolve some of the symbols?

I am trying to build the "Getting STarted" example app. I got it to work with Keil. Now trying Eclipse.

I got all the includes in the project set up and these all resolved. I am now getting errors that symbols could not resolve (I list them below).

From Project Properties->c/C++ Build->Tool Chain Editor the current toolchain Editor is set to Cross ARM GCC and the current builder to Gnu Make Builder. Am I setting something up incorrectly? What am i doing wrong? here are some of the error messages:

  • Type 'bool' could not be resolved main.c
  • Symbol 'TX_PIN_NUMBER' could not be resolved main.c /ble_app_uart_s110_pca10028/src line 437 Semantic Error
  • Symbol 'true' could not be resolved main.c /
  • Symbol 'NULL' could not be resolved main.c /ble_app_uart_s110_pca10028/src line 201 Semantic Error
  • This is how I solved it. I am not sure why the include files/libraries don't have this...:

    • Starting with NULL, the Keil string.h defines NULL, but the GNU ARM one does not so I added the lines:

    #undef NULL #define NULL 0 /* see <stddef.h> */ from the Keil’s string.h file near the top of main.c.

    • from Keil’s _defs.h, I added to the top of main.c:

    typedef int bool;

    ifndef true

    define true 1

    endif

    ifndef false

    define false 0

    endif

    • All remaining symbols except BSP_LED_APP_TIMERS_NUMBER are located in pca10018.h. Once I included this file, those symbols resolved.
    • BSP_LED_APP_TIMERS_NUMBER is defined in bsp.h:

    #if (LEDS_NUMBER > 0) && !defined(BSP_SIMPLE) #define BSP_LED_APP_TIMERS_NUMBER 2 #else #define BSP_APP_APP_TIMERS_NUMBER 0 #endif// LEDS_NUMBER > 0 It looks like there is a mistake in the #define so I changed BSP_APP_APP… to BSP_LED_APP...

Related