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
  • 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
    
  • Then you have included the source file app_gpiote_fast_detect.c from the GPIOTE library. Remove it and try again.

  • when i tried that i find two errors more

    *** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Build target 'nrf51822_xxaa_s110 (256K)'
    linking...
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol app_gpiote_init (referred from main.o).
    .\_build\ble_app_lbs.axf: Error: L6218E: Undefined symbol nrf_drv_common_irq_enable (referred from 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 2 error messages.
    ".\_build\ble_app_lbs.axf" - 2 Error(s), 0 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:02
    
  • 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.

  • Since I am getting the same error I found the file located here

     --> (Keil_install_dir)\ARM\packs\ARM\CMSIS\{version}\CMSIS\Include

    not here

    --> (Keil_install_dir)\ARM\PACK\

    In the 'PACK' directory there was a .Download and .Web directory.

    What is messed up?
    I had to manually add this path to the list of include files in the target options 
    dialog box. That seems weird.
    I would think it would be part of a system file and handled by Keil.

    Sorry about the format. Something is screwed up as usual on this web site
    and I cannot get out of this ridiculous mode.
Related