Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add L515 firmware to internal update #6492

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions common/fw-update-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@
#include "common/fw/D4XX_FW_Image.h"
#include "common/fw/D4XX_RC_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_D4XX_RC_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_D4XX_RC_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 @@ -49,6 +53,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 @@ -59,6 +64,7 @@ namespace rs2
if (product_line == RS2_PRODUCT_LINE_D400 && allow_rc_firmware) return FW_D4XX_RC_IMAGE_VERSION;
else 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 Down Expand Up @@ -92,6 +98,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 @@ -36,6 +36,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 e04daebd9b6f48cc1fdbcbbbc38f26d9c83bcae4)
set(L5XX_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/L5xx/FW")

add_library(${PROJECT_NAME} STATIC empty.c)

if (MSVC)
Expand Down Expand Up @@ -81,6 +87,8 @@ target_binary( "${D4XX_FW_URL}" "${D4XX_FW_VERSION}" "${D4XX_FW_SHA1}" D4XX_FW
target_binary( "${D4XX_RC_URL}" "${D4XX_RC_VERSION}" "${D4XX_RC_SHA1}" D4XX_RC_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 @@ -7,3 +7,4 @@
#define SR3XX_RECOMMENDED_FIRMWARE_VERSION "3.26.1.0"
#define D4XX_RC_FIRMWARE_VERSION "5.12.5.0"
#define T26X_FIRMWARE_VERSION "0.2.0.951"
#define L5XX_RECOMMENDED_FIRMWARE_VERSION "1.4.0.10"
1 change: 1 addition & 0 deletions common/fw/fw.rc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "D4XX_FW_Image.rc"
#include "D4XX_RC_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