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

keil 5 with LED Button app

Hi;

i tried to compile LED Button app founded in this tutorial infocenter.nordicsemi.com/index.jsp in nrf51822 pca 20006 I had these errors someone can help me please or provide me a version compatible with my beacon

errors:

*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'nrf51822_xxaa_s110 (256K)'
compiling system_nrf51.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\toolchain\system_nrf51.c: 0 warnings, 1 error
compiling ble_lbs.c...
compiling ble_srv_common.c...
compiling ble_error_log.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\ble\ble_error_log\ble_error_log.c: 0 warnings, 1 error
compiling ble_debug_assert_handler.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\ble\ble_debug_assert_handler\ble_debug_assert_handler.c: 0 warnings, 1 error
compiling ble_conn_params.c...
compiling softdevice_handler.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\softdevice\common\softdevice_handler\softdevice_handler.c: 0 warnings, 1 error
compiling app_button.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\libraries\button\app_button.c: 0 warnings, 1 error
compiling app_scheduler.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\libraries\scheduler\app_scheduler.c: 0 warnings, 1 error
compiling ble_advdata.c...
compiling crc16.c...
compiling pstorage.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\drivers_nrf\pstorage\pstorage.c: 0 warnings, 1 error
compiling app_gpiote.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\libraries\gpiote\app_gpiote.c: 0 warnings, 1 error
compiling app_timer.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.14.1\Device\Include\nrf51.h(119): error:  #5: cannot open source input file "core_cm0.h": No such file or directory
  #include "core_cm0.h"                               /*!< Cortex-M0 processor and core peripherals                              */
..\..\..\..\components\libraries\timer\app_timer.c: 0 warnings, 1 error
compiling app_timer_appsh.c...
".\_build\ble_app_lbs.axf" - 9 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:15
Parents Reply Children
  • thank you , but i still have the two errors

     *** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Build target 'nrf51822_xxaa_s110 (256K)'
    compiling system_nrf51.c...
    compiling ble_lbs.c...
    compiling ble_srv_common.c...
    compiling ble_error_log.c...
    compiling ble_debug_assert_handler.c...
    compiling ble_conn_params.c...
    compiling softdevice_handler.c...
    compiling app_button.c...
    ..\..\..\..\components\drivers_nrf\gpiote\nrf_drv_gpiote.h(28): error:  #5: cannot open source input file "nrf_drv_config.h": No such file or directory
      #include "nrf_drv_config.h"
    ..\..\..\..\components\libraries\button\app_button.c: 0 warnings, 1 error
    compiling app_scheduler.c...
    compiling ble_advdata.c...
    compiling crc16.c...
    compiling pstorage.c...
    ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c(222): error:  #20: identifier "PSTORAGE_NUM_OF_PAGES" is undefined
      static pstorage_module_table_t m_app_table[PSTORAGE_NUM_OF_PAGES];     /**< Registered application information table. */
    ..\..\..\..\components\drivers_nrf\pstorage\pstorage.c: 0 warnings, 1 error
    compiling app_gpiote.c...
    compiling app_timer.c...
    compiling app_timer_appsh.c...
    ".\_build\ble_app_lbs.axf" - 2 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:14
    
  • You need to include the paths to the header files in your project settings in Keil. nrf_drv_config.h is located in the subdirectory named by your board and softdevice version in the config directory inside the project folder. PSTORAGE_NUM_OF_PAGES is defined in pstorage_platform.h, located in root of the same config directory.

  • the project that i downloaded doesn't have this folder because of that i copied-pasted it from another folder in my sdk but when i did it i had these errors

    *** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Build target 'nrf51822_xxaa_s110 (256K)'
    compiling ble_error_log.c...
    compiling app_button.c...
    compiling pstorage.c...
    linking...
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol nrf_drv_gpiote_in_event_disable (referred from app_button.o).
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol nrf_drv_gpiote_in_event_enable (referred from app_button.o).
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol nrf_drv_gpiote_in_init (referred from app_button.o).
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol nrf_drv_gpiote_in_is_set (referred from app_button.o).
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol nrf_drv_gpiote_init (referred from app_button.o).
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol nrf_drv_gpiote_is_init (referred from app_button.o).
    Not enough information to list image symbols.
    Not enough information to list load addresses in the image map.
    Finished: 2 information, 0 warning and 6 error messages.
    ".\_build\ble_app_lbs.axf" - 6 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:05
    
  • The linker errors indicate that you have not included the source file nrf_drv_gpiote.c in your project.

  • i still ahve this error

    linking...
    .\_build\ble_app_lbs.axf: Error: L6200E: Symbol GPIOTE_IRQHandler multiply defined (by app_gpiote_fast_detect.o and nrf_drv_gpiote.o).
    Not enough information to list image symbols.
    Not enough information to list load addresses in the image map.
    Finished: 2 information, 0 warning and 1 error messages.
    ".\_build\ble_app_lbs.axf" - 1 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:02
    
Related