IWatchdog.h: no such file or directory

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
Anz8
Posts: 10
Joined: Mon Sep 20, 2021 8:08 am

IWatchdog.h: no such file or directory

Post by Anz8 »

Hello,

I'm trying to use the IWatchdog library on the arduino IDE. Please note that I started playing with MCU recently so my knowledge is very very limited. I was already able to make some project work using a bluepill Generic STM32F103C series but now I need to activate and manage the internal watchdog to reset the board when the sketch crashes (it crashes due to a hardware problem with the relays module that I'm still trying to solve). My problem is that, when I compile the sketch, this error appears: IWatchdog.h: no such file or directory
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: IWatchdog.h: no such file or directory

Post by fpiSTM »

First you should tell us which core you used.
viewtopic.php?f=2&t=301


The STM32 core provide the IWatchDog library:
https://github.com/stm32duino/Arduino_C ... /IWatchdog
Anz8
Posts: 10
Joined: Mon Sep 20, 2021 8:08 am

Re: IWatchdog.h: no such file or directory

Post by Anz8 »

Thanks. I think I found the issue. I was using the STM32F1 core -> generic STM32F103C series that doesn't support that library.

I tried to switch to "STM32 boards group" -> generic STM32F1 series but it gives me an error when compiling because it can't use the serial3

Sorry I started out recently
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: IWatchdog.h: no such file or directory

Post by fpiSTM »

Anz8
Posts: 10
Joined: Mon Sep 20, 2021 8:08 am

Re: IWatchdog.h: no such file or directory

Post by Anz8 »

I've fixed the serial3 issue but now, after having installed the STM32CubeProgrammer, at the end of the compile it returns this error:

Error: No debug probe detected.

These are the settings I've used:
settings.png
settings.png (8.87 KiB) Viewed 3985 times
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: IWatchdog.h: no such file or directory

Post by fpiSTM »

Bluepill required to have an external STLink
Anz8
Posts: 10
Joined: Mon Sep 20, 2021 8:08 am

Re: IWatchdog.h: no such file or directory

Post by Anz8 »

ok so, is there a way of using the watchdog with the STM32F1/F4 core?
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: IWatchdog.h: no such file or directory

Post by mrburnette »

Anz8 wrote: Mon Sep 20, 2021 12:27 pm ok so, is there a way of using the watchdog with the STM32F1/F4 core?

maybe....
viewtopic.php?t=190


... a really good writeup in the reference man on windowing watch-dog ... sect 20.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: IWatchdog.h: no such file or directory

Post by fpiSTM »

fpiSTM wrote: Mon Sep 20, 2021 12:03 pm Bluepill required to have an external STLink
I have to complete my answer:
to use th SWD upload method. Else you cans use other method like DFU or other bootloader method ;)
Anz8
Posts: 10
Joined: Mon Sep 20, 2021 8:08 am

Re: IWatchdog.h: no such file or directory

Post by Anz8 »

Thanks for specifyng.

Unfortunately, I tried them all and got these errors:

Cubeprogrammer (serial): Timeout error occured while waiting for acknowledgement.
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

Cubeprogrammer (DFU): Error: Target device not found
Establishing connection with the device failed

HID bootloader 2.2:
> Trying to open the [COM5]...
> Toggling DTR...
> Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found :(> Searching for [COM5] ...
> Finish
The serial port selected doesn't exists or it's not connected

Maple DFU Bootloader 2.0: stmicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: watchdog.ino.elf section `.text' will not fit in region `FLASH'
packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/9.3.1-1.3/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 3704 bytes
collect2.exe: error: ld returned 1 exit status
exit status 1

Maple DFU Bootloader original: same error as above

But I understood that I was using roger's files as you said, so I used the method suggested by Mrburnette with these parameters:

iwdg_init(IWDG_PRE_32, 30000);

I'm not sure after how much time it resets but I guess it's enough (I guess it should be 40/32*30000 = 37.5 seconds)
Post Reply

Return to “IDE's”