# Getting error 'ApplicationWatchdog' does not name a type on a line that previously compiled correctly

**URL:** <https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777>\
**Category:** Firmware\
**Created:** [April 17, 2017, 12:00am UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777 "2017-04-17T00:00:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveh291](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/steveh291/32/10822_2.png) [@steveh291](https://community.particle.io/u/steveh291)\
**Post date:** [April 17, 2017, 12:00am UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/1 "2017-04-17T00:00:15Z")

</div>

I’ve had a particle .ino file that has been compiling successfully for sometime-- I just now went in to start to add in a new feature and it no longer compiles. It’s failing on the line "ApplicationWatchdog wd(60000, System.reset, 512); There’s a second error further down in the code when I call wd.checkin() since wd isn’t correctly defined due to the first error. Is there something new I need to add as an #include perhaps-- maybe ApplicationWatchdog is no longer in the core firmware? It’s possible I may have introduced some change in the file, but I haven’t been able to spot it.

Thanks,

-Steve

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [April 17, 2017, 12:03am UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/2 "2017-04-17T00:03:12Z")

</div>

@steveh291, you might want to look at what the error is saying to fix it or have them posted here so what we can know how to help you.

Thanks!

---

<div class="post-metadata">

**Author:** ![steveh291](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/steveh291/32/10822_2.png) [@steveh291](https://community.particle.io/u/steveh291)\
**Post date:** [April 17, 2017, 12:06am UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/3 "2017-04-17T00:06:50Z")

</div>

Sure-- good idea. /workspace/braydenserial.cpp:311:1: error: ‘ApplicationWatchdog’ does not name a type

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [April 17, 2017, 12:18am UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/4 "2017-04-17T00:18:34Z")

</div>

Which device are you compiling it for?

I don’t think it is available for a **core**

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 17, 2017, 6:02am UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/5 "2017-04-17T06:02:49Z")

</div>

Have you got an `#include <Particle.h>` in place in `braydenserial.cpp`?

---

<div class="post-metadata">

**Author:** ![steveh291](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/steveh291/32/10822_2.png) [@steveh291](https://community.particle.io/u/steveh291)\
**Post date:** [April 17, 2017, 3:03pm UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/6 "2017-04-17T15:03:31Z")

</div>

Tried the #include \<Particle.h\> and that didn’t resolve the issue. The call to ApplicationWatchdog (which is in the Particle documentation) used to work about a week ago with this same code. This is for a photon. I replaced the firmware with an archived version from my repository which is a couple of versions older and tried that as well. It also used to compile just fine and is in units out in the field, but no longer will compile with the current Build development environment. Any ideas?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 17, 2017, 3:05pm UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/7 "2017-04-17T15:05:58Z")

</div>

And you are also targeting a Photon system 0.5.0+?

---

<div class="post-metadata">

**Author:** ![steveh291](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/steveh291/32/10822_2.png) [@steveh291](https://community.particle.io/u/steveh291)\
**Post date:** [April 17, 2017, 3:18pm UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/8 "2017-04-17T15:18:03Z")

</div>

Looks like the problem is that the code no longer fits in the development environment. I commented out the Application Watchdog feature and attempted to compile-- and I get the error message:

/usr/local/gcc-arm-embedded/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/bin/ld: /workspace/target/workspace.elf section `.text' will not fit in region`APP\_FLASH’  
/usr/local/gcc-arm-embedded/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/bin/ld: /workspace/target/workspace.elf section `._usrstack' will not fit in region`RAM’  
/usr/local/gcc-arm-embedded/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/bin/ld: region `RAM' overflowed by 2952 bytes /usr/local/gcc-arm-embedded/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: region`APP\_FLASH’ overflowed by 6124 bytes

Evidently quite a bit was added recently to the particle core very recently?

---

<div class="post-metadata">

**Author:** ![steveh291](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/steveh291/32/10822_2.png) [@steveh291](https://community.particle.io/u/steveh291)\
**Post date:** [April 17, 2017, 3:51pm UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/9 "2017-04-17T15:51:52Z")

</div>

Figured it out-- I have been using whatever the default firmware is at the time of build and not paying much attention… and our firmware is close to the size limit. I shifted from 0.6.1 (the new default) back to version 0.6.0 and am able to compile successfully with the ApplicationWatchdog issue also being resolved. The compiler error message threw me but I know now to watch for this type of issue.

---

<div class="post-metadata">

**Author:** ![steveh291](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/steveh291/32/10822_2.png) [@steveh291](https://community.particle.io/u/steveh291)\
**Post date:** [April 17, 2017, 4:00pm UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/10 "2017-04-17T16:00:50Z")

</div>

If I can raise a concern here- when I compile my code using .0.6.0, the build statistics indicate that I have 31116 bytes in flash available out of 110592 (28% room available). When compiling with 0.6.1, it indicates I’m over by 6124 bytes. That’s quite a loss in available developer space with this most recent version of particle firmware.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 17, 2017, 4:27pm UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/11 "2017-04-17T16:27:07Z")

</div>

Maybe give 0.6.2-rc.1 a try.

---

<div class="post-metadata">

**Author:** ![steveh291](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/steveh291/32/10822_2.png) [@steveh291](https://community.particle.io/u/steveh291)\
**Post date:** [April 17, 2017, 5:03pm UTC](https://community.particle.io/t/getting-error-applicationwatchdog-does-not-name-a-type-on-a-line-that-previously-compiled-correctly/31777/12 "2017-04-17T17:03:33Z")

</div>

Hi ScuffR-- with 0.6.2-rc.1- the build statistics now show 30908 / 110592 and the initial compile issue is no longer present. Thanks for making the suggestion / fix 🙂
