Skip to content

Commit

Permalink
Add L515 firmware to internal update
Browse files Browse the repository at this point in the history
Re-applies IntelRealSense#6492
Promotes L515 FW to 1.4.1.0

This reverts commit c5fe4ce.
  • Loading branch information
ev-mp authored and Nir-Az committed Jun 15, 2020
1 parent 4e09d12 commit 2faba1b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 1 deletion.
14 changes: 14 additions & 0 deletions common/fw-update-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
#ifdef INTERNAL_FW
#include "common/fw/D4XX_FW_Image.h"
#include "common/fw/SR3XX_FW_Image.h"
#include "common/fw/L5XX_FW_Image.h"
#else
#define FW_D4XX_FW_IMAGE_VERSION ""
#define FW_SR3XX_FW_IMAGE_VERSION ""
#define FW_L5XX_FW_IMAGE_VERSION ""
const char* fw_get_D4XX_FW_Image(int) { return NULL; }
const char* fw_get_SR3XX_FW_Image(int) { return NULL; }
const char* fw_get_L5XX_FW_Image(int) { return NULL; }

#endif // INTERNAL_FW

constexpr const char* recommended_fw_url = "https://dev.intelrealsense.com/docs/firmware-releases";
Expand All @@ -46,6 +50,7 @@ namespace rs2
{
if (id == "D400") return RS2_PRODUCT_LINE_D400;
else if (id == "SR300") return RS2_PRODUCT_LINE_SR300;
else if (id == "L500") return RS2_PRODUCT_LINE_L500;
else return -1;
}

Expand All @@ -55,6 +60,7 @@ namespace rs2

if (product_line == RS2_PRODUCT_LINE_D400) return FW_D4XX_FW_IMAGE_VERSION;
//else if (product_line == RS2_PRODUCT_LINE_SR300) return FW_SR3XX_FW_IMAGE_VERSION;
else if (product_line == RS2_PRODUCT_LINE_L500) return FW_L5XX_FW_IMAGE_VERSION;
else return "";
}

Expand All @@ -80,6 +86,14 @@ namespace rs2
rv[RS2_PRODUCT_LINE_SR300] = vec;
}

if (strlen(FW_L5XX_FW_IMAGE_VERSION))
{
int size = 0;
auto hex = fw_get_L5XX_FW_Image(size);
auto vec = std::vector<uint8_t>(hex, hex + size);
rv[RS2_PRODUCT_LINE_L500] = vec;
}

return rv;
}

Expand Down
8 changes: 8 additions & 0 deletions common/fw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ message(STATUS "T26X_FW_VERSION: ${T26X_FW_VERSION}")
set(T26X_FW_SHA1 c3940ccbb0e3045603e4aceaa2d73427f96e24bc)
set(T26X_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/TM2/FW/target/${T26X_FW_VERSION}")

string(REGEX MATCH "L5XX_RECOMMENDED_FIRMWARE_VERSION \"([0-9]+.[0-9]+.[0-9]+.[0-9]+)\"" _ ${ver})
set(L5XX_FW_VERSION ${CMAKE_MATCH_1})
message(STATUS "L5XX_FW_VERSION: ${L5XX_FW_VERSION}")
set(L5XX_FW_SHA1 5bb7d4e68994328f324559db66a0c586c3037afa)
set(L5XX_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/L5xx/FW")

add_library(${PROJECT_NAME} STATIC empty.c)

if (MSVC)
Expand Down Expand Up @@ -74,6 +80,8 @@ endfunction()
target_binary( "${D4XX_FW_URL}" "${D4XX_FW_VERSION}" "${D4XX_FW_SHA1}" D4XX_FW_Image .bin)
target_binary( "${SR3XX_FW_URL}" "${SR3XX_FW_VERSION}" "${SR3XX_FW_SHA1}" SR3XX_FW_Image .bin)
target_binary( "${T26X_FW_URL}" "${T26X_FW_VERSION}" "${T26X_FW_SHA1}" target .mvcmd)
target_binary( "${L5XX_FW_URL}" "${L5XX_FW_VERSION}" "${L5XX_FW_SHA1}" L5XX_FW_Image .bin)


install(TARGETS ${PROJECT_NAME} EXPORT realsense2Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand Down
1 change: 1 addition & 0 deletions common/fw/firmware-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
#define D4XX_RECOMMENDED_FIRMWARE_VERSION "5.12.5.0"
#define SR3XX_RECOMMENDED_FIRMWARE_VERSION "3.26.1.0"
#define T26X_FIRMWARE_VERSION "0.2.0.951"
#define L5XX_RECOMMENDED_FIRMWARE_VERSION "1.4.1.0"
1 change: 1 addition & 0 deletions common/fw/fw.rc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "D4XX_FW_Image.rc"
#include "SR3XX_FW_Image.rc"
#include "L5XX_FW_Image.rc"
#include "target.rc"
4 changes: 4 additions & 0 deletions src/l500/l500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "proc/syncer-processing-block.h"
#include "proc/rotation-transform.h"
#include "fw-update/fw-update-unsigned.h"
#include "../common/fw/firmware-version.h"


namespace librealsense
{
Expand Down Expand Up @@ -89,6 +91,7 @@ namespace librealsense
auto asic_serial = _hw_monitor->get_module_serial_string(gvd_buff, module_asic_serial_offset, module_serial_size);
auto fwv = _hw_monitor->get_firmware_version_string(gvd_buff, fw_version_offset);
_fw_version = firmware_version(fwv);
firmware_version recommended_fw_version(L5XX_RECOMMENDED_FIRMWARE_VERSION);

_is_locked = _hw_monitor->get_gvd_field<bool>(gvd_buff, is_camera_locked_offset);

Expand All @@ -113,6 +116,7 @@ namespace librealsense
register_info(RS2_CAMERA_INFO_ASIC_SERIAL_NUMBER, asic_serial);
register_info(RS2_CAMERA_INFO_FIRMWARE_UPDATE_ID, asic_serial);
register_info(RS2_CAMERA_INFO_FIRMWARE_VERSION, _fw_version);
register_info(RS2_CAMERA_INFO_RECOMMENDED_FIRMWARE_VERSION, recommended_fw_version);
register_info(RS2_CAMERA_INFO_DEBUG_OP_CODE, std::to_string(static_cast<int>(fw_cmd::GLD)));
register_info(RS2_CAMERA_INFO_PHYSICAL_PORT, group.uvc_devices.front().device_path);
register_info(RS2_CAMERA_INFO_PRODUCT_ID, pid_hex_str);
Expand Down
1 change: 0 additions & 1 deletion src/l500/l500-device.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ namespace librealsense

lazy<std::vector<uint8_t>> _calib_table_raw;
firmware_version _fw_version;

std::shared_ptr<stream_interface> _depth_stream;
std::shared_ptr<stream_interface> _ir_stream;
std::shared_ptr<stream_interface> _confidence_stream;
Expand Down
2 changes: 2 additions & 0 deletions tools/realsense-viewer/realsense-viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
#ifdef INTERNAL_FW
#include "common/fw/D4XX_FW_Image.h"
#include "common/fw/SR3XX_FW_Image.h"
#include "common/fw/L5XX_FW_Image.h"
#else
#define FW_D4XX_FW_IMAGE_VERSION ""
#define FW_SR3XX_FW_IMAGE_VERSION ""
#define FW_L5XX_FW_IMAGE_VERSION ""
#endif // INTERNAL_FW

#include <easylogging++.h>
Expand Down

0 comments on commit 2faba1b

Please sign in to comment.