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

Some WARNNING in compiling.

Hi,ALL:

 As top:

1.When Compiling  file  NRFX_TIMER.C,it warns :ISO C99 requires whitespace after the macro name.   AND :"APP_TIMER_V2" redefined。 and I only can find the APP_TIMER_V2  in configuration just used once.

Parents
  • Hi!

    First some questions to clarify things:

    - What SDK are you using?

    - Are your code based on an example? If so, which and Is it modified?

    - What is your development environment?

    Could you also provide a more detailed log of the events?

    Best regards,
    Carl Richard

  • Hi,Carl Richard:

    1 .nrf5 SDk16  examples: BLE_APP_mouse   But i have change to nrf52833 chip, and  it can work in a part of working not finished.Just come out the  warnning when compiling.

    2.here,there is also a question:from the picture below, the bit flag bTime1msInterval has already been 0x01,while it can reach the next breakpoint. En,the question is about the segger Embeded Studio,the bTime1msInterval is the bitfield  defined by me as below:  but even if() statement has been no influence to it,Ex if(bTime1msInterval)...

    union
    {
    uint32_t byte;
    struct{
    bool time1ms ;
    bool time1msinterval ;
    bool timepwmchange ;
    }bits;
    }timeflag1;

    #define vTimeFlag1 timeflag1.byte
    #define bTime1ms timeflag1.bits.time1ms
    #define bTime1msInterval timeflag1.bits.time1msinterval
    #define bTimePwmChange timeflag1.bits.timepwmchange

  • Hi!

    1. Good that it works with the nRF52833. What kind of warning do you get when compiling?

    2. I see that bTime1msInterval is declared using #define, and using data from the timeflag1 union which doesn't make much sense as #define are handled during compilation, while timeflag1 will be declared during runtime. What are you trying to achieve?

    Best regards,
    Carl Richard

  • Hi,Carl:

      About the bTime1msInterval is solved,I changed it' type from union to staic bool. But this morning,I use a local parameter in a function.When reaching it,I can't be changed correctly by OR 0x01.The code is blow:

    Step1:

    Step2:

    when the PC reach m=m|0x01;,and surmount it,It's value still is 0x00.

       

  • Hello!

    Could you try to turn of compilation optimization in Segger and see if that helps? Right click the project, select "options" and choose "Optimization level" none for all project instances. See the picture below:


    It could be that "m" is optimized away if it's not used. 

    Best regards,
    Carl Richard

Reply Children
Related