Skip to content

watchdog: Add runner#833

Merged
HaoboGu merged 5 commits into
HaoboGu:mainfrom
jpds:watchdog-runner
May 11, 2026
Merged

watchdog: Add runner#833
HaoboGu merged 5 commits into
HaoboGu:mainfrom
jpds:watchdog-runner

Conversation

@jpds
Copy link
Copy Markdown
Contributor

@jpds jpds commented May 5, 2026

Adds a watchdog runner to the supported chipsets. This enables the hardware watchdog to reset the board automatically if Embassy on the device locks up.

I do not have hardware to test these other chipsets, but I used this as the basis for the watchdog on my ZSA Voyager.

Timeout it set to 8s on RP2040 as that's a hardware limitation, the others run this at 10s.

@jpds jpds force-pushed the watchdog-runner branch 4 times, most recently from 2b9bbef to d267a3a Compare May 5, 2026 18:55
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Size Report

Example main PR Diff .text .data .bss
use_config/nrf52832_ble 372.0 KiB 372.3 KiB +0.09% ⬆️ +316 0 +56
use_config/nrf52840_ble 421.4 KiB 422.0 KiB +0.12% ⬆️ +480 0 +56
use_config/nrf52840_ble_split (central) 496.0 KiB 496.5 KiB +0.10% ⬆️ +476 0 +56
use_config/nrf52840_ble_split (peripheral) 320.3 KiB 320.6 KiB +0.10% ⬆️ +304 0 +56
use_config/pi_pico_w_ble 659.3 KiB 659.7 KiB +0.05% ⬆️ +340 0 +56
use_config/rp2040 146.7 KiB 147.2 KiB +0.31% ⬆️ +424 0 +56
use_config/rp2040_split (central) 158.4 KiB 158.8 KiB +0.21% ⬆️ +288 0 +56
use_config/rp2040_split (peripheral) 25.9 KiB 26.3 KiB +1.54% ⬆️ +352 0 +56
use_config/stm32f1 62.4 KiB 62.4 KiB +0.00% 0 0 0
use_config/stm32h7 99.8 KiB 99.8 KiB +0.00% 0 0 0
use_rust/nrf52832_ble 359.2 KiB 359.7 KiB +0.14% ⬆️ +492 0 +56
use_rust/nrf52840_ble 417.6 KiB 418.1 KiB +0.12% ⬆️ +488 0 +56
use_rust/nrf52840_ble_split (central) 505.1 KiB 505.4 KiB +0.06% ⬆️ +268 0 +56
use_rust/nrf52840_ble_split (peripheral) 317.0 KiB 317.5 KiB +0.15% ⬆️ +444 0 +56
use_rust/pi_pico_w_ble 659.8 KiB 660.1 KiB +0.03% ⬆️ +208 0 +56
use_rust/rp2040 146.5 KiB 146.9 KiB +0.28% ⬆️ +372 0 +56
use_rust/rp2040_split (central) 157.8 KiB 158.1 KiB +0.25% ⬆️ +352 0 +56
use_rust/rp2040_split (peripheral) 26.4 KiB 26.6 KiB +0.62% ⬆️ +112 0 +56
use_rust/stm32f1 61.9 KiB 61.9 KiB +0.00% 0 0 0
use_rust/stm32h7 120.9 KiB 120.9 KiB +0.00% 0 0 0
use_config/nrf52832_ble — 372.0 KiB → 372.3 KiB (+0.09% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 341636	   5256	  34392	 381284	  5d164	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 341320	   5256	  34336	 380912	  5cff0	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.5% +14.7Ki  [ = ]       0    .debug_str
  +0.4% +7.60Ki  [ = ]       0    .debug_info
  +0.1%    +936  [ = ]       0    .debug_loc
  +0.2%    +756  [ = ]       0    .debug_line
  +0.2%    +400  [ = ]       0    .debug_ranges
  +0.1%    +216  +0.1%    +216    .text
  +0.1%    +144  [ = ]       0    .symtab
  +0.1%    +142  [ = ]       0    .strtab
  +0.3%    +100  +0.3%    +100    .rodata
  [ = ]       0  +0.2%     +56    .bss
  +0.1%     +28  [ = ]       0    .debug_frame
  +0.0%     +16  [ = ]       0    .debug_aranges
  +6.1%      +4  [ = ]       0    [Unmapped]
  +0.4% +25.0Ki  +0.1%    +372    TOTAL
use_config/nrf52840_ble — 421.4 KiB → 422.0 KiB (+0.12% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 375636	   5264	  51192	 432092	  697dc	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 375156	   5264	  51136	 431556	  695c4	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.6% +19.3Ki  [ = ]       0    .debug_str
  +0.5% +10.5Ki  [ = ]       0    .debug_info
  +0.3% +2.29Ki  [ = ]       0    .debug_loc
  +0.3% +1.07Ki  [ = ]       0    .debug_line
  +0.1%    +380  +0.1%    +380    .text
  +1.9%    +160  [ = ]       0    .debug_abbrev
  +0.2%    +100  +0.2%    +100    .rodata
  [ = ]       0  +0.1%     +56    .bss
  -6.2%      -3  [ = ]       0    [Unmapped]
  -0.2%     -80  [ = ]       0    .debug_aranges
  -0.1%    -163  [ = ]       0    .strtab
  -0.3%    -168  [ = ]       0    .debug_frame
  -0.2%    -304  [ = ]       0    .symtab
  -0.2%    -488  [ = ]       0    .debug_ranges
  +0.4% +32.6Ki  +0.1%    +536    TOTAL
use_config/nrf52840_ble_split (central) — 496.0 KiB → 496.5 KiB (+0.10% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 454844	   6588	  47000	 508432	  7c210	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 454368	   6588	  46944	 507900	  7bffc	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.5% +20.4Ki  [ = ]       0    .debug_str
  +0.4% +8.87Ki  [ = ]       0    .debug_info
  +0.4% +3.02Ki  [ = ]       0    .debug_loc
  +0.2%    +843  [ = ]       0    .debug_line
  +0.2%    +560  [ = ]       0    .debug_ranges
  +0.1%    +376  +0.1%    +376    .text
  +0.1%    +176  [ = ]       0    .symtab
  +0.0%    +164  [ = ]       0    .strtab
  +0.2%    +100  +0.2%    +100    .rodata
  [ = ]       0  +0.1%     +56    .bss
  +0.1%     +44  [ = ]       0    .debug_frame
  +0.1%     +24  [ = ]       0    .debug_aranges
   +13%      +7  [ = ]       0    [Unmapped]
  -0.2%     -19  [ = ]       0    .debug_abbrev
  +0.4% +34.5Ki  +0.1%    +532    TOTAL
use_config/nrf52840_ble_split (peripheral) — 320.3 KiB → 320.6 KiB (+0.10% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 295372	   5920	  27024	 328316	  5027c	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 295068	   5920	  26968	 327956	  50114	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.7% +17.8Ki  [ = ]       0    .debug_str
  +0.6% +9.25Ki  [ = ]       0    .debug_info
  +1.0% +5.73Ki  [ = ]       0    .debug_loc
  +0.4%   +1023  [ = ]       0    .debug_line
  +0.4%    +720  [ = ]       0    .debug_ranges
  +0.1%    +196  +0.1%    +196    .text
  +0.1%    +127  [ = ]       0    .strtab
  +0.3%    +108  +0.3%    +108    .rodata
  [ = ]       0  +0.2%     +56    .bss
  +0.1%     +24  [ = ]       0    .debug_aranges
  +0.0%      +8  [ = ]       0    .debug_frame
 -37.0%     -20  [ = ]       0    [Unmapped]
  +0.6% +34.9Ki  +0.1%    +360    TOTAL
use_config/pi_pico_w_ble — 659.3 KiB → 659.7 KiB (+0.05% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 619920	      0	  55588	 675508	  a4eb4	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 619580	      0	  55532	 675112	  a4d28	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.4% +13.2Ki  [ = ]       0    .debug_str
  +0.3% +6.43Ki  [ = ]       0    .debug_info
  +0.2%    +520  [ = ]       0    .debug_ranges
  +0.1%    +443  [ = ]       0    .debug_line
  +0.1%    +340  +0.1%    +340    .text
  +0.1%    +191  [ = ]       0    .strtab
  [ = ]       0  +0.1%     +56    .bss
  +0.1%     +28  [ = ]       0    .debug_frame
  +0.1%     +16  [ = ]       0    .debug_abbrev
   +29%     +15  [ = ]       0    [Unmapped]
  +0.0%      +8  [ = ]       0    .debug_aranges
  -0.1%     -64  [ = ]       0    .symtab
  -0.1%    -584  [ = ]       0    .debug_loc
  +0.2% +20.5Ki  +0.1%    +396    TOTAL
use_config/rp2040 — 146.7 KiB → 147.2 KiB (+0.31% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 135432	      0	  15300	 150732	  24ccc	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 135008	      0	  15244	 150252	  24aec	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.8% +11.3Ki  [ = ]       0    .debug_str
  +0.6% +5.65Ki  [ = ]       0    .debug_info
  +1.0% +3.03Ki  [ = ]       0    .debug_loc
  +1.6% +1.28Ki  [ = ]       0    .debug_ranges
  +0.4%    +673  [ = ]       0    .debug_line
  +0.4%    +424  +0.4%    +424    .text
  +0.3%    +324  [ = ]       0    .strtab
  +0.6%    +208  [ = ]       0    .symtab
  [ = ]       0  +0.4%     +56    .bss
  +0.2%     +28  [ = ]       0    .debug_frame
  +0.0%      +8  [ = ]       0    .debug_aranges
 -13.3%      -6  [ = ]       0    [Unmapped]
  +0.7% +22.9Ki  +0.3%    +480    TOTAL
use_config/rp2040_split (central) — 158.4 KiB → 158.8 KiB (+0.21% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 146528	      0	  16064	 162592	  27b20	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 146240	      0	  16008	 162248	  279c8	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.9% +13.6Ki  [ = ]       0    .debug_str
  +0.5% +5.66Ki  [ = ]       0    .debug_info
  +0.9% +3.15Ki  [ = ]       0    .debug_loc
  +0.4%    +400  [ = ]       0    .debug_ranges
  +0.2%    +383  [ = ]       0    .debug_line
  +0.3%    +328  [ = ]       0    .strtab
  +0.2%    +288  +0.2%    +288    .text
  +0.4%    +144  [ = ]       0    .symtab
  [ = ]       0  +0.4%     +56    .bss
  +0.2%     +28  [ = ]       0    .debug_frame
  +0.0%      +8  [ = ]       0    .debug_aranges
  +0.7% +23.9Ki  +0.2%    +344    TOTAL
use_config/rp2040_split (peripheral) — 25.9 KiB → 26.3 KiB (+1.54% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  24368	     56	   2468	  26892	   690c	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  24016	     56	   2412	  26484	   6774	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.4% +9.00Ki  [ = ]       0    .debug_str
  +1.6% +5.68Ki  [ = ]       0    .debug_info
  +1.3%    +777  [ = ]       0    .debug_loc
  +0.8%    +430  [ = ]       0    .debug_line
  +2.1%    +408  [ = ]       0    .strtab
  +1.8%    +348  +1.8%    +348    .text
  +1.9%    +288  [ = ]       0    .debug_ranges
  +1.6%    +128  [ = ]       0    .symtab
  [ = ]       0  +4.0%     +56    .bss
  +1.1%     +56  [ = ]       0    .debug_frame
  +0.1%     +16  [ = ]       0    .debug_aranges
  +0.1%      +4  +0.1%      +4    .rodata
  -2.6%      -1  [ = ]       0    [Unmapped]
  +1.4% +17.1Ki  +1.5%    +408    TOTAL
use_config/stm32f1 — 62.4 KiB → 62.4 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  56432	     28	   7432	  63892	   f994	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  56432	     28	   7432	  63892	   f994	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -5.7%      -4  [ = ]       0    [Unmapped]
  -0.0%      -5  [ = ]       0    .debug_line
  -0.0%    -121  [ = ]       0    .debug_info
  -0.0%    -294  [ = ]       0    .debug_str
  -0.0%    -424  [ = ]       0    TOTAL
use_config/stm32h7 — 99.8 KiB → 99.8 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  92220	    268	   9664	 102152	  18f08	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  92220	    268	   9664	 102152	  18f08	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%      +5  [ = ]       0    .debug_line
  -2.4%      -1  [ = ]       0    [Unmapped]
  -0.0%    -121  [ = ]       0    .debug_info
  -0.0%    -307  [ = ]       0    .debug_str
  -0.0%    -424  [ = ]       0    TOTAL
use_rust/nrf52832_ble — 359.2 KiB → 359.7 KiB (+0.14% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 329692	   5264	  33384	 368340	  59ed4	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 329200	   5264	  33328	 367792	  59cb0	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.7% +11.9Ki  [ = ]       0    .debug_info
  +0.4% +11.4Ki  [ = ]       0    .debug_str
  +0.5% +3.27Ki  [ = ]       0    .debug_loc
  +0.3%    +966  [ = ]       0    .debug_line
  +0.1%    +392  +0.1%    +392    .text
  +0.1%    +155  [ = ]       0    .strtab
  +0.1%    +144  [ = ]       0    .symtab
  +1.5%    +120  [ = ]       0    .debug_abbrev
  +0.3%    +100  +0.3%    +100    .rodata
  +0.0%     +64  [ = ]       0    .debug_ranges
  [ = ]       0  +0.2%     +56    .bss
  +0.1%     +40  [ = ]       0    .debug_frame
  +0.1%     +24  [ = ]       0    .debug_aranges
   +42%     +20  [ = ]       0    [Unmapped]
  +0.4% +28.6Ki  +0.1%    +548    TOTAL
use_rust/nrf52840_ble — 417.6 KiB → 418.1 KiB (+0.12% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 376244	   5264	  46672	 428180	  68894	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 375756	   5264	  46616	 427636	  68674	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +8.95Ki  [ = ]       0    .debug_str
  +0.4% +8.74Ki  [ = ]       0    .debug_info
  +0.2%    +849  [ = ]       0    .debug_line
  +0.1%    +388  +0.1%    +388    .text
  +0.2%    +304  [ = ]       0    .symtab
  +0.1%    +297  [ = ]       0    .strtab
  +0.3%    +136  [ = ]       0    .debug_frame
  +0.2%    +100  +0.2%    +100    .rodata
  +0.2%     +72  [ = ]       0    .debug_aranges
  [ = ]       0  +0.1%     +56    .bss
  +0.0%      +8  [ = ]       0    .debug_ranges
 -15.7%      -8  [ = ]       0    [Unmapped]
  -0.1%   -1004  [ = ]       0    .debug_loc
  +0.3% +18.8Ki  +0.1%    +544    TOTAL
use_rust/nrf52840_ble_split (central) — 505.1 KiB → 505.4 KiB (+0.06% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 458224	   6588	  52736	 517548	  7e5ac	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 457956	   6588	  52680	 517224	  7e468	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.3% +11.3Ki  [ = ]       0    .debug_str
  +0.3% +7.40Ki  [ = ]       0    .debug_info
  +0.1%    +712  [ = ]       0    .debug_loc
  +0.1%    +468  [ = ]       0    .debug_line
  +0.0%    +168  +0.0%    +168    .text
  +0.2%    +100  +0.2%    +100    .rodata
  +0.0%     +77  [ = ]       0    .strtab
  +0.0%     +72  [ = ]       0    .debug_ranges
  [ = ]       0  +0.1%     +56    .bss
  +0.7%     +56  [ = ]       0    .debug_abbrev
   +36%     +18  [ = ]       0    [Unmapped]
  +0.0%     +16  [ = ]       0    .symtab
  -0.0%      -4  [ = ]       0    .debug_frame
  +0.2% +20.3Ki  +0.1%    +324    TOTAL
use_rust/nrf52840_ble_split (peripheral) — 317.0 KiB → 317.5 KiB (+0.15% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 293952	   5360	  25784	 325096	  4f5e8	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 293508	   5360	  25728	 324596	  4f3f4	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.4% +10.6Ki  [ = ]       0    .debug_str
  +0.5% +7.80Ki  [ = ]       0    .debug_info
  +0.2% +1.10Ki  [ = ]       0    .debug_loc
  +0.4%    +996  [ = ]       0    .debug_line
  +0.1%    +336  +0.1%    +336    .text
  +0.2%    +288  [ = ]       0    .debug_ranges
  +0.1%    +265  [ = ]       0    .strtab
  +0.2%    +192  [ = ]       0    .symtab
  +0.3%    +108  +0.3%    +108    .rodata
  +0.3%     +88  [ = ]       0    .debug_frame
  +0.2%     +64  [ = ]       0    .debug_aranges
  [ = ]       0  +0.2%     +56    .bss
   +10%      +6  [ = ]       0    [Unmapped]
  +0.4% +21.8Ki  +0.2%    +500    TOTAL
use_rust/pi_pico_w_ble — 659.8 KiB → 660.1 KiB (+0.03% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 620216	      0	  55732	 675948	  a506c	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 620008	      0	  55676	 675684	  a4f64	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +7.12Ki  [ = ]       0    .debug_str
  +0.2% +4.59Ki  [ = ]       0    .debug_info
  +0.0%    +477  [ = ]       0    .debug_loc
  +0.1%    +388  [ = ]       0    .debug_line
  +0.4%    +352  [ = ]       0    .symtab
  +0.1%    +269  [ = ]       0    .strtab
  +0.1%    +208  +0.1%    +208    .text
  +0.1%    +176  [ = ]       0    .debug_ranges
  [ = ]       0  +0.1%     +56    .bss
  +0.1%     +28  [ = ]       0    .debug_frame
   +32%     +13  [ = ]       0    [Unmapped]
  +0.0%      +8  [ = ]       0    .debug_aranges
  -0.4%     -43  [ = ]       0    .debug_abbrev
  +0.2% +13.5Ki  +0.0%    +264    TOTAL
use_rust/rp2040 — 146.5 KiB → 146.9 KiB (+0.28% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 135256	      0	  15180	 150436	  24ba4	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 134884	      0	  15124	 150008	  249f8	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.6% +7.98Ki  [ = ]       0    .debug_str
  +0.6% +6.07Ki  [ = ]       0    .debug_info
  +0.7% +1.87Ki  [ = ]       0    .debug_loc
  +0.5%    +765  [ = ]       0    .debug_line
  +0.3%    +372  +0.3%    +372    .text
  +0.3%    +307  [ = ]       0    .strtab
  +0.3%    +248  [ = ]       0    .debug_ranges
  +0.3%    +112  [ = ]       0    .symtab
  [ = ]       0  +0.4%     +56    .bss
  +0.2%     +28  [ = ]       0    .debug_frame
  +0.0%      +8  [ = ]       0    .debug_aranges
   +12%      +6  [ = ]       0    [Unmapped]
  +0.6% +17.7Ki  +0.3%    +428    TOTAL
use_rust/rp2040_split (central) — 157.8 KiB → 158.1 KiB (+0.25% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 146100	      0	  15844	 161944	  27898	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 145748	      0	  15788	 161536	  27700	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.6% +8.92Ki  [ = ]       0    .debug_str
  +0.5% +5.57Ki  [ = ]       0    .debug_info
  +0.3% +1.12Ki  [ = ]       0    .debug_loc
  +0.4%    +783  [ = ]       0    .debug_line
  +0.8%    +720  [ = ]       0    .debug_ranges
  +0.3%    +352  +0.3%    +352    .text
  +0.3%    +291  [ = ]       0    .strtab
  [ = ]       0  +0.4%     +56    .bss
  +0.2%     +28  [ = ]       0    .debug_frame
  +0.0%      +8  [ = ]       0    .debug_aranges
  -6.3%      -4  [ = ]       0    [Unmapped]
  -0.1%     -48  [ = ]       0    .symtab
  +0.5% +17.7Ki  +0.3%    +408    TOTAL
use_rust/rp2040_split (peripheral) — 26.4 KiB → 26.6 KiB (+0.62% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  24432	     56	   2732	  27220	   6a54	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  24320	     56	   2676	  27052	   69ac	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +1.3% +8.82Ki  [ = ]       0    .debug_str
  +1.6% +5.52Ki  [ = ]       0    .debug_info
  +4.1%    +768  [ = ]       0    .strtab
  +0.9%    +478  [ = ]       0    .debug_line
  +1.2%    +236  +1.2%    +236    .text
  +1.6%    +232  [ = ]       0    .debug_ranges
  +2.6%    +208  [ = ]       0    .symtab
  +2.4%    +124  [ = ]       0    .debug_frame
  [ = ]       0  +3.4%     +56    .bss
  +0.2%     +32  [ = ]       0    .debug_aranges
  +4.4%      +8  [ = ]       0    .defmt
 -22.8%     -13  [ = ]       0    [Unmapped]
  -0.5%     -27  [ = ]       0    .debug_abbrev
  -2.5%    -124  -2.5%    -124    .rodata
  -0.8%    -470  [ = ]       0    .debug_loc
  +1.3% +15.8Ki  +0.6%    +168    TOTAL
use_rust/stm32f1 — 61.9 KiB → 61.9 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  55968	     28	   7408	  63404	   f7ac	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  55968	     28	   7408	  63404	   f7ac	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +305  [ = ]       0    .debug_info
  +0.0%     +10  [ = ]       0    .debug_line
  -3.7%      -2  [ = ]       0    [Unmapped]
  -0.0%    -257  [ = ]       0    .debug_str
  +0.0%     +56  [ = ]       0    TOTAL
use_rust/stm32h7 — 120.9 KiB → 120.9 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 108076	    324	  15452	 123852	  1e3cc	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 108076	    324	  15452	 123852	  1e3cc	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%    +712  [ = ]       0    .debug_str
  +0.0%    +342  [ = ]       0    .debug_info
  +0.2%    +297  [ = ]       0    .debug_line
  +0.0%      +4  [ = ]       0    .strtab
  -1.5%      -1  [ = ]       0    [Unmapped]
  -0.0%     -10  [ = ]       0    .debug_loc
  +0.0% +1.31Ki  [ = ]       0    TOTAL

@jpds jpds force-pushed the watchdog-runner branch 7 times, most recently from 4e9c11f to ed6bfc1 Compare May 5, 2026 21:42
@HaoboGu
Copy link
Copy Markdown
Owner

HaoboGu commented May 11, 2026

It seems that there're some issues/warning reported, so the CI fails. Could you fix it?

@jpds jpds force-pushed the watchdog-runner branch 2 times, most recently from f549694 to a006dde Compare May 11, 2026 07:48
@jpds
Copy link
Copy Markdown
Contributor Author

jpds commented May 11, 2026

@HaoboGu Fixed now, and enhanced the CI so it didn't hide the error.

@HaoboGu
Copy link
Copy Markdown
Owner

HaoboGu commented May 11, 2026

Can you make watchdog optional?

@jpds jpds force-pushed the watchdog-runner branch from a006dde to ecfd1f8 Compare May 11, 2026 08:31
jpds added 3 commits May 11, 2026 09:59
Add a chip-agnostic WatchdogFeed trait and WatchdogRunner that
implements Runnable, so it can be passed directly to run_all!.
Because all runnables are joined cooperatively, a tight-loop
stall in any sibling task blocks the runner too, letting the
hardware watchdog fire a reset.

The macro codegen (use_config) is wired up to emit
watchdog_runner initialization and add it to the joined task
set for unibody, split central, and split peripheral boards.
No chip implementations yet -- each is added separately.

All of this sits behind a new `watchdog` feature, on by default.
Turning it off (default-features = false) drops the rmk::watchdog
module and makes the codegen a no-op, so the runner costs nothing
on builds that do not want it.
Rp2040Watchdog wraps embassy-rp Watchdog behind the rp2040
feature flag with pause_on_debug(true). The use_rust/rp2040 and
use_rust/rp2040_split examples and use_config macro codegen are
updated to enable it with an 8s timeout (hardware max is ~8.3s
due to RP2040-E1 errata), fed every 4s.

Adds a default_runner for RP2040 and Pi Pico W support
Nrf52Watchdog wraps a single embassy-nrf WatchdogHandle behind
the _nrf_ble feature flag. A default_runner() helper encapsulates
the standard WDT config (10s timeout at 32768 Hz, PAUSE on debug
halt, fed every 5s) so callers need only one line.

The macro codegen and all use_rust nRF examples (nrf52832_ble,
nrf52840_ble, nrf52840_ble_split, nrf52840_ble_split_dongle) now
use this helper.
@jpds jpds force-pushed the watchdog-runner branch from ecfd1f8 to 11beae4 Compare May 11, 2026 08:59
@jpds
Copy link
Copy Markdown
Contributor Author

jpds commented May 11, 2026

Should be all good now.

Comment thread rmk-macro/src/codegen/watchdog.rs Outdated
jpds added 2 commits May 11, 2026 12:57
Set RUSTFLAGS=-D warnings in the example Build step so a stray lint
(e.g. an unused import) fails CI directly. Without it, an undenied
warning is replayed onto stdout by "cargo size" during the bloat step
and corrupts the size parser, surfacing as an opaque shell error far
from the real cause.

HEAD keeps -D warnings in the bloat size step too so RUSTFLAGS matches
the Build step and cargo reuses the binary; the BASE build keeps the
default lint level so a pre-existing warning on main can't fail an
unrelated PR.
@jpds jpds force-pushed the watchdog-runner branch from 11beae4 to 5844b0f Compare May 11, 2026 11:57
@HaoboGu
Copy link
Copy Markdown
Owner

HaoboGu commented May 11, 2026

Nice work, thanks a lot!

@HaoboGu HaoboGu merged commit bdacb08 into HaoboGu:main May 11, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants