Skip to content

Commit 2174523

Browse files
sksubiitpattacini
andauthored
YAFU (#1057)
Co-authored-by: Ugo Pattacini <ugo.pattacini@iit.it>
1 parent 4319e43 commit 2174523

File tree

9 files changed

+1855
-0
lines changed

9 files changed

+1855
-0
lines changed

src/tools/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ add_subdirectory(fakeRawDataPublisherTester)
1515
add_subdirectory(canLoader)
1616
add_subdirectory(ethLoader)
1717
add_subdirectory(strainCalib)
18+
add_subdirectory(yafu)
1819

1920
# Tools available both for Qt5
2021
if(ICUB_USE_Qt5)

src/tools/yafu/CMakeLists.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright: (C) 2025 iCub Facility - Istituto Italiano di Tecnologia
2+
# Authors: SATHISH KUMAR S
3+
# CopyPolicy: Released under the terms of the GNU GPL v2.0.
4+
# yafu - Yet_Another_Firmware_Updater
5+
# version: 1.0 - 2025/11/17
6+
7+
project(yafu)
8+
9+
# make install locations available
10+
include(GNUInstallDirs)
11+
12+
# Only build on Linux
13+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
14+
message(STATUS "Building YAFU on Linux")
15+
else()
16+
message(STATUS "YAFU disabled on non-Linux platform (${CMAKE_SYSTEM_NAME}); skipping build and install.")
17+
return()
18+
endif()
19+
20+
# require icub-firmware-shared
21+
if(NOT ICUB_USE_icub_firmware_shared)
22+
message(STATUS "icub-firmware-shared not selected, disabling yafu")
23+
return()
24+
endif()
25+
26+
# sources
27+
set(SRCS
28+
src/yafu.cpp
29+
src/yafu.h
30+
)
31+
32+
# target
33+
add_executable(${PROJECT_NAME} ${SRCS})
34+
35+
# include & link firmware-shared and other deps
36+
target_link_libraries(${PROJECT_NAME} PRIVATE
37+
icub_firmware_shared::embobj
38+
)
39+
40+
target_include_directories(${PROJECT_NAME} PUBLIC
41+
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
42+
)
43+
44+
# Install binary and helper scripts
45+
install(TARGETS ${PROJECT_NAME}
46+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
47+
48+
install(PROGRAMS
49+
yafu_discover.sh
50+
yafu_parallel.sh
51+
yafu_program.sh
52+
yafu_restart.sh
53+
DESTINATION ${CMAKE_INSTALL_BINDIR})

src/tools/yafu/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
YAFU
2+
====
3+
4+
Lightweight firmware updater for iCub Ethernet boards — parallel, failure‑isolated updates that query boards, update only when needed, and restore default mode.
5+
6+
Runbook for more details: https://icub-tech-iit.github.io/documentation/icub_firmware/yafu_runbook/yafu_runbook/

0 commit comments

Comments
 (0)