diff --git a/common/fw-update-helper.cpp b/common/fw-update-helper.cpp index 68cf8a1d2e..8e30819a20 100644 --- a/common/fw-update-helper.cpp +++ b/common/fw-update-helper.cpp @@ -18,9 +18,12 @@ #ifdef INTERNAL_FW #include "common/fw/D4XX_FW_Image.h" +#include "common/fw/D555_FW_Image.h" #else #define FW_D4XX_FW_IMAGE_VERSION "" +#define FW_D555_FW_IMAGE_VERSION "" const char* fw_get_D4XX_FW_Image(int) { return NULL; } +const char* fw_get_D555_FW_Image(int) { return NULL; } #endif // INTERNAL_FW @@ -47,12 +50,14 @@ namespace rs2 int parse_product_line(const std::string& product_line) { if (product_line == "D400") return RS2_PRODUCT_LINE_D400; + else if (product_line == "D500") return RS2_PRODUCT_LINE_D500; else return -1; } std::string get_available_firmware_version(int product_line, const std::string& pid) { if (product_line == RS2_PRODUCT_LINE_D400) return FW_D4XX_FW_IMAGE_VERSION; + else if (pid == "0B56" || pid == "DDS") return FW_D555_FW_IMAGE_VERSION; else return ""; } @@ -73,6 +78,17 @@ namespace rs2 } } break; + case RS2_PRODUCT_LINE_D500: + { + bool allow_rc_firmware = config_file::instance().get_or_default(configurations::update::allow_rc_firmware, false); + if (strlen(FW_D555_FW_IMAGE_VERSION) && !allow_rc_firmware) + { + int size = 0; + auto hex = fw_get_D555_FW_Image(size); + image = std::vector< uint8_t >(hex, hex + size); + } + } + break; default: break; } diff --git a/common/fw/CMakeLists.txt b/common/fw/CMakeLists.txt index f2708445eb..b6ec1a5bd0 100644 --- a/common/fw/CMakeLists.txt +++ b/common/fw/CMakeLists.txt @@ -17,6 +17,12 @@ set(D4XX_FW_VERSION ${CMAKE_MATCH_1}) set(D4XX_FW_SHA1 51e37fd01132c500bb4e4af408a41f42391289a5) set(D4XX_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/RS4xx/FW") +string(REGEX MATCH "D555_RECOMMENDED_FIRMWARE_VERSION \"([0-9]+.[0-9]+.[0-9]+.[0-9]+)\"" _ ${ver}) +set(D555_FW_VERSION ${CMAKE_MATCH_1}) +#message(STATUS "D555_FW_VERSION: ${D555_FW_VERSION}") +set(D555_FW_SHA1 5c5e6cb3c61756fa556c067b9166ba8d92320188) +set(D555_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/RS555/FW") + add_library(${PROJECT_NAME} STATIC empty.c) # disable link time optimization for fw by adding -fno-lto to disable -flto flag @@ -66,6 +72,7 @@ function(target_binary url version sha1 symbol ext) endfunction() target_binary( "${D4XX_FW_URL}" "${D4XX_FW_VERSION}" "${D4XX_FW_SHA1}" D4XX_FW_Image .bin) +target_binary( "${D555_FW_URL}" "${D555_FW_VERSION}" "${D555_FW_SHA1}" D555_FW_Image .img) install(TARGETS ${PROJECT_NAME} EXPORT realsense2Targets diff --git a/common/fw/firmware-version.h b/common/fw/firmware-version.h index 9b2fe87b9f..ebd4656c7a 100644 --- a/common/fw/firmware-version.h +++ b/common/fw/firmware-version.h @@ -5,3 +5,4 @@ #define D4XX_RECOMMENDED_FIRMWARE_VERSION "5.16.0.1" +#define D555_RECOMMENDED_FIRMWARE_VERSION "7.56.19752.406" diff --git a/common/fw/fw.rc b/common/fw/fw.rc index dc25a441af..62b77b8c16 100644 --- a/common/fw/fw.rc +++ b/common/fw/fw.rc @@ -1,2 +1,3 @@ #include "D4XX_FW_Image.rc" +#include "D555_FW_Image.rc" diff --git a/src/ds/d500/d500-device.cpp b/src/ds/d500/d500-device.cpp index 6118e7e6ea..550b39be4e 100644 --- a/src/ds/d500/d500-device.cpp +++ b/src/ds/d500/d500-device.cpp @@ -23,6 +23,7 @@ #include "proc/depth-formats-converter.h" #include "proc/y8i-to-y8y8.h" #include "proc/y16i-to-y10msby10msb.h" +#include #include using rs_fourcc = rsutils::type::fourcc; @@ -489,7 +490,7 @@ namespace librealsense _device_capabilities = ds_caps::CAP_ACTIVE_PROJECTOR | ds_caps::CAP_RGB_SENSOR | ds_caps::CAP_IMU_SENSOR | ds_caps::CAP_BMI_085 | ds_caps::CAP_GLOBAL_SHUTTER | ds_caps::CAP_INTERCAM_HW_SYNC; - _fw_version = rsutils::version(gvd_parsed_fields.fw_version); + _fw_version = rsutils::version(gvd_parsed_fields.fw_version); auto _usb_mode = usb3_type; usb_type_str = usb_spec_names.at(_usb_mode); @@ -519,6 +520,11 @@ namespace librealsense _is_locked = _ds_device_common->is_locked( gvd_buff.data(), is_camera_locked_offset ); + // Recommended FW only for D555 + if (pid_hex_str == "0B56") + { + _recommended_fw_version = firmware_version(D555_RECOMMENDED_FIRMWARE_VERSION); + } //EXPOSURE AND GAIN - preparing uvc options auto exposure_option = std::make_shared>(raw_depth_sensor, @@ -695,8 +701,11 @@ namespace librealsense register_info(RS2_CAMERA_INFO_ADVANCED_MODE, ((advanced_mode) ? "YES" : "NO")); register_info(RS2_CAMERA_INFO_PRODUCT_ID, pid_hex_str); register_info(RS2_CAMERA_INFO_PRODUCT_LINE, "D500"); - // Uncomment once D500 recommended FW exist - //register_info(RS2_CAMERA_INFO_RECOMMENDED_FIRMWARE_VERSION, _recommended_fw_version); + // Recommended FW only for D555 + if (pid_hex_str == "0B56") + { + register_info(RS2_CAMERA_INFO_RECOMMENDED_FIRMWARE_VERSION, _recommended_fw_version); + } register_info(RS2_CAMERA_INFO_CAMERA_LOCKED, _is_locked ? "YES" : "NO"); if (usb_modality) diff --git a/tools/realsense-viewer/realsense-viewer.cpp b/tools/realsense-viewer/realsense-viewer.cpp index f818cba799..326a670a75 100644 --- a/tools/realsense-viewer/realsense-viewer.cpp +++ b/tools/realsense-viewer/realsense-viewer.cpp @@ -24,8 +24,10 @@ #ifdef INTERNAL_FW #include "common/fw/D4XX_FW_Image.h" +#include "common/fw/D555_FW_Image.h" #else #define FW_D4XX_FW_IMAGE_VERSION "" +#define FW_D555_FW_IMAGE_VERSION "" #endif // INTERNAL_FW using namespace rs2;