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
  • Hi,

    Have you checked that you have installed the ARM CMSIS pack in Keil Pack Installer?

    image description

    This should provide the missing file (core_cm0.h), and it should be located in the following path:

    {Keil_install_dir}\ARM\PACK\ARM\CMSIS\{version}\CMSIS\Include
    

    If you have the pack correctly installed, you should check that the file can be found in the path.

    Best regards,

    Jørgen

  • As the error say, you ar missing the implementation of app_gpiote_init(), which makes sense since you just remover the source file implementing this function. It seems that app_gpiote_fast_detect.c implements directly access the peripheral, instead of using the driver. Did you intend to include app_gpiote.c in your project instead? The second error is due to missing source file nrf_drv_common.c. Please search the SDK directory for the functions in the errors and include the missing files if you get more errors.

Reply
  • As the error say, you ar missing the implementation of app_gpiote_init(), which makes sense since you just remover the source file implementing this function. It seems that app_gpiote_fast_detect.c implements directly access the peripheral, instead of using the driver. Did you intend to include app_gpiote.c in your project instead? The second error is due to missing source file nrf_drv_common.c. Please search the SDK directory for the functions in the errors and include the missing files if you get more errors.

Children
No Data
Related