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

how do i view header files in keil component classes?

I have installed Keil v5.18a and have installed MDK for nRF51-DK.

Examining the basic LED blink examples showed that in some projects, the 'bsp.h' which would be the header file for 'bsp.c' is shown and in some other projects it is not available.

1st image: a screenshot of a project that allows to view 'bsp.h' image description

2nd image: a screenshot of a project that DOES NOT allow me to view 'bsp.h' image description

What determines this difference? I'd like to be able to see the 'bsp.h' file in my project buy I have no clue what to configure in order to do so.

Parents
  • okay I have found out half of the reason why this happens.

    Part of the reason behind this difference was the 'variant' configuration of 'software components'. Here's a walkthough showing what difference this can make.

    • User can manage their software components via 'manage run-time environment' icon. image description

    • in my case, I'm interested in the 'board support' software component. image description

    there are four variants in total. I'm not sure what each of those variants do but I do have a fair-guess of my own. If you want to get the same amount of hunch that I do now, take a look at 'bsp.h' file. In that file, there is a small piece of code that looks like this:

    /* BSP_UART_SUPPORT
     * This define enables UART support module.
     */
    #ifdef BSP_UART_SUPPORT
    #include "app_uart.h"
    #endif // BSP_UART_SUPPORT
    

    So, my hunch is that depending on the variant, the 'bsp.h' file will include some more features or not. Therefore, I'm pretty sure that it is safe to assume that 'default' variant is the 'default' version of 'bsp.h'. However, I have no clue on what 'defines' variant could be. also, there isn't another "#ifdef" at all, leaving me curious what the 'Simple_with_uart' variant could possibly be. Despite many unanswered questions, I'll show what results occur depending on the 'defines' and 'default' variants.

    First, when I choose the 'defines' variant the project panel looks like this: image description

    the 'board support' component cannot be extended further.

    If I can the variant to 'default': image description

    then I get:

    image description

    this time, I have an extendable 'board support' component.

    I have found that in some examles projects, the 'board support' component does not become extensive despite using the 'default' variant. That is why I think I've only found half of my answer.

    If anyone could enlighten me on the key difference between 'defines' and 'default' variant of software components, I would be grateful.

Reply
  • okay I have found out half of the reason why this happens.

    Part of the reason behind this difference was the 'variant' configuration of 'software components'. Here's a walkthough showing what difference this can make.

    • User can manage their software components via 'manage run-time environment' icon. image description

    • in my case, I'm interested in the 'board support' software component. image description

    there are four variants in total. I'm not sure what each of those variants do but I do have a fair-guess of my own. If you want to get the same amount of hunch that I do now, take a look at 'bsp.h' file. In that file, there is a small piece of code that looks like this:

    /* BSP_UART_SUPPORT
     * This define enables UART support module.
     */
    #ifdef BSP_UART_SUPPORT
    #include "app_uart.h"
    #endif // BSP_UART_SUPPORT
    

    So, my hunch is that depending on the variant, the 'bsp.h' file will include some more features or not. Therefore, I'm pretty sure that it is safe to assume that 'default' variant is the 'default' version of 'bsp.h'. However, I have no clue on what 'defines' variant could be. also, there isn't another "#ifdef" at all, leaving me curious what the 'Simple_with_uart' variant could possibly be. Despite many unanswered questions, I'll show what results occur depending on the 'defines' and 'default' variants.

    First, when I choose the 'defines' variant the project panel looks like this: image description

    the 'board support' component cannot be extended further.

    If I can the variant to 'default': image description

    then I get:

    image description

    this time, I have an extendable 'board support' component.

    I have found that in some examles projects, the 'board support' component does not become extensive despite using the 'default' variant. That is why I think I've only found half of my answer.

    If anyone could enlighten me on the key difference between 'defines' and 'default' variant of software components, I would be grateful.

Children
No Data
Related