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

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

@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!

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

Which device are you compiling it for?

I don’t think it is available for a core

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

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?

And you are also targeting a Photon system 0.5.0+?

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 regionAPP_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 regionRAM’
/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: regionAPP_FLASH’ overflowed by 6124 bytes

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

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.

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.

Maybe give 0.6.2-rc.1 a try.

1 Like

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 :slight_smile:

2 Likes