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

How to start a new project in Keil uVision & select correct runtime modules

Hello,

Trying to make my own project to test buttons and LEDs for educational purposes, I looked at this. Using uVision, I tried to replicate the included modules of that project.

However, with only an empty main function, I get all these errors. If I try to include the module nrf_drv_gpiote, then I get even more errors...

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling app_button.c...
RTE\nRF_Libraries\nRF51422_xxAA\app_button.c(16): error:  #5: cannot open source input file "nrf_drv_gpiote.h": No such file or directory
  #include "nrf_drv_gpiote.h"
RTE\nRF_Libraries\nRF51422_xxAA\app_button.c: 0 warnings, 1 error
compiling app_gpiote.c...
RTE\nRF_Libraries\nRF51422_xxAA\app_gpiote.c(14): error:  #5: cannot open source input file "nrf_drv_gpiote.h": No such file or directory
  #include "nrf_drv_gpiote.h"
RTE\nRF_Libraries\nRF51422_xxAA\app_gpiote.c: 0 warnings, 1 error
compiling app_error.c...
RTE\nRF_Libraries\nRF51422_xxAA\app_error.c(53): error:  #29: expected an expression
          .line_num    = line_num,
RTE\nRF_Libraries\nRF51422_xxAA\app_error.c(54): error:  #29: expected an expression
          .p_file_name = p_file_name,
RTE\nRF_Libraries\nRF51422_xxAA\app_error.c(55): error:  #29: expected an expression
          .err_code    = error_code,
RTE\nRF_Libraries\nRF51422_xxAA\app_error.c(67): error:  #29: expected an expression
          .line_num    = 0,
RTE\nRF_Libraries\nRF51422_xxAA\app_error.c(68): error:  #29: expected an expression
          .p_file_name = NULL,
RTE\nRF_Libraries\nRF51422_xxAA\app_error.c(69): error:  #29: expected an expression
          .err_code    = error_code,
RTE\nRF_Libraries\nRF51422_xxAA\app_error.c: 0 warnings, 6 errors
compiling app_timer.c...
RTE\nRF_Libraries\nRF51422_xxAA\app_timer.c(694): error:  #268: declaration may not appear after executable statement in block
          uint32_t post_counter_val = rtc1_counter_get();
RTE\nRF_Libraries\nRF51422_xxAA\app_timer.c(1009): error:  #268: declaration may not appear after executable statement in block
      timer_node_t * p_node     = (timer_node_t *)*p_timer_id;
RTE\nRF_Libraries\nRF51422_xxAA\app_timer.c(1025): error:  #268: declaration may not appear after executable statement in block
      
TATIC_ASSERT(APP_TIMER_INT_LEVELS == 3);
RTE\nRF_Libraries\nRF51422_xxAA\app_timer.c: 0 warnings, 3 errors
".\Objects\test.axf" - 11 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:01
Parents Reply Children
No Data
Related