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

Unknown type name error in nrf_drv_uart.h

I am using nRF5SDKforThreadandZigbeev300d310e7 sdk for thread example simple_coap_client. I try to add uart module with simple_coap_client and i have added uart configuration in sdk_config.h. While compile the program i get unknown type name error in nrf_drv_uart.h and i cannot find app_config.h to simple_coap_client folder. Can you please help me.

Error while build with SES:

Building ‘thread_simple_coap_client_pca10056’ from solution ‘thread_simple_coap_client_pca10056’ in configuration ‘Release’
Compiling ‘nrf_log_backend_rtt.c’
Compiling ‘nrf_log_default_backends.c’
Compiling ‘nrf_log_backend_serial.c’
Compiling ‘nrf_log_frontend.c’
Compiling ‘boards.c’
Compiling ‘nrf_log_str_formatter.c’
Compiling ‘app_button.c’
Compiling ‘app_error_handler_gcc.c’
Compiling ‘app_error_weak.c’
Compiling ‘app_scheduler.c’
Compiling ‘app_timer.c’
Compiling ‘nrf_atomic.c’
Compiling ‘nrf_balloc.c’
Compiling ‘nrf_fprintf.c’
Compiling ‘nrf_fprintf_format.c’
Compiling ‘nrf_memobj.c’
Compiling ‘nrf_pwr_mgmt.c’
Compiling ‘nrf_ringbuf.c’
Compiling ‘nrf_strerror.c’
Compiling ‘nrf_section_iter.c’
Compiling ‘app_fifo.c’
Compiling ‘nrf_drv_clock.c’
Compiling ‘nrf_nvmc.c’
Compiling ‘nrfx_atomic.c’
Compiling ‘nrfx_clock.c’
Compiling ‘nrfx_gpiote.c’
Compiling ‘app_uart.c’
app_uart.c
unknown type name 'nrf_uarte_baudrate_t'
unknown type name 'nrf_uarte_error_mask_t'
unknown type name 'nrf_uarte_hwfc_t'
unknown type name 'nrf_uarte_parity_t'
unknown type name 'nrf_uarte_task_t'
unknown type name 'nrf_uarte_event_t'
'NRF_UARTE_PSEL_DISCONNECTED' undeclared (first use in this function); did you mean 'NRF_UART_PSEL_DISCONNECTED'?
in expansion of macro 'NRF_UART_PSEL_DISCONNECTED'
in expansion of macro 'NRF_DRV_UART_DEFAULT_CONFIG'
each undeclared identifier is reported only once for each function it appears in
in expansion of macro 'NRF_UART_PSEL_DISCONNECTED'
in expansion of macro 'NRF_DRV_UART_DEFAULT_CONFIG'
'NRF_UARTE_HWFC_DISABLED' undeclared (first use in this function); did you mean 'NRF_UART_HWFC_DISABLED'?
in expansion of macro 'NRF_UART_HWFC_DISABLED'
'NRF_UARTE_HWFC_ENABLED' undeclared (first use in this function); did you mean 'NRF_UART_HWFC_ENABLED'?
in expansion of macro 'NRF_UART_HWFC_ENABLED'
'NRF_UARTE_PARITY_INCLUDED' undeclared (first use in this function); did you mean 'NRF_UART_PARITY_INCLUDED'?
in expansion of macro 'NRF_UART_PARITY_INCLUDED'
'NRF_UARTE_PARITY_EXCLUDED' undeclared (first use in this function); did you mean 'NRF_UART_PARITY_EXCLUDED'?
in expansion of macro 'NRF_UART_PARITY_EXCLUDED'
Compiling ‘app_uart_fifo.c’
app_uart_fifo.c
unknown type name 'nrf_uarte_baudrate_t'
unknown type name 'nrf_uarte_error_mask_t'
unknown type name 'nrf_uarte_hwfc_t'
unknown type name 'nrf_uarte_parity_t'
unknown type name 'nrf_uarte_task_t'
unknown type name 'nrf_uarte_event_t'
'NRF_UARTE_PSEL_DISCONNECTED' undeclared (first use in this function); did you mean 'NRF_UART_PSEL_DISCONNECTED'?
in expansion of macro 'NRF_UART_PSEL_DISCONNECTED'
in expansion of macro 'NRF_DRV_UART_DEFAULT_CONFIG'
each undeclared identifier is reported only once for each function it appears in
in expansion of macro 'NRF_UART_PSEL_DISCONNECTED'
in expansion of macro 'NRF_DRV_UART_DEFAULT_CONFIG'
'NRF_UARTE_HWFC_DISABLED' undeclared (first use in this function); did you mean 'NRF_UART_HWFC_DISABLED'?
in expansion of macro 'NRF_UART_HWFC_DISABLED'
'NRF_UARTE_HWFC_ENABLED' undeclared (first use in this function); did you mean 'NRF_UART_HWFC_ENABLED'?
in expansion of macro 'NRF_UART_HWFC_ENABLED'
'NRF_UARTE_PARITY_INCLUDED' undeclared (first use in this function); did you mean 'NRF_UART_PARITY_INCLUDED'?
in expansion of macro 'NRF_UART_PARITY_INCLUDED'
'NRF_UARTE_PARITY_EXCLUDED' undeclared (first use in this function); did you mean 'NRF_UART_PARITY_EXCLUDED'?
in expansion of macro 'NRF_UART_PARITY_EXCLUDED'
Compiling ‘nrf_drv_uart.c’
nrf_drv_uart.c
unknown type name 'nrf_uarte_baudrate_t'
unknown type name 'nrf_uarte_error_mask_t'
unknown type name 'nrf_uarte_hwfc_t'
unknown type name 'nrf_uarte_parity_t'
unknown type name 'nrf_uarte_task_t'
unknown type name 'nrf_uarte_event_t'
Build failed

Parents Reply
  • I have not tested this version of IAR. In general, we recommend using the versions that the SDK is tested against:

    The following toolchains/devices have been used for testing and verification:
    
     - ARM: MDK-ARM version 5.25
     - GCC: GCC ARM Embedded 7.2018q2.update
     - IAR: IAR Workbench 7.80.4
     - SES: SES 4.12
     
    Note: The selected GCC version has shown instabilities when using the Link Time Optimization feature, and using the feature is not recommended.
    
    *****
    Note for IAR 8 users:
    (Libraries for IAR 8 require wchar_t to be of size 32 bits while IAR 7 requires 16 bits).
     
    To run a project using IAR 8, follow these intructions:
     - Open the IAR project in IAR 8. The IAR workbench will automatically generate an IAR 8 compatible project file.
     - If the project contains one of the precompiled libraries listed below, replace it with the IAR 8 compatible alternative
       (there are no projects targeting nRF51 in this SDK).
     - Save the project.
     - When building the project, you might get the warning: "The header file 'cmsis_iar.h' is obsolete and should not be used. [...]".
        - The problem is described in DevZone post: devzone.nordicsemi.com/.../iar-ewarm-8-22-1-complains-about-cmsis_iar-h
          The solution is to remove all occurrences of #include <cmsis_iar.h>.
Children
Related