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

Keil "skipping" commands

I am working on a nrf51822 UART bootloader using Keil 5.14 (though I had the same problem with 5.1). If I start with the pack example dfu_dual_bank_serial_s110_pca10028 with the 8.0sdk, and try to add some additional commands (such as setting some IO lines) it looks like the compiler is skipping them. When I do a debug, Keil's Code Coverage shows that they are not executable lines. See attached image... image description

I tried making all the files R/W (some were marked read only), that didn't seem to help. I also played with optimization levels, the problem persisted.

Suggestions?

Parents
  • Strange. The only other thing I can think of is if the compiler determines that the code has no effect and therefore does not compile it:

    • dfu_start = false; No code because the location is zero initialized.
    • app_reset = (NRF...); Set the variable to the determined value.
    • if (app_reset) No instruction; does it mean app_reset is always true?

    If you look at what nrf_gpio_ functions there might be a similar explanation.

Reply
  • Strange. The only other thing I can think of is if the compiler determines that the code has no effect and therefore does not compile it:

    • dfu_start = false; No code because the location is zero initialized.
    • app_reset = (NRF...); Set the variable to the determined value.
    • if (app_reset) No instruction; does it mean app_reset is always true?

    If you look at what nrf_gpio_ functions there might be a similar explanation.

Children
No Data
Related