├── .clang-format ├── .clangformatignore ├── .github ├── actions │ └── checkout │ │ └── action.yml └── workflows │ └── automerge_main_to_dev.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── apps ├── CMakeLists.txt ├── readme.md └── server │ ├── CMakeLists.txt │ ├── README.md │ ├── buffer.proto │ ├── server.cpp │ └── server.h ├── azure-pipelines.yml ├── bindings ├── open3D │ ├── CMakeLists.txt │ ├── readme.md │ └── showPointCloud │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── readme.md ├── opencv │ ├── CMakeLists.txt │ ├── aditof_opencv.h │ ├── dnn │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── readme.md │ ├── imshow │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ └── readme.md │ ├── maskrcnn │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── mscoco_labels.names │ │ └── readme.md │ └── readme.md ├── python │ ├── CMakeLists.txt │ ├── aditofpython.cpp │ ├── examples │ │ ├── data_collect │ │ │ ├── CMakeLists.txt │ │ │ ├── data_collect.py │ │ │ └── readme.md │ │ ├── dnn │ │ │ ├── CMakeLists.txt │ │ │ ├── dnn.py │ │ │ └── readme.md │ │ ├── dual_cameras │ │ │ ├── CMakeLists.txt │ │ │ └── dual_cameras.py │ │ ├── first_frame │ │ │ ├── CMakeLists.txt │ │ │ ├── first_frame.py │ │ │ └── readme.md │ │ ├── gesture_rec │ │ │ ├── CMakeLists.txt │ │ │ ├── install_deps.sh │ │ │ ├── notebook.py │ │ │ ├── process.py │ │ │ └── readme.md │ │ ├── maskr_cnn │ │ │ ├── maskr_cnn.py │ │ │ ├── object_detection_classes_coco.txt │ │ │ └── readme.md │ │ ├── readme.md │ │ ├── saveCCBToFile │ │ │ ├── CMakeLists.txt │ │ │ ├── readme.md │ │ │ └── saveCCBToFile.py │ │ ├── showPointCloud │ │ │ ├── CMakeLists.txt │ │ │ ├── readme.md │ │ │ └── showPointCloud.py │ │ ├── skeletal_tracking │ │ │ ├── CMakeLists.txt │ │ │ ├── readme.md │ │ │ └── skeletal_tracking.py │ │ ├── skeletal_tracking_in_pointcloud │ │ │ ├── CMakeLists.txt │ │ │ ├── readme.md │ │ │ └── skeletal_tracking_in_pointcloud.py │ │ └── streaming │ │ │ ├── CMakeLists.txt │ │ │ └── depth-image-animation-pygame.py │ └── readme.md └── ros2 │ ├── CMakeLists.txt │ ├── README.md │ ├── doc │ ├── tof-ros2-nativ.png │ └── tof-ros2-network.png │ └── ros2_setup.bash ├── ci └── azure │ ├── build_docker_image.sh │ ├── deps.sh │ ├── imx8-docker │ └── Dockerfile │ ├── inside_docker.sh │ ├── lib.sh │ ├── nvidia-docker │ └── Dockerfile │ ├── readme.md │ ├── run_build.sh │ ├── setup_docker.sh │ ├── setup_paths.sh │ └── windows-build │ ├── build_sdk.ps1 │ └── install_deps.ps1 ├── cmake ├── aditof-config.cmake.in ├── aditof-setup.iss.cmakein ├── readme.md ├── setup.py.cmakein └── version.h.cmakein ├── dependencies ├── CMakeLists.txt ├── adi │ └── command_parser │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── command_parser.cpp │ │ └── command_parser.h └── third-party │ ├── c_json │ ├── CMakeLists.txt │ ├── cJSON.c │ └── cJSON.h │ ├── crc32 │ ├── CMakeLists.txt │ ├── crc.c │ └── crc.h │ └── imgui │ ├── CMakeLists.txt │ └── src │ ├── .editorconfig │ ├── .gitattributes │ ├── .github │ ├── issue_template.md │ ├── pull_request_template.md │ └── workflows │ │ └── build.yml │ ├── LICENSE.txt │ ├── docs │ ├── CHANGELOG.txt │ ├── FAQ.md │ ├── FONTS.txt │ ├── README.md │ └── TODO.txt │ ├── examples │ ├── .gitignore │ ├── README.txt │ ├── example_allegro5 │ │ ├── README.md │ │ ├── example_allegro5.vcxproj │ │ ├── example_allegro5.vcxproj.filters │ │ ├── imconfig_allegro5.h │ │ └── main.cpp │ ├── example_apple_metal │ │ ├── README.md │ │ ├── Shared │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Renderer.h │ │ │ ├── Renderer.mm │ │ │ ├── ViewController.h │ │ │ ├── ViewController.mm │ │ │ └── main.m │ │ ├── example_apple_metal.xcodeproj │ │ │ └── project.pbxproj │ │ ├── iOS │ │ │ ├── Base.lproj │ │ │ │ └── Main.storyboard │ │ │ ├── Default-568h@2x.png │ │ │ ├── Info-iOS.plist │ │ │ └── Launch Screen.storyboard │ │ └── macOS │ │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ │ └── Info-macOS.plist │ ├── example_apple_opengl2 │ │ ├── example_apple_opengl2.xcodeproj │ │ │ └── project.pbxproj │ │ └── main.mm │ ├── example_emscripten │ │ ├── Makefile │ │ ├── README.md │ │ ├── main.cpp │ │ └── shell_minimal.html │ ├── example_glfw_metal │ │ ├── Makefile │ │ └── main.mm │ ├── example_glfw_opengl2 │ │ ├── Makefile │ │ ├── build_win32.bat │ │ ├── example_glfw_opengl2.vcxproj │ │ ├── example_glfw_opengl2.vcxproj.filters │ │ └── main.cpp │ ├── example_glfw_opengl3 │ │ ├── Makefile │ │ ├── build_win32.bat │ │ ├── example_glfw_opengl3.vcxproj │ │ ├── example_glfw_opengl3.vcxproj.filters │ │ └── main.cpp │ ├── example_glfw_vulkan │ │ ├── CMakeLists.txt │ │ ├── build_win32.bat │ │ ├── build_win64.bat │ │ ├── example_glfw_vulkan.vcxproj │ │ ├── example_glfw_vulkan.vcxproj.filters │ │ ├── gen_spv.sh │ │ ├── glsl_shader.frag │ │ ├── glsl_shader.vert │ │ └── main.cpp │ ├── example_glut_opengl2 │ │ ├── Makefile │ │ ├── example_glut_opengl2.vcxproj │ │ ├── example_glut_opengl2.vcxproj.filters │ │ └── main.cpp │ ├── example_marmalade │ │ ├── data │ │ │ └── app.icf │ │ ├── main.cpp │ │ └── marmalade_example.mkb │ ├── example_null │ │ ├── Makefile │ │ ├── build_win32.bat │ │ └── main.cpp │ ├── example_sdl_directx11 │ │ ├── build_win32.bat │ │ ├── example_sdl_directx11.vcxproj │ │ ├── example_sdl_directx11.vcxproj.filters │ │ └── main.cpp │ ├── example_sdl_metal │ │ ├── Makefile │ │ └── main.mm │ ├── example_sdl_opengl2 │ │ ├── Makefile │ │ ├── README.md │ │ ├── build_win32.bat │ │ ├── example_sdl_opengl2.vcxproj │ │ ├── example_sdl_opengl2.vcxproj.filters │ │ └── main.cpp │ ├── example_sdl_opengl3 │ │ ├── Makefile │ │ ├── README.md │ │ ├── build_win32.bat │ │ ├── example_sdl_opengl3.vcxproj │ │ ├── example_sdl_opengl3.vcxproj.filters │ │ └── main.cpp │ ├── example_sdl_vulkan │ │ ├── example_sdl_vulkan.vcxproj │ │ ├── example_sdl_vulkan.vcxproj.filters │ │ └── main.cpp │ ├── example_win32_directx10 │ │ ├── build_win32.bat │ │ ├── example_win32_directx10.vcxproj │ │ ├── example_win32_directx10.vcxproj.filters │ │ └── main.cpp │ ├── example_win32_directx11 │ │ ├── build_win32.bat │ │ ├── example_win32_directx11.vcxproj │ │ ├── example_win32_directx11.vcxproj.filters │ │ └── main.cpp │ ├── example_win32_directx12 │ │ ├── build_win32.bat │ │ ├── example_win32_directx12.vcxproj │ │ ├── example_win32_directx12.vcxproj.filters │ │ └── main.cpp │ ├── example_win32_directx9 │ │ ├── build_win32.bat │ │ ├── example_win32_directx9.vcxproj │ │ ├── example_win32_directx9.vcxproj.filters │ │ └── main.cpp │ ├── imgui_examples.sln │ ├── imgui_impl_allegro5.cpp │ ├── imgui_impl_allegro5.h │ ├── imgui_impl_dx10.cpp │ ├── imgui_impl_dx10.h │ ├── imgui_impl_dx11.cpp │ ├── imgui_impl_dx11.h │ ├── imgui_impl_dx12.cpp │ ├── imgui_impl_dx12.h │ ├── imgui_impl_dx9.cpp │ ├── imgui_impl_dx9.h │ ├── imgui_impl_glfw.cpp │ ├── imgui_impl_glfw.h │ ├── imgui_impl_glut.cpp │ ├── imgui_impl_glut.h │ ├── imgui_impl_marmalade.cpp │ ├── imgui_impl_marmalade.h │ ├── imgui_impl_metal.h │ ├── imgui_impl_metal.mm │ ├── imgui_impl_opengl2.cpp │ ├── imgui_impl_opengl2.h │ ├── imgui_impl_opengl3.cpp │ ├── imgui_impl_opengl3.h │ ├── imgui_impl_osx.h │ ├── imgui_impl_osx.mm │ ├── imgui_impl_sdl.cpp │ ├── imgui_impl_sdl.h │ ├── imgui_impl_vulkan.cpp │ ├── imgui_impl_vulkan.h │ ├── imgui_impl_win32.cpp │ ├── imgui_impl_win32.h │ └── libs │ │ ├── gl3w │ │ └── GL │ │ │ ├── gl3w.c │ │ │ ├── gl3w.h │ │ │ └── glcorearb.h │ │ ├── glfw │ │ ├── COPYING.txt │ │ ├── include │ │ │ └── GLFW │ │ │ │ ├── glfw3.h │ │ │ │ └── glfw3native.h │ │ ├── lib-vc2010-32 │ │ │ └── glfw3.lib │ │ └── lib-vc2010-64 │ │ │ └── glfw3.lib │ │ └── usynergy │ │ ├── README.txt │ │ ├── uSynergy.c │ │ └── uSynergy.h │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_internal.h │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ ├── imstb_truetype.h │ └── misc │ ├── README.txt │ ├── cpp │ ├── README.txt │ ├── imgui_stdlib.cpp │ └── imgui_stdlib.h │ ├── fonts │ ├── Cousine-Regular.ttf │ ├── DroidSans.ttf │ ├── Karla-Regular.ttf │ ├── ProggyClean.ttf │ ├── ProggyTiny.ttf │ ├── Roboto-Medium.ttf │ └── binary_to_compressed_c.cpp │ ├── freetype │ ├── README.md │ ├── imgui_freetype.cpp │ └── imgui_freetype.h │ ├── natvis │ ├── README.txt │ └── imgui.natvis │ └── single_file │ └── imgui_single_file.h ├── doc ├── CMakeLists.txt ├── code-formatting.md ├── img │ ├── build_VS.PNG │ ├── configuration_VS.PNG │ ├── dnn.png │ ├── dnn_python.PNG │ ├── imshow.png │ ├── maskrcnn_cpp.png │ ├── maskrcnn_python.png │ ├── pointcloud_cpp.png │ ├── pointcloud_python.png │ ├── ros_dynamic_reconfigure.png │ ├── run_VS.PNG │ ├── saved_frame_content_map.png │ ├── sdk_acquire_frame_sequence_diagram.png │ ├── sdk_class_diagram.png │ ├── sdk_initialization_sequence_diagram.png │ ├── sdk_software_stack.png │ ├── sdk_top_level_diagram.png │ ├── skeletal_tracking_in_pointcloud_python.png │ ├── skeletal_tracking_python.png │ ├── startup_VS.PNG │ └── windows_db410c_usb.JPG ├── itof │ ├── linux_build_instructions.md │ ├── nxp_build_instructions.md │ └── windows_build_instructions.md ├── mainpage.dox ├── readme.md ├── sdcard_burn.md └── sdk.doxy.in ├── examples ├── CMakeLists.txt ├── data_collect │ ├── CMakeLists.txt │ ├── main.cpp │ └── readme.md ├── first-frame │ ├── CMakeLists.txt │ ├── main.cpp │ └── readme.md ├── readme.md └── tof-viewer │ ├── .gitmodules │ ├── ADIToFConfig.h.in │ ├── Build.md │ ├── CMakeLists.txt │ ├── Images │ ├── DepthFrame.png │ ├── DepthView.png │ ├── DepthViewCMOS.png │ ├── FSFOptionsWindowPB.png │ ├── MainWindow.png │ ├── MainWindowCMOS.png │ ├── OpenDevice.png │ ├── OpenDeviceCMOS.png │ ├── OpenRecording_Button.png │ ├── PlayCamera.png │ ├── PlayCameraCMOS.png │ ├── PlayCameraWPC.png │ ├── PlayCameraWPC2.png │ ├── PlaybackFilters.JPG │ ├── PlaybackOptions.png │ ├── PlaybackProgress.png │ ├── PointCloudImage.png │ ├── RecordingFSFOptionsWin.png │ ├── RecordingOptions.png │ ├── RecordingOptionsWPC.png │ ├── SaveAs.JPG │ └── StartCamera.png │ ├── LOGOS │ ├── CompanyIcon.png │ ├── CompanyLogo.png │ └── MainWindowTitle.txt │ ├── RAW Format.md │ ├── README.md │ ├── README.pdf │ ├── include │ ├── ADIController.h │ ├── ADIImGUIExtensions.h │ ├── ADIInformationPane.h │ ├── ADIMainWindow.h │ ├── ADIOpenFile.h │ ├── ADIToFRecorder.h │ ├── ADITypes.h │ ├── ADIView.h │ ├── CompanyIcon.png.h │ ├── CompanyLogo.png.h │ ├── filesystem.hpp │ ├── linmath.h │ ├── safequeue.h │ └── stb_image.h │ ├── src │ ├── ADIController.cpp │ ├── ADIImGUIExtensions.cpp │ ├── ADIMainWindow.cpp │ ├── ADIOpenFile.cpp │ ├── ADIShader.h │ ├── ADIToF.cpp │ ├── ADIToFRecorder.cpp │ ├── ADIView.cpp │ ├── fileDialog.mm │ └── wmain.cpp │ └── tof-tools.config ├── image-pipeline.yml ├── scripts ├── format.sh ├── nxp │ ├── ros2_ws_setup.bash │ └── setup.sh ├── readme.md └── windows │ ├── readme.md │ └── setup_project.bat ├── sdcard-images-utils ├── README.md └── nxp │ ├── .gitignore │ ├── README.md │ ├── configs │ ├── adi_imx_v8_defconfig │ └── buildroot_defconfig │ ├── create_sd.sh │ ├── deboot.sh │ ├── patches │ ├── linux-imx │ │ ├── 0001-Enable-I2C-in-PMIC.patch │ │ ├── 0002-media-spi-Add-initial-support-for-addicmos-camera.patch │ │ ├── 0003-Changes-for-ADI-camera-required-on-I.MX8M-Plus-captu.patch │ │ ├── 0004-drivers-staging-media-imx8-Convert-to-single-planar.patch │ │ ├── 0005-Convert-pixel-format-to-YUYV.patch │ │ ├── 0006-arch-arm64-dts-ADI-TOF-dt.patch │ │ ├── 0007-staging-media-imx-imx8-isi-cap-Fix-for-discarding-of.patch │ │ ├── 0008-drivers-usb-gadget-Add-XU-control-descriptor.patch │ │ ├── 0009-drivers-staging-media-imx-imx8-isi-cap-Add-debug-msg.patch │ │ ├── 0010-drivers-media-spi-addicmos-Add-resolutions-for-max-f.patch │ │ ├── 0011-arch-arm64-dts-imx8mp-aditof-noreg-Allow-PD-up-to-20.patch │ │ ├── 0012-usb-typec-tcpm-Remove-tcpm-port-reset.patch │ │ ├── 0013-drivers-usb-gadget-function-uvc_configfs-Set-guid-to.patch │ │ ├── 0014-arch-arm64-imx8mp-adi-tof-noreg-Activate-pull-down-o.patch │ │ ├── 0015-drivers-media-spi-addicmos-Add-custom-control-for-co.patch │ │ ├── 0016-adrivers-media-spi-addicmos.c-Add-resolution-for-mod.patch │ │ ├── 0017-pwm-gpio-Add-a-generic-gpio-based-PWM-driver.patch │ │ ├── 0018-Add-FSYNC-control-using-PWM-framework.patch │ │ ├── 0019-usb-gadget-Set-lowest-allowed-speed-to-SS.patch │ │ ├── 0020-drivers-media-addicmos-Add-module-parameter-to-enabl.patch │ │ ├── 0021-arch-arm64-imx8mp-adi-tof-noreg-Increase-CMA-size.patch │ │ ├── 0022-drivers-media-addicmos.c-Modify-chip_config-ctrl.patch │ │ ├── 0023-drivers-mtd-spi-nor-Add-support-for-MX25U1632F.patch │ │ ├── 0024-drivers-media-spi-addicmos-Fix-resolution-for-QVGA-m.patch │ │ ├── 0025-drivers-media-addicmos-Reduce-line-width-for-QVGA-mo.patch │ │ ├── 0026-drivers-staging-media-imx-imx8-media-dev.c-Support-b.patch │ │ ├── 0027-drivers-staging-media-imx8-isi-cap.c-Add-RAW8-suppor.patch │ │ ├── 0028-drivers-usb-gadget-function-uvc_v4l2.c-Add-support-f.patch │ │ ├── 0029-drivers-staging-media-imx-imx8-Fix-SBGGR8-support.patch │ │ ├── 0030-Rename-control-to-ADSD.patch │ │ ├── 0031-drivers-media-i2c-Initial-revision-of-ADSD3500-drive.patch │ │ ├── 0032-drivers-media-spi-addicmos.c-Add-dummy-s_power-to-ke.patch │ │ ├── 0033-Rename-addicmos-to-adsd3100.patch │ │ ├── 0034-drivers-staging-media-Add-support-for-RAW16.patch │ │ ├── 0035-drivers-media-i2c-adsd3500-Fix-MP-frames-width-and-h.patch │ │ ├── 0036-media-i2c-adsd3500-Implement-SET-GET-framerate-contr.patch │ │ ├── 0037-drivers-media-adsd-Remove-duplicate-link_freqs.patch │ │ ├── 0038-drivers-media-adsd3500-Add-AB-test-resolution-suppor.patch │ │ ├── 0039-drivers-media-adsd3100-Revert-adsd3100-to-YUYV.patch │ │ ├── 0040-arch-arm64-imx8mp-adi-tof-adsd3500.dts-Disable-1P8-a.patch │ │ ├── 0041-drivers-media-i2c-adsd3500-Add-ADSD30303-resolutions.patch │ │ ├── 0042-drivers-media-common-v4l2-loopback-Add-v4l2-loopback.patch │ │ ├── 0043-drivers-media-spi-adsd3100-Add-1-pase-mode.patch │ │ ├── 0044-drivers-staging-media-imx-Fix-YUYV-mode.patch │ │ ├── 0045-drivers-media-i2c-adsd3500-Add-adsd3030-support.patch │ │ ├── 0046-drivers-media-i2c-adsd3500.c-Allow-zero-BPP-for-dept.patch │ │ ├── 0047-drivers-media-adsd3500-Add-support-fo-3F3P-3F2P-VGA-.patch │ │ ├── 0048-arch-arm64-boot-dts-freescale-imx8mp-adi-tof-Enable-.patch │ │ ├── 0049-drivers-media-i2c-adsd3500.c-Add-LR-and-SR-RAW8-MP-m.patch │ │ ├── 0050-drivers-media-i2c-adsd3500.c-Initialize-depth-bits-t.patch │ │ ├── 0051-drivers-media-i2c-adsd3500-add-Debugfs-read-support.patch │ │ ├── 0052-drivers-media-common-Added-v4l2-loopback-source-path.patch │ │ ├── 0053-arch-arm64-boot-dts-freescale-imx8mp-adi-tof-Removed.patch │ │ ├── 0054-drivers-media-i2c-adsd3500.c-Host-boot-ADSD3500-firm.patch │ │ ├── 0055-drivers-media-i2c-adsd3500.c-Added-RAW16-and-RAW8-re.patch │ │ ├── 0056-drivers-media-i2c-adsd3500.c-Added-RAW12-resolution.patch │ │ ├── 0057-drivers-media-i2c-adsd3500.c-Modified-image-pixel-fo.patch │ │ ├── 0058-drivers-media-spi-Added-ADSD3500-SPI-driver.patch │ │ ├── 0059-arch-arm64-boot-dts-Added-ADSD3500-SPI-device-tree.patch │ │ ├── 0060-drivers-media-spi-adsd3500-spi.c-Send-SPI-write-comm.patch │ │ ├── 0061-drivers-media-i2c-adsd3500.c-Added-MP-mode-RAW12-res.patch │ │ ├── 0062-drivers-media-spi-adsd3500-spi.c-Appended-two-bytes-.patch │ │ ├── 0063-drivers-media-spi-adsd3500-spi.c-Read-ACK-data-after.patch │ │ ├── 0064-drivers-media-i2c-adsd3500.c-Acknowledgement-read-da.patch │ │ ├── 0065-drivers-media-spi-adsd3500-spi.c-Add-comments-to-des.patch │ │ ├── 0066-drivers-media-i2c-adsd3500.c-Added-new-RAW8-and-RAW1.patch │ │ ├── 0067-drivers-media-spi-adsd3500-spi.c-Added-new-RAW8-and-.patch │ │ ├── 0068-drivers-media-i2c-adsd3500.c-Update-the-pixel-format.patch │ │ └── 0069-drivers-media-spi-adsd3500-spi.c-resolution-with-sam.patch │ ├── mfgtools │ │ └── 0001-add-imx8mp-support.patch │ ├── overlay │ │ ├── etc │ │ │ └── firmware │ │ │ │ ├── BCM4345C0.1MW.hcd │ │ │ │ ├── BCM4345C0_003.001.025.0144.0266.1MW.hcd │ │ │ │ ├── CYW4345C0.1MW.hcd │ │ │ │ └── murata-master │ │ │ │ └── _BCM4345C0.1MW.hcd │ │ └── usr │ │ │ └── lib │ │ │ └── firmware │ │ │ ├── adi │ │ │ └── addicmos-fw.bin │ │ │ ├── brcm │ │ │ ├── brcmfmac43455-sdio.bin │ │ │ ├── brcmfmac43455-sdio.clm_blob │ │ │ └── brcmfmac43455-sdio.txt │ │ │ └── imx │ │ │ └── sdma │ │ │ ├── sdma-imx6q.bin │ │ │ └── sdma-imx7d.bin │ ├── uboot-imx │ │ ├── 0001-Add-imx8mp-solidrun-configuration-files-to-u-boot.patch │ │ ├── 0002-Add-imx8mp-solidrun-device-tree-to-u-boot.patch │ │ ├── 0003-Add-imx8mp-solidrun-board-to-uboot-configuration.patch │ │ ├── 0004-fix-name-of-dtb-file-for-i.MX8MP-HummingBoard-Pulse.patch │ │ ├── 0005-imx8mp-add-eqos-ethernet-port-and-disable-fec.patch │ │ ├── 0006-imx8mp-add-memory-size-detection.patch │ │ ├── 0007-LFU-143-tcpc-Add-i2c-read-write-return-check.patch │ │ ├── 0008-imx8mp_solidrun-Enable-USB-Type-C-controller.patch │ │ ├── 0009-board-solidrun-common-tcpc-Handle-DISCOVER_IDENTITY-.patch │ │ ├── 0010-arch-arm-dts-Add-ADI-devicetree.patch │ │ └── 0011-configs-imx8mp_solidrun_defoncifg-Set-boot-delay-to-.patch │ └── ubuntu_overlay │ │ ├── step1 │ │ └── usr │ │ │ ├── lib │ │ │ ├── firmware │ │ │ │ ├── adi │ │ │ │ │ ├── adsd3100-fw.bin │ │ │ │ │ └── adsd3500-fw.bin │ │ │ │ ├── brcm │ │ │ │ │ ├── brcmfmac43455-sdio.bin │ │ │ │ │ ├── brcmfmac43455-sdio.clm_blob │ │ │ │ │ └── brcmfmac43455-sdio.txt │ │ │ │ └── imx │ │ │ │ │ └── sdma │ │ │ │ │ ├── sdma-imx6q.bin │ │ │ │ │ └── sdma-imx7d.bin │ │ │ ├── init_resize.sh │ │ │ └── systemd │ │ │ │ └── system │ │ │ │ ├── adi-backup.service │ │ │ │ ├── adi-tof.service │ │ │ │ ├── network-gadget.path │ │ │ │ ├── network-gadget.service │ │ │ │ ├── usb-gadget.service │ │ │ │ ├── usb-gadget.target │ │ │ │ ├── uvc-gadget.path │ │ │ │ └── uvc-gadget.service │ │ │ ├── sbin │ │ │ └── reinit │ │ │ └── share │ │ │ └── systemd │ │ │ ├── backup_nvm_ccb.sh │ │ │ ├── tof-power-en.sh │ │ │ └── usb-gadget.sh │ │ └── step3 │ │ ├── etc │ │ ├── fstab │ │ ├── modprobe.d │ │ │ └── blacklist-tof.conf │ │ └── systemd │ │ │ ├── network │ │ │ ├── 20-wired-usb0.network │ │ │ ├── 25-wired-eth0.network │ │ │ └── 30-wireless-wlan0.network │ │ │ └── resolved.conf │ │ └── home │ │ ├── analog │ │ └── Workspace │ │ │ └── Tools │ │ │ ├── Firmware_update_utility │ │ │ ├── Firmware_Update │ │ │ └── README.txt │ │ │ ├── adi-adsd3500-reset.sh │ │ │ ├── adi-enable-wifi.sh │ │ │ ├── adi-ram-disk.sh │ │ │ ├── adi-stop-network-server.sh │ │ │ ├── adi-time-manual.sh │ │ │ ├── adi-time-network.sh │ │ │ ├── adi-vscode-ssh.sh │ │ │ ├── adsd3500_getframe │ │ │ ├── ADSD3030 │ │ │ │ └── new │ │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADSD3030_mode0.sh │ │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADSD3030_mode1.sh │ │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADSD3030_mode2.sh │ │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADSD3030_mode3.sh │ │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADSD3030_mode5.sh │ │ │ │ │ └── get_frame_RAW8_16D_16AB_8C_ADSD3030_mode6.sh │ │ │ └── ADTF3175D │ │ │ │ └── new │ │ │ │ ├── get_frame_RAW8_12P_16AB_ADTF3175D_mode0.sh │ │ │ │ ├── get_frame_RAW8_12P_16AB_ADTF3175D_mode1.sh │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode2.sh │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode3.sh │ │ │ │ ├── get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode5.sh │ │ │ │ └── get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode6.sh │ │ │ ├── ctrl_app │ │ │ ├── ctrl_app │ │ │ ├── infile.txt │ │ │ └── readme.md │ │ │ └── host_boot_tools │ │ │ ├── NVM_Utils │ │ │ ├── CCB_READ │ │ │ ├── CFG_READ │ │ │ ├── INIT_FW_WRITE │ │ │ ├── NVM_READ │ │ │ ├── NVM_WRITE │ │ │ └── README.txt │ │ │ ├── host_boot.py │ │ │ ├── host_boot.sh │ │ │ ├── host_boot.stream │ │ │ ├── read_chip_id.py │ │ │ ├── readme.md │ │ │ └── smbus2-0.4.2-py2.py3-none-any.whl │ │ └── bashrc_extension │ └── runme.sh └── tools ├── CMakeLists.txt ├── debug_apps ├── ctrl_app │ ├── ctrl_app.cpp │ ├── infile.txt │ └── readme.md └── readme.md ├── misc ├── README.md └── rawparser.py ├── nvm_tools ├── CMakeLists.txt ├── common │ ├── nvm_tools_common.cpp │ └── nvm_tools_common.h ├── fw_upgrade │ ├── CMakeLists.txt │ └── fw_upgrade.cpp └── nvm_write │ ├── CMakeLists.txt │ ├── include │ └── compute_crc.h │ └── nvm_write.cpp ├── readme.md ├── software_check ├── CMakeLists.txt ├── software_check.cpp └── sw_versions.info └── tof_lib_gen ├── generate_dpkg.bash ├── ubuntu_20_04 ├── adsd3030 │ └── Dockerfile └── crosby │ └── Dockerfile └── ubuntu_22_04 ├── adsd3030 └── Dockerfile └── crosby └── Dockerfile /.clangformatignore: -------------------------------------------------------------------------------- 1 | apps/uvc-app/include 2 | apps/uvc-app/lib 3 | bindings/python/pybind11 4 | dependencies/third-party 5 | drivers/ 6 | examples/data_collect/third_party 7 | examples/data_collect/adi 8 | examples/tof-viewer/external 9 | examples/tof-viewer/include/stb_image.h 10 | examples/tof-viewer/include/linmath.h 11 | sdk/src/cameras/itof-camera/tofi 12 | -------------------------------------------------------------------------------- /.github/actions/checkout/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Checkout Repository' 2 | 3 | description: 'Checkout the repository and fetch all branches' 4 | 5 | runs: 6 | using: 'composite' 7 | steps: 8 | - name: Checkout repository 9 | shell: bash 10 | run: | 11 | git clone "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" . 12 | git fetch --all 13 | -------------------------------------------------------------------------------- /.github/workflows/automerge_main_to_dev.yml: -------------------------------------------------------------------------------- 1 | name: Auto Merge main to dev branch (with submodules) 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | merge: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Manually clone the repository 14 | run: | 15 | git init 16 | git remote add origin https://github.com/${{ github.repository }}.git 17 | git fetch origin main 18 | git fetch origin dev-6.1.0 19 | git checkout -b dev-6.1.0 origin/dev-6.1.0 20 | 21 | - name: Configure Git 22 | run: | 23 | git config --global user.name "github-actions[bot]" 24 | git config --global user.email "github-actions[bot]@users.noreply.github.com" 25 | 26 | - name: Force replace dev branch with main branch contents (including submodules) 27 | run: | 28 | set -e 29 | git reset --hard origin/main 30 | git submodule update --init --recursive 31 | git add . 32 | git commit -m "Force sync dev branch with main branch (including submodules)" || echo "No changes to commit" 33 | 34 | - name: Push changes to dev 35 | env: 36 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 37 | run: | 38 | git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git dev-6.1.0 --force 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | 3 | sdk/include/aditof/version.h 4 | 5 | *deps/ 6 | *.temp/ 7 | .vscode/ 8 | .vs/ 9 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libaditof"] 2 | path = libaditof 3 | url = https://github.com/analogdevicesinc/libaditof.git 4 | branch = main 5 | [submodule "bindings/python/pybind11"] 6 | path = bindings/python/pybind11 7 | url = https://github.com/pybind/pybind11 8 | branch = v2.11 9 | [submodule "ToF-drivers"] 10 | path = ToF-drivers 11 | url = https://github.com/analogdevicesinc/ToF-drivers 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Analog Devices, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /apps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(apps) 3 | 4 | if (ON_TARGET AND WITH_PROTOBUF_DEPENDENCY) 5 | if (WITH_NETWORK) 6 | add_subdirectory(server) 7 | endif() 8 | endif() 9 | -------------------------------------------------------------------------------- /apps/server/README.md: -------------------------------------------------------------------------------- 1 | ## Network server 2 | 3 | With the help of this server, a remote client can have access over the network to the API of the ADI Time of Flight sensor. The server needs to run on the target where the sensor is installed. 4 | 5 | Limitations: 6 | - Only one client can be connected to the server at a time. 7 | - Server can't work properly if at the same time the uvc-gadget is started and engaged with a client over USB. 8 | 9 | ## How to use 10 | 11 | To start the server on the target run the following command: 12 | 13 | ./aditof-server 14 | -------------------------------------------------------------------------------- /bindings/open3D/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | # Install the helper header for open3d in include/aditof 4 | include(GNUInstallDirs) 5 | install(FILES 6 | ${CMAKE_CURRENT_SOURCE_DIR}/aditof_open3d.h 7 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/aditof 8 | ) 9 | 10 | if(WIN32) 11 | find_package(Open3D HINTS ${CMAKE_INSTALL_PREFIX}/CMake) 12 | else() 13 | find_package(Open3D HINTS ${CMAKE_INSTALL_PREFIX}/lib/CMake) 14 | list(APPEND Open3D_LIBRARIES dl) 15 | endif() 16 | 17 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Open3D_C_FLAGS}") 18 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Open3D_CXX_FLAGS}") 19 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${Open3D_EXE_LINKER_FLAGS}") 20 | 21 | # Set OS-specific things here 22 | if(WIN32) 23 | elseif(APPLE) 24 | elseif(UNIX) 25 | add_compile_options(-Wno-deprecated-declarations) 26 | add_compile_options(-Wno-unused-result) 27 | endif(WIN32) 28 | 29 | # Open3D 30 | if (Open3D_FOUND) 31 | message(STATUS "Found Open3D ${Open3D_VERSION}") 32 | 33 | # Hot fix windows dll not found issue, assumming we're using the Release build 34 | option(BUILD_SHARED_LIBS "Whether Open3D was build as shared library" OFF) 35 | if(WIN32 AND BUILD_SHARED_LIBS) 36 | message("Will copy Open3D.dll to ${CMAKE_CURRENT_BINARY_DIR}/Release") 37 | add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD 38 | COMMAND ${CMAKE_COMMAND} -E copy 39 | ${CMAKE_INSTALL_PREFIX}/bin/Open3D.dll 40 | ${CMAKE_CURRENT_BINARY_DIR}/Release) 41 | endif() 42 | 43 | else () 44 | message(SEND_ERROR "Open3D not found") 45 | endif () 46 | 47 | add_subdirectory(showPointCloud) 48 | 49 | -------------------------------------------------------------------------------- /bindings/open3D/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Open3D bindings 2 | 3 | ### Instalation 4 | If you build open3D from source, make sure to enable option `GLIBCXX_USE_CXX11_ABI` when running cmake. 5 | For example: 6 | ``` 7 | cmake -DGLIBCXX_USE_CXX11_ABI=ON 8 | ``` 9 | 10 | To install open3D go to: [Open3D](http://www.open3d.org/docs/release/compilation.html) 11 | 12 | When building the aditof project specify the cmake option -DWITH_OPEN3D=ON. 13 | Add the path to the Open3D installation folder in the cmake variable -DCMAKE_PREFIX_PATH=. 14 | 15 | #### Directory Structure 16 | 17 | | Directory/File | Description | 18 | | --------- | ----------- | 19 | | showPointCloud | Contains a basic example that displays a pointcloud build with data from aditof| 20 | | CMakeLists.txt | Rules to build the bindings and the examples | 21 | -------------------------------------------------------------------------------- /bindings/opencv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | find_package(OpenCV REQUIRED) 4 | 5 | # Install the helper header for opencv in include/aditof 6 | include(GNUInstallDirs) 7 | install(FILES 8 | ${CMAKE_CURRENT_SOURCE_DIR}/aditof_opencv.h 9 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/aditof 10 | ) 11 | 12 | if(OPENCV_FOUND OR 13 | OPENCV_CORE_FOUND) # we check for this because the OpenCVConfig.cmake(v2.4.9.1) used on dragonboards fails to set OPENCV_FOUND 14 | 15 | if(OpenCV_VERSION VERSION_LESS "3.0.0") 16 | message(STATUS "USING OPENCV Version 2") 17 | add_definitions(-DOPENCV2) 18 | else() 19 | message(STATUS "USING OPENCV Version 3") 20 | endif() 21 | endif() 22 | 23 | add_subdirectory(imshow) 24 | -------------------------------------------------------------------------------- /bindings/opencv/dnn/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | project(aditof-opencv-dnn) 4 | 5 | # Download MobileNetSSD_deploy prototxt and caffemodel 6 | set(PROTOTEXT_FILE "MobileNetSSD_deploy.prototxt") 7 | set(PROTOTEXT_URL "https://raw.githubusercontent.com/chuanqi305/MobileNet-SSD/f5d072ccc7e3dcddaa830e9805da4bf1000b2836/MobileNetSSD_deploy.prototxt") 8 | set(PROTOTEXT_PATH "${CMAKE_CURRENT_BINARY_DIR}/${PROTOTEXT_FILE}") 9 | 10 | set(MODEL_FILE "MobileNetSSD_deploy.caffemodel") 11 | set(MODEL_URL "https://drive.google.com/uc?export=download&id=0B3gersZ2cHIxRm5PMWRoTkdHdHc") 12 | set(MODEL_PATH "${CMAKE_CURRENT_BINARY_DIR}/${MODEL_FILE}") 13 | 14 | 15 | if(NOT EXISTS "${PROTOTEXT_PATH}") 16 | message("Downloading ${PROTOTEXT_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 17 | file(DOWNLOAD "${PROTOTEXT_URL}" "${PROTOTEXT_PATH}") 18 | endif() 19 | 20 | if(NOT EXISTS "${MODEL_PATH}") 21 | message("Downloading ${MODEL_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 22 | file(DOWNLOAD "${MODEL_URL}" "${MODEL_PATH}") 23 | endif() 24 | 25 | add_definitions( -DPROTOTXT="${PROTOTEXT_PATH}" ) 26 | add_definitions( -DMODEL="${MODEL_PATH}" ) 27 | 28 | add_executable(${PROJECT_NAME} main.cpp) 29 | 30 | set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) 31 | 32 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 33 | -------------------------------------------------------------------------------- /bindings/opencv/dnn/readme.md: -------------------------------------------------------------------------------- 1 | # DNN example 2 | 3 | ### Overview 4 | This example demonstrates object detection on the combination between depth and ab frames using the [SSD Mobilenet object detection example from OpenCV](https://github.com/opencv/opencv/blob/3.4.0/samples/dnn/ssd_mobilenet_object_detection.cpp) and the Aditof SDK. 5 | 6 | ![Display Image](../../../doc/img/dnn.png) 7 | -------------------------------------------------------------------------------- /bindings/opencv/imshow/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | project(aditof-opencv-imshow) 4 | 5 | add_executable(${PROJECT_NAME} main.cpp) 6 | 7 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14) 8 | 9 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 10 | 11 | # Copying config files and depth compute libraries 12 | add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD 13 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/../../../libaditof/sdk/src/cameras/itof-camera/config $/${CONFIG_DIR_NAME}/. 14 | COMMENT "Copying cfgs and libs to build examples " 15 | ) 16 | 17 | if( WIN32 ) 18 | # Copying the sdk binary 19 | add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD 20 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/libaditof/sdk/$" $/. 21 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/libaditof/sdk/$" $/../ 22 | ) 23 | endif() 24 | -------------------------------------------------------------------------------- /bindings/opencv/imshow/readme.md: -------------------------------------------------------------------------------- 1 | # Imshow example 2 | 3 | ### Overview 4 | This example demonstrates how to capture data from the TOF system and display it using OpenCV 5 | 6 | ![Display Image](../../../doc/img/imshow.png) 7 | 8 | The following code snippet is used to convert the `aditof::Frame` into a `cv::Mat` containing the depth information 9 | ```cpp 10 | /* Convert from frame to depth mat */ 11 | cv::Mat mat; 12 | status = fromFrameToDepthMat(frame, mat); 13 | if (status != Status::OK) { 14 | LOG(ERROR) << "Could not convert from frame to mat!"; 15 | return 0; 16 | } 17 | ``` 18 | The AB information can be stored in a Mat by using the `fromFrameToAbMat` function instead of `fromFrameToDepthMat` 19 | -------------------------------------------------------------------------------- /bindings/opencv/maskrcnn/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | project(aditof-opencv-maskrcnn) 4 | 5 | add_executable(${PROJECT_NAME} main.cpp) 6 | 7 | file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/mscoco_labels.names 8 | DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 9 | 10 | set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) 11 | 12 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof ${OpenCV_LIBS}) 13 | -------------------------------------------------------------------------------- /bindings/opencv/maskrcnn/mscoco_labels.names: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorcycle 5 | airplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | 13 | stop sign 14 | parking meter 15 | bench 16 | bird 17 | cat 18 | dog 19 | horse 20 | sheep 21 | cow 22 | elephant 23 | bear 24 | zebra 25 | giraffe 26 | 27 | backpack 28 | umbrella 29 | 30 | 31 | handbag 32 | tie 33 | suitcase 34 | frisbee 35 | skis 36 | snowboard 37 | sports ball 38 | kite 39 | baseball bat 40 | baseball glove 41 | skateboard 42 | surfboard 43 | tennis racket 44 | bottle 45 | 46 | wine glass 47 | cup 48 | fork 49 | knife 50 | spoon 51 | bowl 52 | banana 53 | apple 54 | sandwich 55 | orange 56 | broccoli 57 | carrot 58 | hot dog 59 | pizza 60 | donut 61 | cake 62 | chair 63 | couch 64 | potted plant 65 | bed 66 | 67 | dining table 68 | 69 | 70 | toilet 71 | 72 | tv 73 | laptop 74 | mouse 75 | remote 76 | keyboard 77 | cell phone 78 | microwave 79 | oven 80 | toaster 81 | sink 82 | refrigerator 83 | 84 | book 85 | clock 86 | vase 87 | scissors 88 | teddy bear 89 | hair drier 90 | toothbrush 91 | -------------------------------------------------------------------------------- /bindings/opencv/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : OpenCV bindings 2 | 3 | ### Overview 4 | The SDK provides bindings for OpenCV through the helper methods defined in aditof_opencv.h, which provide a way to convert from the `aditof::Frame` data structure to `cv::Mat`. 5 | 6 | ### OpenCV supported version 7 | For the dnn example, the minimum opencv version required is `3.4.1`. Other examples will work with older versions. 8 | 9 | #### Directory Structure 10 | 11 | | Directory/File | Description | 12 | | --------- | ----------- | 13 | | aditof_opencv.h | Contains the helper methods to convert from aditof::Frame to cv::Mat | 14 | | dnn | Contains a simple object detection example | 15 | | imshow | Contains a basic example that displays data provided by the Aditof SDK | 16 | | CMakeLists.txt | Rules to build the bindings and the examples | 17 | -------------------------------------------------------------------------------- /bindings/python/examples/data_collect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-data_collect) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/data_collect.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/dnn/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | project(aditof-python-dnn) 4 | 5 | # Download MobileNetSSD_deploy prototxt and caffemodel 6 | set(PROTOTEXT_FILE "MobileNetSSD_deploy.prototxt") 7 | set(PROTOTEXT_URL "https://raw.githubusercontent.com/djmv/MobilNet_SSD_opencv/master/MobileNetSSD_deploy.prototxt") 8 | set(PROTOTEXT_PATH "${CMAKE_CURRENT_BINARY_DIR}/${PROTOTEXT_FILE}") 9 | 10 | set(MODEL_FILE "MobileNetSSD_deploy.caffemodel") 11 | set(MODEL_URL "https://github.com/djmv/MobilNet_SSD_opencv/blob/master/MobileNetSSD_deploy.caffemodel?raw=true") 12 | set(MODEL_PATH "${CMAKE_CURRENT_BINARY_DIR}/${MODEL_FILE}") 13 | 14 | 15 | if(NOT EXISTS "${PROTOTEXT_PATH}") 16 | message("Downloading ${PROTOTEXT_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 17 | file(DOWNLOAD "${PROTOTEXT_URL}" "${PROTOTEXT_PATH}") 18 | endif() 19 | 20 | if(NOT EXISTS "${MODEL_PATH}") 21 | message("Downloading ${MODEL_FILE} into ${CMAKE_CURRENT_BINARY_DIR}") 22 | file(DOWNLOAD "${MODEL_URL}" "${MODEL_PATH}") 23 | endif() 24 | 25 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/dnn.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/dnn/readme.md: -------------------------------------------------------------------------------- 1 | # DNN Example 2 | 3 | ### Overview 4 | This example demonstrates object detection on a combination between the depth frame and the AB frame using the SSD Mobilenet object detection example from OpenCV and the Aditof SDK. It also shows how to compute and display the AB frame. 5 | 6 | It works with model taken from [MobileNet-SSD](https://github.com/djmv/MobilNet_SSD_opencv). 7 | Building the project with CMake will download prototxt and caffemodel, used for object detection. 8 | 9 | For running the python program use: 10 | ```console 11 | python dnn.py --prototxt \pathTo\MobileNetSSD_deploy.prototxt --weights \pathTo\MobileNetSSD_deploy.caffemodel --ip 10.43.0.1 12 | ``` 13 | 14 | Press q to quit the application. 15 | 16 | ![Display Image](../../../../doc/img/dnn_python.PNG) 17 | 18 | ### Python Dependencies 19 | 20 | * pip install keyboard 21 | * pip install opencv-python 22 | * pip install numpy 23 | -------------------------------------------------------------------------------- /bindings/python/examples/dual_cameras/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-dual_cameras) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/dual_cameras.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/first_frame/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-first_frame) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/first_frame.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/gesture_rec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-gesture_rec) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/process.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") 6 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/notebook.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/gesture_rec/install_deps.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | sudo apt-get install -y python3-tk 5 | sudo apt-get install -y python3-matplotlib 6 | sudo apt-get install -y python3-skimage 7 | sudo apt-get install -y python3-pil.imagetk 8 | sudo apt-get install -y python3-pil 9 | -------------------------------------------------------------------------------- /bindings/python/examples/gesture_rec/readme.md: -------------------------------------------------------------------------------- 1 | # Gesture recognition example 2 | 3 | ### Overview 4 | This example is intended to present the gesture recognition for the Rock-Paper-Scissor game. 5 | 6 | ### Dependencies 7 | In order to install dependencies, use: 8 | ```console 9 | bash install_deps.sh 10 | ``` 11 | 12 | ### Demo 13 | In the application one must choose the appropriate sensor type together with the mode they are using. After which the Initialization has to be sent. When everything is initialized the stream can be started with the Start stream button. -------------------------------------------------------------------------------- /bindings/python/examples/maskr_cnn/object_detection_classes_coco.txt: -------------------------------------------------------------------------------- 1 | person 2 | bicycle 3 | car 4 | motorcycle 5 | airplane 6 | bus 7 | train 8 | truck 9 | boat 10 | traffic light 11 | fire hydrant 12 | street sign 13 | stop sign 14 | parking meter 15 | bench 16 | bird 17 | cat 18 | dog 19 | horse 20 | sheep 21 | cow 22 | elephant 23 | bear 24 | zebra 25 | giraffe 26 | hat 27 | backpack 28 | umbrella 29 | shoe 30 | eye glasses 31 | handbag 32 | tie 33 | suitcase 34 | frisbee 35 | skis 36 | snowboard 37 | sports ball 38 | kite 39 | baseball bat 40 | baseball glove 41 | skateboard 42 | surfboard 43 | tennis racket 44 | bottle 45 | plate 46 | wine glass 47 | cup 48 | fork 49 | knife 50 | spoon 51 | bowl 52 | banana 53 | apple 54 | sandwich 55 | orange 56 | broccoli 57 | carrot 58 | hot dog 59 | pizza 60 | donut 61 | cake 62 | chair 63 | couch 64 | potted plant 65 | bed 66 | mirror 67 | dining table 68 | window 69 | desk 70 | toilet 71 | door 72 | tv 73 | laptop 74 | mouse 75 | remote 76 | keyboard 77 | cell phone 78 | microwave 79 | oven 80 | toaster 81 | sink 82 | refrigerator 83 | blender 84 | book 85 | clock 86 | vase 87 | scissors 88 | teddy bear 89 | hair drier 90 | toothbrush 91 | -------------------------------------------------------------------------------- /bindings/python/examples/maskr_cnn/readme.md: -------------------------------------------------------------------------------- 1 | # MaskR-CNN Example (DEPRECATED) 2 | 3 | ### Overview 4 | This example demonstrates object detection on a combination between the depth frame and the AB frame using the MaskR-CNN object detection example from OpenCV and the adiTOF SDK. 5 | 6 | This example needs access to 3 configuration files: COCO object class LABELS and two TENSORFLOW model configuration files, based on COCO datase. 7 | 8 | We tested the example using the following cofiguration files: **object_detection_classes_coco.txt**, **frozen_inference_graph.pb and mask_rcnn_inception_v2_coco_2018_01_28.pbtxt**. 9 | 10 | To get TENSORFLOW model configuration files (**frozen_inference_graph.pb and mask_rcnn_inception_v2_coco_2018_01_28.pbtxt**) choose between the following two methods: 11 | * use the following script: 12 | (**https://github.com/opencv/opencv_extra/blob/master/testdata/dnn/download_models.py**). 13 | * download one of the archives from the link below and get the *.pb* and *.pbtxt* files from that archive. 14 | (**https://github.com/tensorflow/models/blob/v1.13.0/research/object_detection/g3doc/detection_model_zoo.md**) 15 | 16 | For running the python program use: 17 | ```console 18 | python maskr_cnn.py --model local_path\ToF\bindings\python\examples\maskr_cnn\frozen_inference_graph.pb --config local_path\ToF\bindings\python\examples\maskr_cnn\mask_rcnn_inception_v2_coco_2018_01_28.pbtxt --classes local_path\ToF\bindings\python\examples\maskr_cnn\object_detection_classes_coco.txt 19 | ``` 20 | 21 | ![Display Image](/doc/img/maskrcnn_python.png) 22 | -------------------------------------------------------------------------------- /bindings/python/examples/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Python examples 2 | 3 | ### Overview 4 | The examples in this directory provide sample Python applications to demonstrate how 3D TOF camera can be used. 5 | 6 | 7 | #### Directory Structure 8 | 9 | | Directory/File | Description | 10 | | --------- | ----------- | 11 | | first_frame | Python example to capture a frame | 12 | | dnn | Simple object detection example in Python | 13 | | showPointCloud | Simple Python example of using Open3D to create and show a pointcloud from aditof frames | 14 | | streaming | Use PyGame to show depth frames in real-time | -------------------------------------------------------------------------------- /bindings/python/examples/saveCCBToFile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-saveCCBToFile) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/saveCCBToFile.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/saveCCBToFile/readme.md: -------------------------------------------------------------------------------- 1 | # First frame Example 2 | 3 | ### Overview 4 | This tool saves the CCB of the imager's module to a file. 5 | 6 | Usage: 7 | - make sure that the hardware is connected to PC 8 | - run `python saveCCBToFile.py [IP ADDRESS of module connected]` 9 | 10 | Example: 11 | ``` 12 | python saveCCBToFile.py 10.43.0.1 13 | ``` 14 | -------------------------------------------------------------------------------- /bindings/python/examples/showPointCloud/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-showPointCloud) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/showPointCloud.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/skeletal_tracking/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-skeletal-tracking) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/skeletal_tracking.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/skeletal_tracking/readme.md: -------------------------------------------------------------------------------- 1 | # Skeletal Tracking Example 2 | 3 | ### Overview 4 | This example demonstrates how skeletal tracking of a person can be done with the Aditof SDK using NXP Eval Kit. This example uses MediaPipe Pose detection model to perform the skeletal tracking. 5 | 6 | For running the python program use: 7 | ```console 8 | python skeletal_tracking.py 9 | ``` 10 | ![Display Image](https://github.com/analogdevicesinc/ToF/blob/main/doc/img/skeletal_tracking_python.png) 11 | 12 | ### Python Dependencies 13 | 14 | ```python 15 | pip install mediapipe 16 | pip install opencv-python 17 | pip install numpy 18 | ``` -------------------------------------------------------------------------------- /bindings/python/examples/skeletal_tracking_in_pointcloud/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-skeletal-tracking) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/skeletal_tracking_in_pointcloud.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/examples/skeletal_tracking_in_pointcloud/readme.md: -------------------------------------------------------------------------------- 1 | # Skeletal Tracking in Point Cloud Example 2 | 3 | ### Overview 4 | This example demonstrates skeletal tracking of a person in a 3D pointcloud generated by the NXP Eval kit. This example uses MediaPipe Pose detection model to perform the skeletal tracking and Open3D package to visualize the 3D pointcloud. 5 | 6 | For running the python program use: 7 | ```console 8 | python skeletal_tracking_in_pointcloud.py 9 | ``` 10 | ![Display Image](https://github.com/analogdevicesinc/ToF/blob/main/doc/img/skeletal_tracking_in_pointcloud_python.png) 11 | 12 | ### Python Dependencies 13 | 14 | ```python 15 | pip install mediapipe 16 | pip install open3d 17 | pip install opencv-python 18 | pip install numpy 19 | ``` 20 | -------------------------------------------------------------------------------- /bindings/python/examples/streaming/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project(aditof-python-streaming) 4 | 5 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/depth-image-animation-pygame.py" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -------------------------------------------------------------------------------- /bindings/python/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Python bindings 2 | 3 | ### Overview 4 | The SDK provides bindings for Python using [pybind11](https://github.com/pybind/pybind11). 5 | 6 | To use the bindings for a Python project, just import the library: 7 | ```python 8 | import aditofpython as tof 9 | ``` 10 | 11 | #### Directory Structure 12 | 13 | | Directory/File | Description | 14 | | --------- | ----------- | 15 | | cmake | Contains the cmake files to find pybind11 | 16 | | pybind11 | Pybind11 header only library | 17 | | CMakeLists.txt | Rules to build the Python bindings | 18 | | examples | Python examples | 19 | -------------------------------------------------------------------------------- /bindings/ros2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | 3 | if(UNIX) 4 | 5 | # set variables 6 | set(COLCON_WS "${CMAKE_BINARY_DIR}/ros2_ws") 7 | set(ROS2_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 8 | 9 | # create and run ROS setup script 10 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ros2_setup.bash 11 | ${CMAKE_BINARY_DIR}/tmp/ros2_setup.bash) 12 | file( 13 | COPY ${CMAKE_BINARY_DIR}/tmp/ros2_setup.bash 14 | DESTINATION ${CMAKE_BINARY_DIR} 15 | FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) 16 | 17 | add_custom_target(tof_ros2_package) 18 | string(CONCAT OLD_CMAKE_INSTALL_PREFIX "\"${CMAKE_INSTALL_PREFIX}\"") 19 | string(CONCAT OLD_CMAKE_PREFIX_PATH "\"${CMAKE_PREFIX_PATH}\"") 20 | 21 | if("${ROS_HOME_DIR}" STREQUAL "") 22 | message(FATAL_ERROR "No ROS2_HOME_DIR provided!") 23 | else() 24 | file(COPY ${CMAKE_BINARY_DIR}/../sdk/src/cameras/itof-camera/config DESTINATION "${ROS_HOME_DIR}") 25 | endif() 26 | 27 | if (${USE_DEPTH_COMPUTE_STUBS}) 28 | add_custom_command( 29 | TARGET tof_ros2_package 30 | COMMAND ${CMAKE_BINARY_DIR}/ros2_setup.bash "${OLD_CMAKE_INSTALL_PREFIX}" 31 | "${OLD_CMAKE_PREFIX_PATH}" "-" ${VERSION} DEPENDS aditof) 32 | else() 33 | add_custom_command( 34 | TARGET tof_ros2_package 35 | COMMAND ${CMAKE_BINARY_DIR}/ros2_setup.bash "${OLD_CMAKE_INSTALL_PREFIX}" 36 | "${OLD_CMAKE_PREFIX_PATH}" "${LIBTOFI_LIBDIR_PATH}" ${VERSION} DEPENDS aditof) 37 | endif() 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /bindings/ros2/doc/tof-ros2-nativ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/bindings/ros2/doc/tof-ros2-nativ.png -------------------------------------------------------------------------------- /bindings/ros2/doc/tof-ros2-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/bindings/ros2/doc/tof-ros2-network.png -------------------------------------------------------------------------------- /bindings/ros2/ros2_setup.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DISTRO_CODENAME=$( (lsb_release -sc || . /etc/os-release; echo ${VERSION_CODENAME} ) 2>/dev/null) 4 | 5 | #determine ROS distribution 6 | if [ $DISTRO_CODENAME = "bionic" ] 7 | then 8 | ROS_DISTRO="crystal" 9 | # echo crystal 10 | elif [ $DISTRO_CODENAME = "focal" ] 11 | then 12 | ROS_DISTRO="foxy" 13 | # echo foxy 14 | elif [ $DISTRO_CODENAME = "buster" ] 15 | then 16 | ROS_DISTRO="humble" 17 | # echo humble 18 | elif [ $DISTRO_CODENAME = "jammy" ] 19 | then 20 | ROS_DISTRO="humble" 21 | # echo humble 22 | fi 23 | 24 | mkdir -p ${COLCON_WS}/src 25 | cd ${COLCON_WS}/src 26 | git clone https://github.com/analogdevicesinc/tof-ros2.git 27 | 28 | cd ${COLCON_WS} 29 | source /opt/ros/$ROS_DISTRO/setup.sh 30 | 31 | colcon build --cmake-args -DADITOF_CMAKE_INSTALL_PREFIX=$1 -DADITOF_CMAKE_PREFIX_PATH=$2 -DLIBTOFI_LIBDIR_PATH=$3 -------------------------------------------------------------------------------- /ci/azure/build_docker_image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build the given dockerfile with the given name 4 | 5 | . ci/azure/lib.sh 6 | 7 | mkdir -p temp_deps 8 | 9 | get_deps_source_code temp_deps 10 | 11 | dockername=$1 12 | dockerfilepath=$2 13 | 14 | docker build -t ${dockername} -f ${dockerfilepath} . 15 | 16 | rm -rf temp_deps 17 | -------------------------------------------------------------------------------- /ci/azure/deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | . ci/azure/lib.sh 6 | 7 | 8 | deps_default() { 9 | sudo apt-get update 10 | mkdir -p ${DEPS_DIR} 11 | 12 | pushd ${BUILD_DIR} 13 | 14 | get_deps_source_code "${DEPS_DIR}" 15 | # build_and_install_glog "${DEPS_DIR}/glog" "${DEPS_DIR}/installed/glog" 16 | # build_and_install_protobuf "${DEPS_DIR}/protobuf" "${DEPS_DIR}/installed/protobuf" 17 | # build_and_install_libzmq "${DEPS_DIR}/libzmq" "${DEPS_DIR}/installed/libzmq" 18 | # build_and_install_cppzmq "${DEPS_DIR}/cppzmq" "${DEPS_DIR}/installed/libzmq" 19 | # build_and_install_opencv "${DEPS_DIR}/opencv-${OPENCV}" "${DEPS_DIR}/installed/opencv" 20 | 21 | if [[ ${CMAKE_OPTIONS} == *"WITH_OPEN3D=on"* ]]; then 22 | build_and_install_open3d "${DEPS_DIR}/Open3D" "${DEPS_DIR}/installed/Open3D" 23 | fi 24 | 25 | popd 26 | } 27 | 28 | deps_cppcheck() { 29 | sudo apt-get install cppcheck 30 | echo_green "Cppcheck version: " `cppcheck --version` 31 | cppcheck --version 32 | } 33 | 34 | deps_clang_format() { 35 | sudo apt-get install clang-format 36 | echo_green "Clang-format version: " `/usr/bin/clang-format --version` 37 | } 38 | 39 | deps_deploy_doxygen() { 40 | install_doxygen 41 | echo_green "Doxygen version: " `doxygen --version` 42 | } 43 | 44 | deps_${BUILD_TYPE:-default} 45 | -------------------------------------------------------------------------------- /ci/azure/imx8-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM arm64v8/ubuntu:20.04 2 | 3 | RUN mkdir -p aditof-deps 4 | WORKDIR aditof-deps 5 | 6 | ENV TZ=Asia/Dubai 7 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 8 | 9 | COPY ci/azure/lib.sh /aditof-deps 10 | COPY ci/azure/setup_docker.sh /aditof-deps 11 | ADD temp_deps/ /aditof-deps 12 | 13 | RUN apt update 14 | RUN apt install -y sudo 15 | 16 | RUN sudo apt install -y build-essential cmake python2-dev python3-dev libssl-dev git libopencv-contrib-dev libopencv-dev libgl1-mesa-dev libglfw3-dev 17 | 18 | RUN chmod +x ./setup_docker.sh 19 | RUN ./setup_docker.sh 20 | -------------------------------------------------------------------------------- /ci/azure/inside_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | git config --global --add safe.directory /ToF/libaditof 4 | git config --global --add safe.directory /ToF/libaditof/glog 5 | git config --global --add safe.directory /ToF/libaditof/protobuf 6 | git config --global --add safe.directory /ToF/libaditof/libzmq 7 | git config --global --add safe.directory /ToF/libaditof/cppzmq 8 | 9 | project_dir=$1 10 | pushd ${project_dir} 11 | 12 | GLOG_INSTALL_DIR="/aditof-deps/installed/glog" 13 | PROTOBUF_INSTALL_DIR="/aditof-deps/installed/protobuf" 14 | OPENCV_INSTALL_DIR="/aditof-deps/installed/opencv" 15 | LIBZMQ_INSTALL_DIR="/aditof-deps/installed/libzmq" 16 | NUM_JOBS=4 17 | ARGS="$2" 18 | 19 | mkdir -p build 20 | mkdir ../libs 21 | 22 | pushd build 23 | cmake .. ${ARGS} -DCMAKE_PREFIX_PATH="${GLOG_INSTALL_DIR};${PROTOBUF_INSTALL_DIR};${LIBZMQ_INSTALL_DIR};${OPENCV_INSTALL_DIR}" -DWITH_OPENCV=0 24 | make -j${NUM_JOBS} 25 | popd #build 26 | 27 | popd # ${project_dir} 28 | -------------------------------------------------------------------------------- /ci/azure/nvidia-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvcr.io/nvidia/l4t-base:r35.2.0 2 | # LABEL io.balena.architecture="aarch64" 3 | 4 | # LABEL io.balena.qemu.version="5.2.0+balena-aarch64" 5 | # COPY qemu-aarch64-static /usr/bin 6 | 7 | RUN mkdir -p aditof-deps 8 | WORKDIR aditof-deps 9 | 10 | COPY ci/azure/lib.sh /aditof-deps 11 | COPY ci/azure/setup_docker.sh /aditof-deps 12 | ADD temp_deps/ /aditof-deps 13 | 14 | RUN apt update 15 | RUN apt install -y sudo 16 | 17 | RUN sudo apt install -y build-essential cmake python-dev python3-dev \ 18 | libssl-dev git libgl1-mesa-dev libglfw3-dev 19 | 20 | RUN chmod +x ./setup_docker.sh 21 | RUN ./setup_docker.sh 22 | -------------------------------------------------------------------------------- /ci/azure/readme.md: -------------------------------------------------------------------------------- 1 | # Useful scripts 2 | * Building cross platform docker images with limited memory usage: 3 | ```console 4 | sudo docker buildx build -m 2g --output=type=docker --memory-swap 5 | 2g -t --platform linux/arm64/v8 . 6 | ``` 7 | 8 | * Run interactive mode for cross platform docker images 9 | ```console 10 | sudo docker run -v /bin/qemu-aarch64-static:/usr/bin/qemu-aarch64- 11 | static --platform linux/arm64/v8 -it bash 12 | ``` 13 | 14 | * Tag images 15 | ```console 16 | docker image tag 17 | ``` 18 | 19 | -------------------------------------------------------------------------------- /ci/azure/run_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | . ci/azure/lib.sh 6 | 7 | 8 | build_default() { 9 | 10 | # setup more deps 11 | # TODO cache this 12 | sudo apt-get update 13 | sudo apt-get install -y build-essential libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libgl1-mesa-dev libglfw3-dev libopencv-dev 14 | 15 | sudo sh -c 'echo "${DEPS_DIR}/installed/opencv/lib" > /etc/ld.so.conf.d/opencv.conf' 16 | sudo ldconfig 17 | 18 | # setup compiler 19 | if [[ "${COMPILER_CXX}" != "" ]]; then export CXX=${COMPILER_CXX}; fi 20 | if [[ "${COMPILER_CC}" != "" ]]; then export CC=${COMPILER_CC}; fi 21 | 22 | mkdir -p ${BUILD_DIR} 23 | mkdir ../libs 24 | 25 | pushd ${BUILD_DIR} 26 | pwd 27 | cmake ${DEFAULT_CMAKE_FLAGS} ${EXTRA_CMAKE_FLAGS} -DCMAKE_PREFIX_PATH="${DEPS_DIR}/installed/glog;${DEPS_DIR}/installed/protobuf;${DEPS_DIR}/installed/libzmq;${DEPS_DIR}/installed/Open3D;${DEPS_DIR}/installed/opencv" .. 28 | make -j${NUM_JOBS} 29 | popd 30 | } 31 | 32 | build_cppcheck() { 33 | check_cppcheck 34 | } 35 | 36 | build_clang_format() { 37 | check_clangformat 38 | } 39 | 40 | build_deploy_doxygen() { 41 | mkdir -p "${WORK_DIR}/doc" 42 | pushd "${WORK_DIR}/doc" 43 | mkdir build && cd build && cmake .. 44 | check_doxygen 45 | popd 46 | 47 | deploy_doxygen 48 | } 49 | 50 | build_docker() { 51 | run_docker ${DOCKER} /ToF/ci/azure/inside_docker.sh "${DEFAULT_CMAKE_FLAGS} ${EXTRA_CMAKE_FLAGS}" 52 | } 53 | 54 | if [[ "${DOCKER}" != "" ]]; then export BUILD_TYPE="docker"; fi 55 | 56 | build_${BUILD_TYPE:-default} 57 | -------------------------------------------------------------------------------- /ci/azure/setup_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script will install glog, libprotobuf, libzmq and cppzmq in an aditof-deps 4 | # folder inside a docker 5 | 6 | . lib.sh 7 | 8 | GLOG_INSTALL_DIR="$PWD/installed/glog" 9 | PROTOBUF_INSTALL_DIR="$PWD/installed/protobuf" 10 | LIBZMQ_INSTALL_DIR="$PWD/installed/libzmq" 11 | OPENCV_INSTALL_DIR="$PWD/installed/opencv" 12 | 13 | if [[ "${OPENCV}" == "" ]]; then 14 | export OPENCV="3.4.1" 15 | fi 16 | 17 | build_and_install_opencv "opencv-${OPENCV}" ${OPENCV_INSTALL_DIR} 18 | build_and_install_glog "glog" ${GLOG_INSTALL_DIR} 19 | build_and_install_protobuf "protobuf" ${PROTOBUF_INSTALL_DIR} 20 | build_and_install_libzmq "libzmq" ${LIBZMQ_INSTALL_DIR} 21 | build_and_install_cppzmq "cppzmq" "libzmq" 22 | -------------------------------------------------------------------------------- /ci/azure/setup_paths.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | #we need to export all those variables from a script because of pwd 6 | setup_absolute_paths() { 7 | export WORK_DIR=$(pwd) 8 | export BUILD_DIR="${WORK_DIR}/build" 9 | export DEPS_DIR="${BUILD_DIR}/deps" 10 | } 11 | 12 | setup_absolute_paths -------------------------------------------------------------------------------- /ci/azure/windows-build/build_sdk.ps1: -------------------------------------------------------------------------------- 1 | #install OpenCV 2 | choco install opencv --version 3.4.1 3 | 4 | #build sdk 5 | mkdir build_Release 6 | mkdir build_Debug 7 | mkdir ../libs 8 | 9 | cd build_Release 10 | cmake -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="../deps_installed/Release/glog;../deps_installed/Release/protobuf;../deps_installed/Release/libzmq;../deps_installed/Release/cppzmq" -DOpenCV_DIR="C:/tools/opencv/build/x64/vc15/lib" .. 11 | cmake --build . --target install --config Release -j 4 12 | 13 | cd ../build_Debug 14 | cmake -DWITH_OPENCV=on -DWITH_PYTHON=on -DCMAKE_PREFIX_PATH="../deps_installed/Debug/glog;../deps_installed/Debug/protobuf;../deps_installed/Debug/libzmq;../deps_installed/Debug/cppzmq" -DOpenCV_DIR="C:/tools/opencv/build/x64/vc15/lib" .. 15 | cmake --build . --target install --config Debug -j 4 16 | 17 | -------------------------------------------------------------------------------- /cmake/aditof-config.cmake.in: -------------------------------------------------------------------------------- 1 | get_filename_component(aditof_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 2 | 3 | set(aditof_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS@") 4 | set(WITH_NETWORK "@WITH_NETWORK@") 5 | 6 | if (NOT glog_FOUND) 7 | find_package(glog 0.3.5 REQUIRED) 8 | endif() 9 | 10 | if (WITH_NETWORK) 11 | if (NOT Protobuf_FOUND) 12 | find_package(Protobuf 3.9.0 REQUIRED) 13 | endif() 14 | if (NOT Libwebsockets_FOUND) 15 | find_package(Libwebsockets REQUIRED) 16 | endif() 17 | endif() 18 | if (NOT TARGET aditof::aditof) 19 | include("${aditof_CMAKE_DIR}/aditof-targets.cmake") 20 | endif() 21 | 22 | set(aditof_LIBRARIES aditof::aditof) 23 | -------------------------------------------------------------------------------- /cmake/setup.py.cmakein: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | from distutils.core import setup, Extension 3 | 4 | import sys 5 | if sys.version_info < (3,0): 6 | sys.exit('Minimum Python is 3.0') 7 | 8 | setup (name = 'aditofpython', 9 | version = '${VERSION}', 10 | author = "Analog Devices, Inc", 11 | description = "Python bindings for the 3D ToF SDK", 12 | packages = [ '' ], 13 | package_dir = { 14 | '': '${CMAKE_CURRENT_BINARY_DIR}' 15 | }, 16 | package_data = { 17 | '': ['${TARGET_OUTPUT_NAME}'] 18 | } 19 | ) 20 | -------------------------------------------------------------------------------- /dependencies/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(dependecies) 3 | 4 | add_subdirectory(adi/command_parser) 5 | add_subdirectory(third-party/c_json) 6 | add_subdirectory(third-party/crc32) 7 | if (WITH_EXAMPLES AND NOT NXP) 8 | add_subdirectory(third-party/imgui) 9 | endif() -------------------------------------------------------------------------------- /dependencies/adi/command_parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(command_parser) 3 | 4 | add_library(${PROJECT_NAME} STATIC 5 | command_parser.cpp 6 | ) 7 | 8 | target_include_directories(${PROJECT_NAME} 9 | PUBLIC 10 | $ 11 | $ 12 | PRIVATE 13 | . 14 | ) -------------------------------------------------------------------------------- /dependencies/adi/command_parser/README.md: -------------------------------------------------------------------------------- 1 | # Command Parser 2 | 3 | ## Overview 4 | This library provides a robust and easily customizable method of configuring, reading and checking arguments used in the command line for any application. 5 | 6 | ## How to create a configuration 7 | In order to make a configuration simply create a **map** and populate it with the desired argumets for your specific application. The key of the map is the short version of an argument (denoted by "-"). 8 | 9 | The struct has the following possible options: 10 | * **string long_option** (long version of an argument, denoted by "--"). 11 | * **bool is_mandatory** (determines if the argument needs to be used in every run). 12 | * **string position** (determines if the argument needs to be in a specific location). 13 | * **string value** (is used to hold a default value or to hold a value used in command line). 14 | This struct can be easily expanded in order to fit the need of an application. 15 | 16 | ## Methods of the library 17 | **parseArguments**: 18 | * Read the arguments provided alongside with the value in a **vector>**. 19 | 20 | **checkArgumentsExist**: 21 | * Search if any arguemnts used are present in the configuration map. 22 | * If arguments doesn't exist, will return an error. 23 | 24 | **helpMenu**: 25 | * Check if help has been called. 26 | * Returns error is help is missused. 27 | 28 | **checkValue**: 29 | * Send the values provided from the configuration to the map. 30 | * Checks if default or value were provided. 31 | 32 | **checkMandatoryArguments**: 33 | * Check if all mandatory arguments have been provided. 34 | 35 | **checkMandatoryPosition**: 36 | * Check if all mandatory arguments are placed in the correct location. -------------------------------------------------------------------------------- /dependencies/third-party/c_json/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(cjson) 3 | 4 | add_library(${PROJECT_NAME} STATIC 5 | cJSON.c 6 | ) 7 | 8 | target_include_directories(${PROJECT_NAME} 9 | PUBLIC 10 | $ 11 | $ 12 | PRIVATE 13 | . 14 | ) -------------------------------------------------------------------------------- /dependencies/third-party/crc32/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(crc32) 3 | 4 | add_library(${PROJECT_NAME} STATIC 5 | crc.c 6 | ) 7 | 8 | if (NOT WIN32) 9 | set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) 10 | endif() 11 | 12 | target_include_directories(${PROJECT_NAME} 13 | PUBLIC 14 | $ 15 | $ 16 | PRIVATE 17 | . 18 | ) 19 | -------------------------------------------------------------------------------- /dependencies/third-party/crc32/crc.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2000 by Michael Barr. This software is placed into 3 | // the public domain and may be used for any purpose. However, this 4 | // notice must not be changed or removed and no warranty is either 5 | // expressed or implied by its publication or distribution. 6 | // https://barrgroup.com/downloads/code-crc-c 7 | // 8 | // Portions Copyright (c) 2020 Analog Devices, Inc. 9 | 10 | #ifndef _CRC_H_ 11 | #define _CRC_H_ 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif /* __cplusplus */ 15 | 16 | #include 17 | #include 18 | 19 | //Calculates a CRC of a block of memory using same algorithm as in the fuse table. 20 | uint32_t crcFast(uint8_t const message[], int nBytes, bool isMirrored); 21 | uint8_t reflect(uint8_t data, unsigned char nBits); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif /* __cplusplus */ 26 | #endif //_CRC_H_ -------------------------------------------------------------------------------- /dependencies/third-party/imgui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT TARGET imgui) 2 | set(imguiextern_SOURCE_DIR src) 3 | add_library(imgui STATIC 4 | ${imguiextern_SOURCE_DIR}/imgui.cpp 5 | ${imguiextern_SOURCE_DIR}/imgui_demo.cpp 6 | ${imguiextern_SOURCE_DIR}/imgui_draw.cpp 7 | ${imguiextern_SOURCE_DIR}/imgui_widgets.cpp 8 | ${imguiextern_SOURCE_DIR}/examples/imgui_impl_glfw.cpp 9 | ${imguiextern_SOURCE_DIR}/examples/imgui_impl_opengl3.cpp 10 | ${imguiextern_SOURCE_DIR}/examples/libs/gl3w/GL/gl3w.c 11 | ) 12 | 13 | target_include_directories(imgui PUBLIC 14 | ${imguiextern_SOURCE_DIR} 15 | ${imguiextern_SOURCE_DIR}/examples 16 | ${imguiextern_SOURCE_DIR}/examples/libs/gl3w 17 | ${imguiextern_SOURCE_DIR}/examples/libs/glfw/include 18 | ) 19 | else() 20 | message(STATUS "imgui is already a target. Skipping adding it twice") 21 | endif() 22 | 23 | add_library(imgui::imgui ALIAS imgui) 24 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Default settings: 7 | # Use 4 spaces as indentation 8 | [*] 9 | indent_style = space 10 | indent_size = 4 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | [imstb_*] 15 | indent_size = 3 16 | trim_trailing_whitespace = false 17 | 18 | [Makefile] 19 | indent_style = tab 20 | indent_size = 4 21 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.c text 4 | *.cpp text 5 | *.h text 6 | *.m text 7 | *.mm text 8 | *.md text 9 | *.txt text 10 | *.html text 11 | *.bat text 12 | *.frag text 13 | *.vert text 14 | *.mkb text 15 | *.icf text 16 | 17 | *.sln text eol=crlf 18 | *.vcxproj text eol=crlf 19 | *.vcxproj.filters text eol=crlf 20 | *.natvis text eol=crlf 21 | 22 | Makefile text eol=lf 23 | *.sh text eol=lf 24 | *.pbxproj text eol=lf 25 | *.storyboard text eol=lf 26 | *.plist text eol=lf 27 | 28 | *.png binary 29 | *.ttf binary 30 | *.lib binary 31 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | (Click "Preview" to turn any http URL into a clickable link) 2 | 3 | PLEASE CAREFULLY READ: 4 | https://github.com/ocornut/imgui/issues/2261 5 | 6 | (Clear this template before submitting your PR) 7 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2020 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | */Debug/* 3 | */Release/* 4 | */x64/* 5 | *.o 6 | *.obj 7 | *.exe 8 | 9 | ## Visual Studio cruft 10 | .vs/* 11 | */ipch/* 12 | *.opensdf 13 | *.log 14 | *.pdb 15 | *.ilk 16 | *.user 17 | *.sdf 18 | *.suo 19 | *.VC.db 20 | *.VC.VC.opendb 21 | 22 | ## Xcode cruft 23 | .DS_Store 24 | project.xcworkspace 25 | xcuserdata 26 | 27 | ## Emscripten output 28 | *.o.tmp 29 | *.out.js 30 | *.out.wasm 31 | example_emscripten/example_emscripten.* 32 | 33 | ## Unix executables 34 | example_glfw_opengl2/example_glfw_opengl2 35 | example_glfw_opengl3/example_glfw_opengl3 36 | example_glut_opengl2/example_glut_opengl2 37 | example_null/example_null 38 | example_sdl_opengl2/example_sdl_opengl2 39 | example_sdl_opengl3/example_sdl_opengl3 40 | 41 | ## Dear ImGui Ini files 42 | imgui.ini 43 | 44 | ## JetBrains IDEs 45 | .idea 46 | cmake-build-* 47 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_allegro5/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Configuration 3 | 4 | Dear ImGui outputs 16-bit vertex indices by default. 5 | Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile dear imgui with 32-bit indices. 6 | You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename. 7 | We are providing `imconfig_allegro5.h` that enables 32-bit indices. 8 | Note that the back-end supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion. 9 | 10 | # How to Build 11 | 12 | ### On Ubuntu 14.04+ and macOS 13 | 14 | ```bash 15 | g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ../imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_main -lallegro_primitives -o allegro5_example 16 | ``` 17 | 18 | On macOS, install Allegro with homebrew: `brew install allegro`. 19 | 20 | ### On Windows with Visual Studio's CLI 21 | 22 | You may install Allegro using vcpkg: 23 | ``` 24 | git clone https://github.com/Microsoft/vcpkg 25 | cd vcpkg 26 | .\bootstrap-vcpkg.bat 27 | .\vcpkg install allegro5 28 | .\vcpkg integrate install ; optional, automatically register include/libs in Visual Studio 29 | ``` 30 | 31 | Build: 32 | ``` 33 | set ALLEGRODIR=path_to_your_allegro5_folder 34 | cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib 35 | ``` 36 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_allegro5/imconfig_allegro5.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE 3 | // See imconfig.h for the full template 4 | // Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices 5 | //----------------------------------------------------------------------------- 6 | 7 | #pragma once 8 | 9 | // Use 32-bit vertex indices because Allegro doesn't support 16-bit ones 10 | // This allows us to avoid converting vertices format at runtime 11 | #define ImDrawIdx int 12 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/README.md: -------------------------------------------------------------------------------- 1 | # iOS / OSX Metal example 2 | 3 | ## Introduction 4 | 5 | This example shows how to integrate Dear ImGui with Metal. It is based on the "cross-platform" game template provided with Xcode as of Xcode 9. 6 | 7 | (NB: you may still want to use GLFW or SDL which will also support Windows, Linux along with OSX.) 8 | 9 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/Shared/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | 5 | #import 6 | 7 | @interface AppDelegate : UIResponder 8 | @property (strong, nonatomic) UIWindow *window; 9 | @end 10 | 11 | #else 12 | 13 | #import 14 | 15 | @interface AppDelegate : NSObject 16 | @end 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/Shared/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | @implementation AppDelegate 4 | 5 | #if TARGET_OS_OSX 6 | - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { 7 | return YES; 8 | } 9 | #endif 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/Shared/Renderer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Renderer : NSObject 4 | 5 | -(nonnull instancetype)initWithView:(nonnull MTKView *)view; 6 | 7 | @end 8 | 9 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/Shared/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "Renderer.h" 4 | 5 | #if TARGET_OS_IPHONE 6 | 7 | #import 8 | 9 | @interface ViewController : UIViewController 10 | @end 11 | 12 | #else 13 | 14 | #import 15 | 16 | @interface ViewController : NSViewController 17 | @end 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/Shared/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #if TARGET_OS_IPHONE 4 | 5 | #import 6 | #import "AppDelegate.h" 7 | 8 | int main(int argc, char * argv[]) { 9 | @autoreleasepool { 10 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 11 | } 12 | } 13 | 14 | #else 15 | 16 | #import 17 | 18 | int main(int argc, const char * argv[]) { 19 | return NSApplicationMain(argc, argv); 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/iOS/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/examples/example_apple_metal/iOS/Default-568h@2x.png -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_apple_metal/macOS/Info-macOS.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | imgui 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2018 Warren Moore. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_emscripten/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - You need to install Emscripten from https://emscripten.org/docs/getting_started/downloads.html, and have the environment variables set, as described in https://emscripten.org/docs/getting_started/downloads.html#installation-instructions 5 | 6 | - Depending on your configuration, in Windows you may need to run `emsdk/emsdk_env.bat` in your console to access the Emscripten command-line tools. 7 | 8 | - Then build using `make` while in the `example_emscripten/` directory. 9 | 10 | - Note that Emscripten 1.39.0 (October 2019) obsoleted the `BINARYEN_TRAP_MODE=clamp` compilation flag which was required with version older than 1.39.0 to avoid rendering artefacts. See [#2877](https://github.com/ocornut/imgui/issues/2877) for details. If you use an older version, uncomment this line in the Makefile: 11 | 12 | `#EMS += -s BINARYEN_TRAP_MODE=clamp` 13 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need GLFW (http://www.glfw.org): 3 | # brew install glfw 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_glfw_metal 10 | SOURCES = main.mm 11 | SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_metal.mm 12 | SOURCES += ../../imgui.cpp ../../imgui_widgets.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 13 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 14 | 15 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 16 | LIBS += -L/usr/local/lib -lglfw 17 | 18 | CXXFLAGS = -I../ -I../../ -I/usr/local/include 19 | CXXFLAGS += -Wall -Wformat 20 | CFLAGS = $(CXXFLAGS) 21 | 22 | %.o:%.cpp 23 | $(CXX) $(CXXFLAGS) -c -o $@ $< 24 | 25 | %.o:../%.cpp 26 | $(CXX) $(CXXFLAGS) -c -o $@ $< 27 | 28 | %.o:../../%.cpp 29 | $(CXX) $(CXXFLAGS) -c -o $@ $< 30 | 31 | %.o:../%.mm 32 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 33 | 34 | %.o:%.mm 35 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 36 | 37 | all: $(EXE) 38 | @echo Build complete 39 | 40 | $(EXE): $(OBJS) 41 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 42 | 43 | clean: 44 | rm -f $(EXE) $(OBJS) 45 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include *.cpp ..\imgui_impl_opengl2.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_opengl2.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_vulkan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Example usage: 2 | # mkdir build 3 | # cd build 4 | # cmake -g "Visual Studio 14 2015" .. 5 | 6 | cmake_minimum_required(VERSION 3.0) 7 | project(imgui_example_glfw_vulkan C CXX) 8 | 9 | if(NOT CMAKE_BUILD_TYPE) 10 | set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE) 11 | endif() 12 | 13 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES") 14 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES") 15 | 16 | # GLFW 17 | set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo 18 | option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) 19 | option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) 20 | option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF) 21 | option(GLFW_INSTALL "Generate installation target" OFF) 22 | option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) 23 | add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL) 24 | include_directories(${GLFW_DIR}/include) 25 | 26 | # Dear ImGui 27 | set(IMGUI_DIR ../../) 28 | include_directories(${IMGUI_DIR} ..) 29 | 30 | # Libraries 31 | find_library(VULKAN_LIBRARY 32 | NAMES vulkan vulkan-1) 33 | set(LIBRARIES "glfw;${VULKAN_LIBRARY}") 34 | 35 | # Use vulkan headers from glfw: 36 | include_directories(${GLFW_DIR}/deps) 37 | 38 | file(GLOB sources *.cpp) 39 | 40 | add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/examples/imgui_impl_glfw.cpp ${IMGUI_DIR}/examples/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_widgets.cpp) 41 | target_link_libraries(example_glfw_vulkan ${LIBRARIES}) 42 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_vulkan/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | 3 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_vulkan/build_win64.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of amd64/vcvars32.bat to setup 64-bit command-line compiler. 2 | 3 | mkdir Debug 4 | cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 5 | 6 | mkdir Release 7 | cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib 8 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_vulkan/gen_spv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag 3 | glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert 4 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_vulkan/glsl_shader.frag: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) out vec4 fColor; 3 | 4 | layout(set=0, binding=0) uniform sampler2D sTexture; 5 | 6 | layout(location = 0) in struct { 7 | vec4 Color; 8 | vec2 UV; 9 | } In; 10 | 11 | void main() 12 | { 13 | fColor = In.Color * texture(sTexture, In.UV.st); 14 | } 15 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_glfw_vulkan/glsl_shader.vert: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout(location = 0) in vec2 aPos; 3 | layout(location = 1) in vec2 aUV; 4 | layout(location = 2) in vec4 aColor; 5 | 6 | layout(push_constant) uniform uPushConstant { 7 | vec2 uScale; 8 | vec2 uTranslate; 9 | } pc; 10 | 11 | out gl_PerVertex { 12 | vec4 gl_Position; 13 | }; 14 | 15 | layout(location = 0) out struct { 16 | vec4 Color; 17 | vec2 UV; 18 | } Out; 19 | 20 | void main() 21 | { 22 | Out.Color = aColor; 23 | Out.UV = aUV; 24 | gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1); 25 | } 26 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_marmalade/data/app.icf: -------------------------------------------------------------------------------- 1 | # This file is for configuration settings for your 2 | # application. 3 | # 4 | # The syntax is similar to windows .ini files ie 5 | # 6 | # [GroupName] 7 | # Setting = Value 8 | # 9 | # Which can be read by your application using 10 | # e.g s3eConfigGetString("GroupName", "Setting", string) 11 | # 12 | # All settings must be documented in .config.txt files. 13 | # New settings specific to this application should be 14 | # documented in app.config.txt 15 | # 16 | # Some conditional operations are also permitted, see the 17 | # S3E documentation for details. 18 | 19 | [S3E] 20 | MemSize=6000000 21 | MemSizeDebug=6000000 22 | DispFixRot=FixedLandscape 23 | 24 | # emulate iphone 5 resolution, change these settings to emulate other display resolution 25 | WinWidth=1136 26 | WinHeight=640 27 | 28 | [GX] 29 | DataCacheSize=131070 30 | 31 | [Util] 32 | #MemoryBreakpoint=1282 33 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_marmalade/marmalade_example.mkb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env mkb 2 | 3 | # ImGui - standalone example application for Marmalade 4 | # Copyright (C) 2015 by Giovanni Zito 5 | # This file is part of ImGui 6 | # https://github.com/ocornut/imgui 7 | 8 | define IMGUI_DISABLE_INCLUDE_IMCONFIG_H 9 | define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS 10 | define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS 11 | define _snprintf=snprintf 12 | 13 | options 14 | { 15 | optimise-speed=1 16 | } 17 | 18 | includepaths 19 | { 20 | .. 21 | ../.. 22 | } 23 | 24 | subprojects 25 | { 26 | iwgx 27 | } 28 | 29 | files 30 | { 31 | (.) 32 | ["imgui"] 33 | ../../imgui.cpp 34 | ../../imgui_demo.cpp 35 | ../../imgui_draw.cpp 36 | ../../imgui_widgets.cpp 37 | ../../imconfig.h 38 | ../../imgui.h 39 | ../../imgui_internal.h 40 | 41 | ["imgui","Marmalade binding"] 42 | ../imgui_impl_marmalade.h 43 | ../imgui_impl_marmalade.cpp 44 | main.cpp 45 | 46 | } 47 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_null/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib 4 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_null/main.cpp: -------------------------------------------------------------------------------- 1 | // dear imgui: null/dummy example application 2 | // (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT) 3 | // This is useful to test building, but you cannot interact with anything here! 4 | #include "imgui.h" 5 | #include 6 | 7 | int main(int, char**) 8 | { 9 | IMGUI_CHECKVERSION(); 10 | ImGui::CreateContext(); 11 | ImGuiIO& io = ImGui::GetIO(); 12 | 13 | // Build atlas 14 | unsigned char* tex_pixels = NULL; 15 | int tex_w, tex_h; 16 | io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h); 17 | 18 | for (int n = 0; n < 20; n++) 19 | { 20 | printf("NewFrame() %d\n", n); 21 | io.DisplaySize = ImVec2(1920, 1080); 22 | io.DeltaTime = 1.0f / 60.0f; 23 | ImGui::NewFrame(); 24 | 25 | static float f = 0.0f; 26 | ImGui::Text("Hello, world!"); 27 | ImGui::SliderFloat("float", &f, 0.0f, 1.0f); 28 | ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); 29 | ImGui::ShowDemoWindow(NULL); 30 | 31 | ImGui::Render(); 32 | } 33 | 34 | printf("DestroyContext()\n"); 35 | ImGui::DestroyContext(); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_sdl_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_directx11 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_dx11.cpp ..\..\imgui*.cpp 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_sdl_metal/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # You will need SDL2 (http://www.libsdl.org): 3 | # brew install sdl2 4 | # 5 | 6 | #CXX = g++ 7 | #CXX = clang++ 8 | 9 | EXE = example_sdl_metal 10 | SOURCES = main.mm 11 | SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_metal.mm 12 | SOURCES += ../../imgui.cpp ../../imgui_widgets.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp 13 | OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) 14 | 15 | LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore 16 | LIBS += `sdl2-config --libs` 17 | LIBS += -L/usr/local/lib 18 | 19 | CXXFLAGS = -I../ -I../../ -I/usr/local/include 20 | CXXFLAGS += `sdl2-config --cflags` 21 | CXXFLAGS += -Wall -Wformat 22 | CFLAGS = $(CXXFLAGS) 23 | 24 | %.o:%.cpp 25 | $(CXX) $(CXXFLAGS) -c -o $@ $< 26 | 27 | %.o:../%.cpp 28 | $(CXX) $(CXXFLAGS) -c -o $@ $< 29 | 30 | %.o:../../%.cpp 31 | $(CXX) $(CXXFLAGS) -c -o $@ $< 32 | 33 | %.o:../%.mm 34 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 35 | 36 | %.o:%.mm 37 | $(CXX) $(CXXFLAGS) -ObjC++ -fobjc-weak -fobjc-arc -c -o $@ $< 38 | 39 | all: $(EXE) 40 | @echo Build complete 41 | 42 | $(EXE): $(OBJS) 43 | $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) 44 | 45 | clean: 46 | rm -f $(EXE) $(OBJS) 47 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_sdl_opengl2/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl 25 | ``` 26 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_sdl_opengl2/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_opengl2 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_sdl_opengl3/README.md: -------------------------------------------------------------------------------- 1 | 2 | # How to Build 3 | 4 | - On Windows with Visual Studio's CLI 5 | 6 | ``` 7 | set SDL2_DIR=path_to_your_sdl2_folder 8 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 9 | # ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries 10 | # or for 64-bit: 11 | cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console 12 | ``` 13 | 14 | - On Linux and similar Unixes 15 | 16 | ``` 17 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -lGL -ldl 18 | ``` 19 | 20 | - On Mac OS X 21 | 22 | ``` 23 | brew install sdl2 24 | c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -framework OpenGl -framework CoreFoundation 25 | ``` 26 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_sdl_opengl3/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | set OUT_DIR=Debug 3 | set OUT_EXE=example_sdl_opengl3 4 | set INCLUDES=/I.. /I..\.. /I%SDL2_DIR%\include /I..\libs\gl3w 5 | set SOURCES=main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c 6 | set LIBS=/libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib 7 | mkdir %OUT_DIR% 8 | cl /nologo /Zi /MD %INCLUDES% %SOURCES% /Fe%OUT_DIR%/%OUT_EXE%.exe /Fo%OUT_DIR%/ /link %LIBS% /subsystem:console 9 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_win32_directx10/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_win32.cpp ..\imgui_impl_dx10.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx10.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_win32_directx11/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx11.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx11.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib 4 | 5 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_win32_directx12/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx12.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx12.exe /FoDebug/ /link d3d12.lib d3dcompiler.lib dxgi.lib 4 | 5 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/example_win32_directx9/build_win32.bat: -------------------------------------------------------------------------------- 1 | @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. 2 | mkdir Debug 3 | cl /nologo /Zi /MD /I .. /I ..\.. /I "%DXSDK_DIR%/Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx9.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx9.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib 4 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/imgui_impl_allegro5.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer + Platform Binding for Allegro 5 2 | // (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Platform: Clipboard support (from Allegro 5.1.12) 7 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 8 | // Issues: 9 | // [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually. 10 | // [ ] Platform: Missing gamepad support. 11 | 12 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 13 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 14 | // https://github.com/ocornut/imgui, Original Allegro 5 code by @birthggd 15 | 16 | #pragma once 17 | 18 | struct ALLEGRO_DISPLAY; 19 | union ALLEGRO_EVENT; 20 | 21 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display); 22 | IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown(); 23 | IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame(); 24 | IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data); 25 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event); 26 | 27 | // Use if you want to reset your rendering device without losing ImGui state. 28 | IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects(); 29 | IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects(); 30 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/imgui_impl_dx10.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX10 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | 14 | struct ID3D10Device; 15 | 16 | IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device); 17 | IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown(); 18 | IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame(); 19 | IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data); 20 | 21 | // Use if you want to reset your rendering device without losing ImGui state. 22 | IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects(); 23 | IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects(); 24 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/imgui_impl_dx11.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX11 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | 14 | struct ID3D11Device; 15 | struct ID3D11DeviceContext; 16 | 17 | IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context); 18 | IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown(); 19 | IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame(); 20 | IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data); 21 | 22 | // Use if you want to reset your rendering device without losing ImGui state. 23 | IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects(); 24 | IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects(); 25 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for DirectX9 2 | // This needs to be used along with a Platform Binding (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | #pragma once 13 | 14 | struct IDirect3DDevice9; 15 | 16 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 17 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 18 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 19 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 20 | 21 | // Use if you want to reset your rendering device without losing ImGui state. 22 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 23 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 24 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/imgui_impl_marmalade.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer + Platform Binding for Marmalade + IwGx 2 | // Marmalade code: Copyright (C) 2015 by Giovanni Zito (this file is part of Dear ImGui) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID! 6 | 7 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 8 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 9 | // https://github.com/ocornut/imgui 10 | 11 | #pragma once 12 | 13 | IMGUI_IMPL_API bool ImGui_Marmalade_Init(bool install_callbacks); 14 | IMGUI_IMPL_API void ImGui_Marmalade_Shutdown(); 15 | IMGUI_IMPL_API void ImGui_Marmalade_NewFrame(); 16 | IMGUI_IMPL_API void ImGui_Marmalade_RenderDrawData(ImDrawData* draw_data); 17 | 18 | // Use if you want to reset your rendering device without losing ImGui state. 19 | IMGUI_IMPL_API void ImGui_Marmalade_InvalidateDeviceObjects(); 20 | IMGUI_IMPL_API bool ImGui_Marmalade_CreateDeviceObjects(); 21 | 22 | // Callbacks (installed by default if you enable 'install_callbacks' during initialization) 23 | // You can also handle inputs yourself and use those as a reference. 24 | IMGUI_IMPL_API int32 ImGui_Marmalade_PointerButtonEventCallback(void* system_data, void* user_data); 25 | IMGUI_IMPL_API int32 ImGui_Marmalade_KeyCallback(void* system_data, void* user_data); 26 | IMGUI_IMPL_API int32 ImGui_Marmalade_CharCallback(void* system_data, void* user_data); 27 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/imgui_impl_metal.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer for Metal 2 | // This needs to be used along with a Platform Binding (e.g. OSX) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 7 | 8 | // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this. 9 | // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp. 10 | // https://github.com/ocornut/imgui 11 | 12 | @class MTLRenderPassDescriptor; 13 | @protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder; 14 | 15 | IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id device); 16 | IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown(); 17 | IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor *renderPassDescriptor); 18 | IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, 19 | id commandBuffer, 20 | id commandEncoder); 21 | 22 | // Called by Init/NewFrame/Shutdown 23 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id device); 24 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture(); 25 | IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id device); 26 | IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects(); 27 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/imgui_impl_osx.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Binding for OSX / Cocoa 2 | // This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..) 3 | // [ALPHA] Early bindings, not well tested. If you want a portable application, prefer using the GLFW or SDL platform bindings on Mac. 4 | 5 | // Implemented features: 6 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 7 | // [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this back-end). 8 | // Issues: 9 | // [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters].. 10 | 11 | @class NSEvent; 12 | @class NSView; 13 | 14 | IMGUI_API bool ImGui_ImplOSX_Init(); 15 | IMGUI_API void ImGui_ImplOSX_Shutdown(); 16 | IMGUI_API void ImGui_ImplOSX_NewFrame(NSView *_Nullable view); 17 | IMGUI_API bool ImGui_ImplOSX_HandleEvent(NSEvent *_Nonnull event, NSView *_Nullable view); 18 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/libs/glfw/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2010 Camilla Berglund 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would 15 | be appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not 18 | be misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source 21 | distribution. 22 | 23 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/libs/glfw/lib-vc2010-32/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/examples/libs/glfw/lib-vc2010-32/glfw3.lib -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/libs/glfw/lib-vc2010-64/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/examples/libs/glfw/lib-vc2010-64/glfw3.lib -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/examples/libs/usynergy/README.txt: -------------------------------------------------------------------------------- 1 | 2 | uSynergy client -- Implementation for the embedded Synergy client library 3 | version 1.0.0, July 7th, 2012 4 | Copyright (c) 2012 Alex Evans 5 | 6 | This is a copy of the files once found at: 7 | https://github.com/symless/synergy-core/tree/790d108a56ada9caad8e56ff777d444485a69da9/src/micro 8 | 9 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/README.txt: -------------------------------------------------------------------------------- 1 | 2 | misc/cpp/ 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | misc/fonts/ 7 | Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). 8 | Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. 9 | Suggested fonts and links. 10 | 11 | misc/freetype/ 12 | Font atlas builder/rasterizer using FreeType instead of stb_truetype. 13 | Benefit from better FreeType rasterization, in particular for small fonts. 14 | 15 | misc/natvis/ 16 | Natvis file to describe dear imgui types in the Visual Studio debugger. 17 | With this, types like ImVector<> will be displayed nicely in the debugger. 18 | You can include this file a Visual Studio project file, or install it in Visual Studio folder. 19 | 20 | misc/single_file/ 21 | Single-file header stub. 22 | We use this to validate compiling all *.cpp files in a same compilation unit. 23 | Users of that technique (also called "Unity builds") can generally provide this themselves, 24 | so we don't really recommend you use this in your projects. 25 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/cpp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | imgui_stdlib.h + imgui_stdlib.cpp 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | imgui_scoped.h 7 | [Experimental, not currently in main repository] 8 | Additional header file with some RAII-style wrappers for common Dear ImGui functions. 9 | Try by merging: https://github.com/ocornut/imgui/pull/2197 10 | Discuss at: https://github.com/ocornut/imgui/issues/2096 11 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/cpp/imgui_stdlib.h: -------------------------------------------------------------------------------- 1 | // imgui_stdlib.h 2 | // Wrappers for C++ standard library (STL) types (std::string, etc.) 3 | // This is also an example of how you may wrap your own similar types. 4 | 5 | // Compatibility: 6 | // - std::string support is only guaranteed to work from C++11. 7 | // If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture) 8 | 9 | // Changelog: 10 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 11 | 12 | #pragma once 13 | 14 | #include 15 | 16 | namespace ImGui 17 | { 18 | // ImGui::InputText() with std::string 19 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity 20 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 21 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 22 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 23 | } 24 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/fonts/Cousine-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/misc/fonts/Cousine-Regular.ttf -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/misc/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/fonts/Karla-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/misc/fonts/Karla-Regular.ttf -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/fonts/ProggyClean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/misc/fonts/ProggyClean.ttf -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/fonts/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/misc/fonts/ProggyTiny.ttf -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/dependencies/third-party/imgui/src/misc/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/natvis/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Natvis file to describe dear imgui types in the Visual Studio debugger. 3 | With this, types like ImVector<> will be displayed nicely in the debugger. 4 | You can include this file a Visual Studio project file, or install it in Visual Studio folder. 5 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/natvis/imgui.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{Size={Size} Capacity={Capacity}}} 9 | 10 | 11 | Size 12 | Data 13 | 14 | 15 | 16 | 17 | 18 | {{x={x,g} y={y,g}}} 19 | 20 | 21 | 22 | {{x={x,g} y={y,g} z={z,g} w={w,g}}} 23 | 24 | 25 | 26 | {{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}} 27 | 28 | Min 29 | Max 30 | Max.x - Min.x 31 | Max.y - Min.y 32 | 33 | 34 | 35 | 36 | {{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}} 37 | 38 | 39 | -------------------------------------------------------------------------------- /dependencies/third-party/imgui/src/misc/single_file/imgui_single_file.h: -------------------------------------------------------------------------------- 1 | // imgui_single_file.h 2 | // We use this to validate compiling all *.cpp files in a same compilation unit. 3 | // Users of that technique (also called "Unity builds") can generally provide this themselves, 4 | // so we don't really recommend you use this in your projects. 5 | 6 | // Do this: 7 | // #define IMGUI_IMPLEMENTATION 8 | // Before you include this file in *one* C++ file to create the implementation. 9 | // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit. 10 | #include "../../imgui.h" 11 | 12 | #ifdef IMGUI_IMPLEMENTATION 13 | #include "../../imgui.cpp" 14 | #include "../../imgui_demo.cpp" 15 | #include "../../imgui_draw.cpp" 16 | #include "../../imgui_widgets.cpp" 17 | #endif 18 | -------------------------------------------------------------------------------- /doc/img/build_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/build_VS.PNG -------------------------------------------------------------------------------- /doc/img/configuration_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/configuration_VS.PNG -------------------------------------------------------------------------------- /doc/img/dnn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/dnn.png -------------------------------------------------------------------------------- /doc/img/dnn_python.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/dnn_python.PNG -------------------------------------------------------------------------------- /doc/img/imshow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/imshow.png -------------------------------------------------------------------------------- /doc/img/maskrcnn_cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/maskrcnn_cpp.png -------------------------------------------------------------------------------- /doc/img/maskrcnn_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/maskrcnn_python.png -------------------------------------------------------------------------------- /doc/img/pointcloud_cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/pointcloud_cpp.png -------------------------------------------------------------------------------- /doc/img/pointcloud_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/pointcloud_python.png -------------------------------------------------------------------------------- /doc/img/ros_dynamic_reconfigure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/ros_dynamic_reconfigure.png -------------------------------------------------------------------------------- /doc/img/run_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/run_VS.PNG -------------------------------------------------------------------------------- /doc/img/saved_frame_content_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/saved_frame_content_map.png -------------------------------------------------------------------------------- /doc/img/sdk_acquire_frame_sequence_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/sdk_acquire_frame_sequence_diagram.png -------------------------------------------------------------------------------- /doc/img/sdk_class_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/sdk_class_diagram.png -------------------------------------------------------------------------------- /doc/img/sdk_initialization_sequence_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/sdk_initialization_sequence_diagram.png -------------------------------------------------------------------------------- /doc/img/sdk_software_stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/sdk_software_stack.png -------------------------------------------------------------------------------- /doc/img/sdk_top_level_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/sdk_top_level_diagram.png -------------------------------------------------------------------------------- /doc/img/skeletal_tracking_in_pointcloud_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/skeletal_tracking_in_pointcloud_python.png -------------------------------------------------------------------------------- /doc/img/skeletal_tracking_python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/skeletal_tracking_python.png -------------------------------------------------------------------------------- /doc/img/startup_VS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/startup_VS.PNG -------------------------------------------------------------------------------- /doc/img/windows_db410c_usb.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/doc/img/windows_db410c_usb.JPG -------------------------------------------------------------------------------- /doc/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : doc 2 | 3 | #### Overview 4 | This folder contains the user guides, helper documents, doxygen documents, etc. for the 3D ToF SDK and examples. 5 | 6 | #### Directory Structure 7 | | Directory/File | Description | 8 | | --------- | ----------- | 9 | | itof | Dcoumentation related to ITOF (Indirect Time Of Flight) cameras | 10 | | img | Images used in various documentation files | 11 | | CMakeLists.txt | Rules for generating the doxygen documentation on request | 12 | | sdcard_burn.md | Instructions to write the SD card image onto a SD card | 13 | | sdk.doxy.in | The doxygen configuration before cmake content gets added | 14 | -------------------------------------------------------------------------------- /doc/sdcard_burn.md: -------------------------------------------------------------------------------- 1 | # Writing the SD card image onto the SD card 2 | 3 | The size of the SD card that is going to be used to write the image to, must be equal or greater than the size of the image. 4 | Writing the image on the SD card will take about 15 to 20 minutes for a 16GB image, depending on the transfer speed of the system being used. 5 | 6 | ## Linux 7 | * Make sure that xz-utils are installed on your machine 8 | ~~~sh 9 | sudo apt-get install xz-utils 10 | ~~~ 11 | * Unpack the .tar.xz archive 12 | ~~~sh 13 | tar -xf name-of-the-image.tar.xz 14 | ~~~ 15 | * Write the image on the SD card 16 | ~~~sh 17 | dd if=name-of-the-image.img of=/dev/xxx bs=4M 18 | sync 19 | ~~~ 20 | 21 | Note 1: The following command can be used to help identifying the device that needs to be specified for the argument **of=/dev/xxx**: 22 | ~~~sh 23 | lsblk 24 | ~~~ 25 | Note 2: It is very likely that the **dd** command will have to be executed with **sudo** privileges: 26 | ~~~sh 27 | sudo dd if=name-of-the-image.img of=/dev/xxx bs=4M 28 | ~~~ 29 | 30 | 31 | ## Windows 32 | * Unpack the .tar.xz archive using [7-Zip](https://www.7-zip.org/) 33 | * Install the [balenaEtcher](https://www.balena.io/etcher/) app 34 | * Write the .img file to the SD card using the balenaEtcher app 35 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(examples) 3 | 4 | add_subdirectory(first-frame) 5 | add_subdirectory(data_collect) 6 | if (NOT NXP) 7 | add_subdirectory(tof-viewer) 8 | endif() 9 | 10 | include(GNUInstallDirs) 11 | 12 | if (NXP) 13 | install(PROGRAMS 14 | $ 15 | $ 16 | DESTINATION ${CMAKE_INSTALL_BINDIR} ) 17 | elseif(WIN32) 18 | install(PROGRAMS 19 | $ 20 | $ 21 | $ 22 | DESTINATION ${CMAKE_INSTALL_BINDIR} ) 23 | endif() 24 | -------------------------------------------------------------------------------- /examples/data_collect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(data_collect) 3 | 4 | add_executable(${PROJECT_NAME} main.cpp ${SOURCES}) 5 | 6 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14) 7 | 8 | if (NOT WIN32) 9 | find_library(PTHREAD_LIBRARIES pthread) 10 | if (PTHREAD_LIBRARIES) 11 | target_link_libraries(${PROJECT_NAME} PRIVATE ${PTHREAD_LIBRARIES}) 12 | else() 13 | message(FATAL_ERROR "pthread libraries not found!") 14 | endif() 15 | endif() 16 | 17 | if( WIN32 ) 18 | add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD 19 | COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/. 20 | ) 21 | endif() 22 | 23 | if ( WIN32 ) 24 | if (MSVC) 25 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:4194304") 26 | else () 27 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,4194304") 28 | endif() 29 | endif() 30 | 31 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof command_parser) 32 | -------------------------------------------------------------------------------- /examples/first-frame/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(first-frame) 3 | 4 | add_executable(${PROJECT_NAME} main.cpp) 5 | 6 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14) 7 | 8 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof command_parser) 9 | 10 | if( WIN32 ) 11 | add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD 12 | COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/. 13 | ) 14 | endif() 15 | -------------------------------------------------------------------------------- /examples/first-frame/readme.md: -------------------------------------------------------------------------------- 1 | # first-frame sample code 2 | 3 | ## Overview 4 | 5 | The first-frame is a cross platform sample code that shows how to use the aditof sdk to configure a camera so that frames can be captured from it. 6 | 7 | For example, the run command could look like: 8 | `./first-frame config/config_adsd3500_adsd3100.json` 9 | 10 | The first-frame can talk to a remote ToF camera over the network. 11 | 12 | For example if the ip address of the remote camera is `10.43.0.1` the run command could look like: 13 | 14 | `./first-frame 10.43.0.1 config/config_adsd3500_adsd3100.json` 15 | 16 | In addition please ensure the correct mode is selected. This is done by manually editing the code. In the future this will move to a comamnd line option. 17 | 18 | See https://github.com/analogdevicesinc/ToF/blob/e551cab2e470f3743a01a49ef4c22fe663d7715e/examples/first-frame/main.cpp#L127 19 | -------------------------------------------------------------------------------- /examples/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Sample Code for 3D TOF camera 2 | 3 | The examples in this directory provide sample applications to demonstrate how 3D TOF camera can be used. These applications are meant to help the developers in easily integrating the 3D TOF SDK in their applications. 4 | 5 | #### List of Examples 6 | 7 | | Name | Language | Description | 8 | | --------- | ----------- | -------------- | 9 | | first-frame | C++ | An example code that shows the step required to get to the point where camera frames can be captured (even from a remote camera) | 10 | | data_collect | C++ | An example code and user application for retriving data from the device then saving to files | 11 | | tof-viewer | C++ | ADIToFGUI Application | -------------------------------------------------------------------------------- /examples/tof-viewer/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/imgui/imgui"] 2 | path = external/imgui/src 3 | url = https://github.com/ocornut/imgui 4 | [submodule "external/aditof_sdk/aditof_sdk"] 5 | path = external/aditof_sdk/src 6 | url = https://github.com/analogdevicesinc/aditof_sdk 7 | [submodule "external/aditof_cmos_sdk/src"] 8 | path = external/aditof_cmos_sdk/src 9 | url = https://bitbucket.analog.com/scm/tofi/sdk.git 10 | [submodule "external/libusb/libusb"] 11 | path = external/libusb/src 12 | url = https://github.com/libusb/libusb.git 13 | [submodule "external/FSF/utilities"] 14 | path = external/FSF/src 15 | url = https://bitbucket.analog.com/scm/tofi/utilities.git 16 | [submodule "external/newton_host_driver/newton_host_driver"] 17 | path = external/newton_host_driver/src 18 | url = https://bitbucket.analog.com/scm/tofi/newton_host_driver.git 19 | -------------------------------------------------------------------------------- /examples/tof-viewer/ADIToFConfig.h.in: -------------------------------------------------------------------------------- 1 | // the configured options and settings for ADIToF 2 | #define ADIToFGUI_VERSION_MAJOR @ADIToFGUI_VERSION_MAJOR@ 3 | #define ADIToFGUI_VERSION_MINOR @ADIToFGUI_VERSION_MINOR@ -------------------------------------------------------------------------------- /examples/tof-viewer/Images/DepthFrame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/DepthFrame.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/DepthView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/DepthView.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/DepthViewCMOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/DepthViewCMOS.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/FSFOptionsWindowPB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/FSFOptionsWindowPB.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/MainWindow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/MainWindow.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/MainWindowCMOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/MainWindowCMOS.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/OpenDevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/OpenDevice.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/OpenDeviceCMOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/OpenDeviceCMOS.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/OpenRecording_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/OpenRecording_Button.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PlayCamera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PlayCamera.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PlayCameraCMOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PlayCameraCMOS.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PlayCameraWPC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PlayCameraWPC.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PlayCameraWPC2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PlayCameraWPC2.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PlaybackFilters.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PlaybackFilters.JPG -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PlaybackOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PlaybackOptions.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PlaybackProgress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PlaybackProgress.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/PointCloudImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/PointCloudImage.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/RecordingFSFOptionsWin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/RecordingFSFOptionsWin.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/RecordingOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/RecordingOptions.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/RecordingOptionsWPC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/RecordingOptionsWPC.png -------------------------------------------------------------------------------- /examples/tof-viewer/Images/SaveAs.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/SaveAs.JPG -------------------------------------------------------------------------------- /examples/tof-viewer/Images/StartCamera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/Images/StartCamera.png -------------------------------------------------------------------------------- /examples/tof-viewer/LOGOS/CompanyIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/LOGOS/CompanyIcon.png -------------------------------------------------------------------------------- /examples/tof-viewer/LOGOS/CompanyLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/LOGOS/CompanyLogo.png -------------------------------------------------------------------------------- /examples/tof-viewer/LOGOS/MainWindowTitle.txt: -------------------------------------------------------------------------------- 1 | Time of Flight Viewer -------------------------------------------------------------------------------- /examples/tof-viewer/RAW Format.md: -------------------------------------------------------------------------------- 1 | # Time of Flight Viewer by Analog Devices, Inc 2 | 3 | ## RAW Format for Recording and Playback 4 | 5 | The Analog Devices, Inc RAW format records and playsback processed data streams such as Active Brightness and Depth view. The recorded file has a very small global header that contains the following elements in this order: 6 | 7 | * Frame Height (in pixels) size of 4 bytes 8 | * Frame Width (in pixels) size of 4 bytes 9 | * Number of total frames size of 4 bytes 10 | 11 | After this header, the file contains an interleaved data between Active Brightness and Depth view for each frame. A frame is a collection of data of size of Width (in pixels) x Height (in pixels). For example, if an image is size of 1024 pixels x 1024 pixels, then a frame is the entire image of size 1024 pixels x 1024 pixels. Each pixel is of size 2 bytes. 12 | 13 | The interleaved data can be better explained by the following example: 14 | * Frame 1 = [Active Brightness1 (1024x1024), Depth View1 (1024x1024)] 15 | * Frame 2 = [Active Brightness2 (1024x1024), Depth View2 (1024x1024)] 16 | 17 | ... 18 | 19 | * Frame n = [Active Brightnessn (1024x1024), Depth Viewn (1024x1024)] 20 | 21 | In summary, the whole document can be read as follows: 22 | 23 | Raw File = 24 | [ (Frame Height) (Frame Width) (Number of total frames) 25 | (Active Brightness 1) (Depth View 1) 26 | (Active Brightness 2) (Depth View 2) 27 | (Active Brightness 3) (Depth View 3) 28 | (Active Brightness n) (Depth View n)] 29 | -------------------------------------------------------------------------------- /examples/tof-viewer/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/examples/tof-viewer/README.pdf -------------------------------------------------------------------------------- /examples/tof-viewer/include/ADIInformationPane.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Modified by Analog Devices, Inc. 3 | // Licensed under the MIT License. 4 | 5 | //#include "ADIMainWindow.h" 6 | // 7 | //namespace adiMainWindow 8 | //{ 9 | // class ADIMainWindow 10 | // { 11 | // public: 12 | // 13 | // private: 14 | // void RenderInfoPane(const uint16_t &image, ImVec2 hoveredPixel) 15 | // { 16 | // (void)hoveredPixel; 17 | // RenderBasicInfoPane(image); 18 | // } 19 | // 20 | // void RenderBasicInfoPane(const uint16_t& image) 21 | // { 22 | // //ImGui::Text("Timestamp: %llu", static_cast(image.get_device_timestamp().count())); 23 | // ImGui::Text("Timestamp: implement Timestamp!!!"); 24 | // } 25 | // }; 26 | //} 27 | -------------------------------------------------------------------------------- /examples/tof-viewer/include/ADITypes.h: -------------------------------------------------------------------------------- 1 | /** \file ADIypes.h 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. 4 | * Modified by Analog Devices, Inc. 5 | * Imager Type definitions. 6 | */ 7 | 8 | #ifndef ADITYPES_H 9 | #define ADITYPES_H 10 | 11 | #ifdef __cplusplus 12 | #include 13 | #include 14 | #include 15 | #else 16 | #include 17 | #include 18 | #include 19 | #include 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | typedef enum { 27 | /** Depth image type DEPTH16. 28 | * 29 | * \details 30 | * Each pixel of DEPTH16 data is two bytes of little endian unsigned depth data. The unit of the data is in 31 | * millimeters from the origin of the camera. 32 | * 33 | * \details 34 | * Stride indicates the length of each line in bytes and should be used to determine the start location of each 35 | * line of the image in memory. 36 | */ 37 | ADI_IMAGE_FORMAT_DEPTH16 = 0, 38 | 39 | /** Image type AB16. 40 | * 41 | * \details 42 | * Each pixel of AB16 data is two bytes of little endian unsigned depth data. The value of the data represents 43 | * brightness. 44 | * 45 | * \details 46 | * This format represents infrared light and is captured by the depth camera. 47 | * 48 | * \details 49 | * Stride indicates the length of each line in bytes and should be used to determine the start location of each 50 | * line of the image in memory. 51 | */ 52 | ADI_IMAGE_FORMAT_AB16, 53 | 54 | } ADI_Image_Format_t; 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif //ADITYPES_H 61 | -------------------------------------------------------------------------------- /examples/tof-viewer/include/safequeue.h: -------------------------------------------------------------------------------- 1 | #ifndef SAFEQUEUE_H 2 | #define SAFEQUEUE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | template 9 | class SafeQueue { 10 | public: 11 | SafeQueue() {} 12 | ~SafeQueue() {} 13 | 14 | void enqueue(T element) { 15 | std::unique_lock lock(m_mutex); 16 | m_queue.push(element); 17 | lock.unlock(); 18 | m_cv.notify_one(); 19 | } 20 | 21 | T dequeue() { 22 | std::unique_lock lock(m_mutex); 23 | m_cv.wait(lock, [&] { return !empty(); }); 24 | T element = m_queue.front(); 25 | m_queue.pop(); 26 | return element; 27 | } 28 | 29 | bool erase() { 30 | std::unique_lock lock(m_mutex); 31 | while (!m_queue.empty()) { 32 | m_queue.pop(); 33 | } 34 | return true; 35 | } 36 | 37 | bool empty() const { return m_queue.empty(); } 38 | 39 | private: 40 | std::queue m_queue; 41 | std::mutex m_mutex; 42 | std::condition_variable m_cv; 43 | }; 44 | 45 | #endif // SAFEQUEUE_H 46 | -------------------------------------------------------------------------------- /examples/tof-viewer/tof-tools.config: -------------------------------------------------------------------------------- 1 | { 2 | "skip_network_cameras": "off", 3 | "camera_ip": "10.43.0.1" 4 | } 5 | -------------------------------------------------------------------------------- /image-pipeline.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | sdk_version: '5.1.0' 3 | ${{ if eq(variables['Build.Reason'], 'PullRequest')}}: 4 | branch: $(System.PullRequest.TargetBranchName) 5 | ${{ else }}: 6 | branch: $(Build.SourceBranchName) 7 | 8 | trigger: 9 | branches: 10 | include: 11 | - main 12 | paths: 13 | include: 14 | - sdcard-images-utils/nxp 15 | exclude: 16 | - sdcard-images-utils/README.md 17 | - sdcard-images-utils/nxp/README.md 18 | 19 | jobs: 20 | - job: Image_build 21 | pool: 22 | name: Default 23 | demands: 24 | - agent.name -equals ToF 25 | timeoutInMinutes: 120 26 | steps: 27 | - checkout: self 28 | fetchDepth: 1 29 | submodules: true 30 | clean: true 31 | persistCredentials: true 32 | - script: | 33 | cd sdcard-images-utils/nxp 34 | ./runme.sh $(sdk_version) $(branch) main 35 | exit_status="$?" 36 | if [ -d "$(Build.Repository.LocalPath)/sdcard-images-utils/nxp/build/ubuntu/rootfs_tmp" ] && [ $exit_status != 0 ]; then 37 | sudo umount $(Build.Repository.LocalPath)/sdcard-images-utils/nxp/build/ubuntu/rootfs_tmp 38 | fi 39 | exit $exit_status 40 | displayName: 'Build image' 41 | -------------------------------------------------------------------------------- /scripts/nxp/ros2_ws_setup.bash: -------------------------------------------------------------------------------- 1 | STARTING_PATH=${pwd} 2 | cd /home/${USER} 3 | wget https://swdownloads.analog.com/cse/aditof/tof_ros2_build_nxp/ros2_nxp_2022_10_12.tar 4 | tar -xvf ros2_nxp_2022_10_12.tar 5 | rm ros2_nxp_2022_10_12.tar 6 | cd ros2_foxy/src 7 | git clone https://github.com/analogdevicesinc/tof-ros2.git 8 | cd .. 9 | source install/local_setup.bash 10 | colcon build 11 | cd ${STARTING_PATH} -------------------------------------------------------------------------------- /scripts/readme.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | Scripts 4 | #### Directory Structure 5 | | Directory/File | Description | 6 | | --------- | ----------- | 7 | | nxp | Build scripts to be ran on NXP | 8 | | windows | Build scripts to be ran on Windows | 9 | 10 | -------------------------------------------------------------------------------- /sdcard-images-utils/README.md: -------------------------------------------------------------------------------- 1 | # Utilities to create SD card images for different embedded platforms 2 | 3 | ## Directory Structure 4 | | Directory | Description | 5 | | --------- | ----------- | 6 | | nxp | Utilities required to create SD card image for NXP platform | 7 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | images/ 3 | *.swp 4 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/configs/buildroot_defconfig: -------------------------------------------------------------------------------- 1 | BR2_aarch64=y 2 | BR2_TOOLCHAIN_BUILDROOT_GLIBC=y 3 | BR2_KERNEL_HEADERS_5_4=y 4 | BR2_PACKAGE_GLIBC_UTILS=y 5 | BR2_BINUTILS_VERSION_2_35_X=y 6 | BR2_GCC_VERSION_10_X=y 7 | BR2_ROOTFS_MERGED_USR=y 8 | BR2_SYSTEM_BIN_SH_BASH=y 9 | BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin" 10 | BR2_TARGET_TZ_INFO=y 11 | BR2_ROOTFS_OVERLAY="../../patches/overlay" 12 | BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y 13 | BR2_PACKAGE_ALSA_UTILS=y 14 | BR2_PACKAGE_ALSA_UTILS_APLAY=y 15 | BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y 16 | BR2_PACKAGE_BLUEZ_ALSA=y 17 | BR2_PACKAGE_BLUEZ_ALSA_HCITOP=y 18 | BR2_PACKAGE_BLUEZ_ALSA_RFCOMM=y 19 | BR2_PACKAGE_JQ=y 20 | BR2_PACKAGE_MMC_UTILS=y 21 | BR2_PACKAGE_FB_TEST_APP=y 22 | BR2_PACKAGE_LINUX_FIRMWARE=y 23 | BR2_PACKAGE_LINUX_FIRMWARE_IMX_SDMA=y 24 | BR2_PACKAGE_MEMTESTER=y 25 | BR2_PACKAGE_PCIUTILS=y 26 | BR2_PACKAGE_PICOCOM=y 27 | BR2_PACKAGE_LIBCAP=y 28 | BR2_PACKAGE_EMPTY=y 29 | BR2_PACKAGE_BLUEZ_TOOLS=y 30 | BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y 31 | BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y 32 | BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL=y 33 | BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH=y 34 | BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI=y 35 | BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC=y 36 | BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_SAP=y 37 | BR2_PACKAGE_BLUEZ5_UTILS_TEST=y 38 | BR2_PACKAGE_BMON=y 39 | BR2_PACKAGE_BRCM_PATCHRAM_PLUS=y 40 | BR2_PACKAGE_ETHTOOL=y 41 | BR2_PACKAGE_IPERF3=y 42 | BR2_PACKAGE_IW=y 43 | BR2_PACKAGE_KMOD=y 44 | BR2_PACKAGE_KMOD_TOOLS=y 45 | BR2_PACKAGE_UTIL_LINUX=y 46 | BR2_PACKAGE_UTIL_LINUX_AGETTY=y 47 | BR2_PACKAGE_UTIL_LINUX_FSCK=y 48 | BR2_PACKAGE_UTIL_LINUX_MOUNT=y 49 | BR2_TARGET_ROOTFS_CPIO=y 50 | BR2_TARGET_ROOTFS_CPIO_UIMAGE=y 51 | BR2_TARGET_ROOTFS_EXT2=y 52 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/create_sd.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | help() 4 | { 5 | echo "Usage: ./`basename $0` image_image sdcard_dev_name" 6 | exit 0 7 | } 8 | 9 | IMAGE=$1 10 | DISK=$2 11 | RFS_PART=2 12 | 13 | if [ "x$1" == "x" -o "x$2" == "x" ]; then 14 | help 15 | exit -1 16 | fi 17 | 18 | echo "`basename $0` $1 $2" 19 | 20 | sudo dd if=/dev/zero of=${DISK} bs=1M count=3 21 | sudo dd if=${IMAGE} of=${DISK} bs=1M status=progress 22 | 23 | sudo sync 24 | sudo hdparm -z ${DISK} 25 | echo "Resize the rootfs partition" 26 | 27 | sudo parted -s ${DISK} "resizepart ${RFS_PART} -1" quit 28 | 29 | sudo hdparm -z ${DISK} 30 | 31 | sudo e2fsck -f ${DISK}${RFS_PART} 32 | sudo resize2fs ${DISK}${RFS_PART} 33 | 34 | sudo sync 35 | echo "Done..." 36 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0001-Enable-I2C-in-PMIC.patch: -------------------------------------------------------------------------------- 1 | From 71c27e738ad4c4aad6fbc86a9a9c00f68626cabf Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Thu, 15 Apr 2021 11:26:07 +0300 4 | Subject: [PATCH 01/50] Enable I2C in PMIC 5 | 6 | Signed-off-by: TalPilo 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/regulator/pca9450-regulator.c | 7 +++++++ 10 | 1 file changed, 7 insertions(+) 11 | 12 | diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c 13 | index d59305a6dd41..fe4f8d73b594 100644 14 | --- a/drivers/regulator/pca9450-regulator.c 15 | +++ b/drivers/regulator/pca9450-regulator.c 16 | @@ -768,6 +768,13 @@ static int pca9450_i2c_probe(struct i2c_client *i2c, 17 | return -EINVAL; 18 | } 19 | 20 | + ret = regmap_write(pca9450->regmap, PCA9450_REG_CONFIG2, 11); 21 | + if (ret < 0) { 22 | + dev_err(pca9450->dev, "%s(): write PCA9450_REG_CONFIG2 failed!\n", 23 | + __func__); 24 | + return ret; 25 | + } 26 | + 27 | for (i = 0; i < pca9450->rcnt; i++) { 28 | const struct regulator_desc *desc; 29 | struct regulator_dev *rdev; 30 | -- 31 | 2.39.0 32 | 33 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0007-staging-media-imx-imx8-isi-cap-Fix-for-discarding-of.patch: -------------------------------------------------------------------------------- 1 | From cac8076e8e72f770be11a456293eb0e5bdc786bf Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Tue, 4 May 2021 10:20:23 +0300 4 | Subject: [PATCH 07/50] staging: media: imx: imx8-isi-cap : Fix for discarding 5 | of the first frame 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/staging/media/imx/imx8-isi-cap.c | 4 ++-- 10 | 1 file changed, 2 insertions(+), 2 deletions(-) 11 | 12 | diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c 13 | index 3e7691e0253f..f8069914af4a 100644 14 | --- a/drivers/staging/media/imx/imx8-isi-cap.c 15 | +++ b/drivers/staging/media/imx/imx8-isi-cap.c 16 | @@ -439,12 +439,12 @@ static int cap_vb2_start_streaming(struct vb2_queue *q, unsigned int count) 17 | list_add_tail(&isi_cap->buf_discard[1].list, &isi_cap->out_discard); 18 | 19 | /* ISI channel output buffer 1 */ 20 | - buf = list_first_entry(&isi_cap->out_discard, struct mxc_isi_buffer, list); 21 | + buf = list_first_entry(&isi_cap->out_pending, struct mxc_isi_buffer, list); 22 | buf->v4l2_buf.sequence = 0; 23 | vb2 = &buf->v4l2_buf.vb2_buf; 24 | vb2->state = VB2_BUF_STATE_ACTIVE; 25 | mxc_isi_channel_set_outbuf(mxc_isi, buf); 26 | - list_move_tail(isi_cap->out_discard.next, &isi_cap->out_active); 27 | + list_move_tail(isi_cap->out_pending.next, &isi_cap->out_active); 28 | 29 | /* ISI channel output buffer 2 */ 30 | buf = list_first_entry(&isi_cap->out_pending, struct mxc_isi_buffer, list); 31 | -- 32 | 2.39.0 33 | 34 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0009-drivers-staging-media-imx-imx8-isi-cap-Add-debug-msg.patch: -------------------------------------------------------------------------------- 1 | From 7fea2e5f8a1996f9a1b89baa6f4b23710d1a975b Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Fri, 21 May 2021 12:05:06 +0300 4 | Subject: [PATCH 09/50] drivers: staging: media: imx: imx8-isi-cap: Add debug 5 | msg for dropped frames 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/staging/media/imx/imx8-isi-cap.c | 1 + 10 | 1 file changed, 1 insertion(+) 11 | 12 | diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c 13 | index f8069914af4a..5f02d3280408 100644 14 | --- a/drivers/staging/media/imx/imx8-isi-cap.c 15 | +++ b/drivers/staging/media/imx/imx8-isi-cap.c 16 | @@ -293,6 +293,7 @@ void mxc_isi_cap_frame_write_done(struct mxc_isi_dev *mxc_isi) 17 | buf = list_first_entry(&isi_cap->out_discard, 18 | struct mxc_isi_buffer, list); 19 | buf->v4l2_buf.sequence = isi_cap->frame_count; 20 | + dev_dbg(dev, "Discard buffer sequence: %d\n", isi_cap->frame_count); 21 | mxc_isi_channel_set_outbuf(mxc_isi, buf); 22 | list_move_tail(isi_cap->out_discard.next, &isi_cap->out_active); 23 | return; 24 | -- 25 | 2.39.0 26 | 27 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0010-drivers-media-spi-addicmos-Add-resolutions-for-max-f.patch: -------------------------------------------------------------------------------- 1 | From ee227e7a7c81393ed1b05a54fcd47851a0c5f1f8 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Fri, 21 May 2021 12:07:14 +0300 4 | Subject: [PATCH 10/50] drivers: media: spi: addicmos: Add resolutions for max 5 | frames FW 6 | 7 | When firmware configured for setting frame-end only after all 8 | subframes were sent is used the resolutions must be 10 times larger. 9 | 10 | Signed-off-by: Bogdan Togorean 11 | --- 12 | drivers/media/spi/addicmos.c | 14 ++++++++++++++ 13 | 1 file changed, 14 insertions(+) 14 | 15 | diff --git a/drivers/media/spi/addicmos.c b/drivers/media/spi/addicmos.c 16 | index e6bbb45d8116..94a37e3bdd07 100644 17 | --- a/drivers/media/spi/addicmos.c 18 | +++ b/drivers/media/spi/addicmos.c 19 | @@ -148,6 +148,8 @@ static const struct reg_sequence addicmos_standby_setting[] = { 20 | }; 21 | 22 | static const s64 link_freq_tbl[] = { 23 | + 732000000, 24 | + 732000000, 25 | 732000000, 26 | 732000000, 27 | 732000000 28 | @@ -172,6 +174,18 @@ static const struct addicmos_mode_info addicmos_mode_info_data[] = { 29 | .height = 256, 30 | .pixel_rate = 488000000, 31 | .link_freq_idx = 2 /* an index in link_freq_tbl[] */ 32 | + }, 33 | + { 34 | + .width = 4096, 35 | + .height = 640, 36 | + .pixel_rate = 488000000, 37 | + .link_freq_idx = 3 /* an index in link_freq_tbl[] */ 38 | + }, 39 | + { 40 | + .width = 4096, 41 | + .height = 2560, 42 | + .pixel_rate = 488000000, 43 | + .link_freq_idx = 4 /* an index in link_freq_tbl[] */ 44 | } 45 | }; 46 | 47 | -- 48 | 2.39.0 49 | 50 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0013-drivers-usb-gadget-function-uvc_configfs-Set-guid-to.patch: -------------------------------------------------------------------------------- 1 | From 2a7644d1fc2330231a4e56e543ed0c2519873f1b Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Tue, 22 Jun 2021 17:08:26 +0300 4 | Subject: [PATCH 13/50] drivers: usb: gadget: function: uvc_configfs: Set guid 5 | to "Y16" 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/usb/gadget/function/uvc_configfs.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c 13 | index 5dec2a126fd2..16ba47ee4d9b 100644 14 | --- a/drivers/usb/gadget/function/uvc_configfs.c 15 | +++ b/drivers/usb/gadget/function/uvc_configfs.c 16 | @@ -1630,7 +1630,7 @@ static struct config_group *uvcg_uncompressed_make(struct config_group *group, 17 | const char *name) 18 | { 19 | static char guid[] = { 20 | - 'Y', 'U', 'Y', '2', 0x00, 0x00, 0x10, 0x00, 21 | + 'Y', '1', '6', ' ', 0x00, 0x00, 0x10, 0x00, 22 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 23 | }; 24 | struct uvcg_uncompressed *h; 25 | -- 26 | 2.39.0 27 | 28 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0014-arch-arm64-imx8mp-adi-tof-noreg-Activate-pull-down-o.patch: -------------------------------------------------------------------------------- 1 | From a962f3519b7076d2215816374765ab39397e982b Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Wed, 7 Jul 2021 12:07:54 +0300 4 | Subject: [PATCH 14/50] arch: arm64: imx8mp-adi-tof-noreg: Activate pull-down 5 | on flash WP 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts b/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts 13 | index 28924e4bc0f9..06332e91004a 100644 14 | --- a/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts 15 | +++ b/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts 16 | @@ -1111,7 +1111,7 @@ MX8MP_IOMUXC_ECSPI2_MOSI__GPIO5_IO11 0x100 /* MOSI pin as GPIO with pull-down * 17 | 18 | pinctrl_nvram_gpio: nvram-gpio-grp { 19 | fsl,pins = < 20 | - MX8MP_IOMUXC_NAND_CE0_B__GPIO3_IO01 0x140 /* NVRAM_WP_L pin with pull-up */ 21 | + MX8MP_IOMUXC_NAND_CE0_B__GPIO3_IO01 0x100 /* NVRAM_WP_L pin with pull-down */ 22 | >; 23 | }; 24 | 25 | -- 26 | 2.39.0 27 | 28 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0019-usb-gadget-Set-lowest-allowed-speed-to-SS.patch: -------------------------------------------------------------------------------- 1 | From 5fcf2628d00c472fdee8d70afc54c750f1e11fc7 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Thu, 7 Oct 2021 16:10:47 +0300 4 | Subject: [PATCH 19/50] usb: gadget: Set lowest allowed speed to SS 5 | 6 | Signed-off-by: Bogdan Togorean 7 | --- 8 | drivers/usb/gadget/composite.c | 6 ++---- 9 | 1 file changed, 2 insertions(+), 4 deletions(-) 10 | 11 | diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c 12 | index 3ffa939678d7..ca4e3ebf5334 100644 13 | --- a/drivers/usb/gadget/composite.c 14 | +++ b/drivers/usb/gadget/composite.c 15 | @@ -722,11 +722,9 @@ static int bos_desc(struct usb_composite_dev *cdev) 16 | ss_cap->bDescriptorType = USB_DT_DEVICE_CAPABILITY; 17 | ss_cap->bDevCapabilityType = USB_SS_CAP_TYPE; 18 | ss_cap->bmAttributes = 0; /* LTM is not supported yet */ 19 | - ss_cap->wSpeedSupported = cpu_to_le16(USB_LOW_SPEED_OPERATION | 20 | - USB_FULL_SPEED_OPERATION | 21 | - USB_HIGH_SPEED_OPERATION | 22 | + ss_cap->wSpeedSupported = cpu_to_le16(USB_HIGH_SPEED_OPERATION | 23 | USB_5GBPS_OPERATION); 24 | - ss_cap->bFunctionalitySupport = USB_LOW_SPEED_OPERATION; 25 | + ss_cap->bFunctionalitySupport = 3; /* USB_SS_OPERATION */ 26 | ss_cap->bU1devExitLat = dcd_config_params.bU1devExitLat; 27 | ss_cap->bU2DevExitLat = dcd_config_params.bU2DevExitLat; 28 | } 29 | -- 30 | 2.39.0 31 | 32 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0021-arch-arm64-imx8mp-adi-tof-noreg-Increase-CMA-size.patch: -------------------------------------------------------------------------------- 1 | From aa17897e88ba1822a9046281edc198c21a8b80ab Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Mon, 8 Nov 2021 11:01:37 +0200 4 | Subject: [PATCH 21/50] arch: arm64: imx8mp-adi-tof-noreg: Increase CMA size 5 | 6 | Signed-off-by: Bogdan Togorean 7 | --- 8 | arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts | 10 ++++++++++ 9 | 1 file changed, 10 insertions(+) 10 | 11 | diff --git a/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts b/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts 12 | index a7521545f245..87d81263e6a1 100644 13 | --- a/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts 14 | +++ b/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-noreg.dts 15 | @@ -229,6 +229,16 @@ pwm: pwm-gpio { 16 | }; 17 | }; 18 | 19 | +&resmem { 20 | + linux,cma { 21 | + compatible = "shared-dma-pool"; 22 | + reusable; 23 | + size = <0 0x20000000>; 24 | + alloc-ranges = <0 0x40000000 0 0xC0000000>; 25 | + linux,cma-default; 26 | + }; 27 | +}; 28 | + 29 | &clk { 30 | init-on-array = ; 31 | }; 32 | -- 33 | 2.39.0 34 | 35 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0023-drivers-mtd-spi-nor-Add-support-for-MX25U1632F.patch: -------------------------------------------------------------------------------- 1 | From 1be949fcb78ff2c1dfab58c1a1aa63367e96ba10 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Fri, 4 Feb 2022 10:17:58 +0200 4 | Subject: [PATCH 23/50] drivers: mtd: spi-nor: Add support for MX25U1632F 5 | 6 | Signed-off-by: Bogdan Togorean 7 | --- 8 | drivers/mtd/spi-nor/macronix.c | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c 12 | index c145a09cecd1..62ba71c0e15d 100644 13 | --- a/drivers/mtd/spi-nor/macronix.c 14 | +++ b/drivers/mtd/spi-nor/macronix.c 15 | @@ -143,6 +143,7 @@ static const struct flash_info macronix_parts[] = { 16 | { "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) }, 17 | { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) }, 18 | { "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) }, 19 | + { "mx25u1632f", INFO(0xc22535, 0, 64 * 1024, 32, SECT_4K) }, 20 | { "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64, 21 | SECT_4K | SPI_NOR_DUAL_READ | 22 | SPI_NOR_QUAD_READ) }, 23 | -- 24 | 2.39.0 25 | 26 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0024-drivers-media-spi-addicmos-Fix-resolution-for-QVGA-m.patch: -------------------------------------------------------------------------------- 1 | From 73dd899a2627665665c15f3f78f113752bc00f62 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Tue, 8 Feb 2022 11:51:27 +0200 4 | Subject: [PATCH 24/50] drivers: media: spi: addicmos: Fix resolution for QVGA 5 | mode 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/media/spi/addicmos.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/drivers/media/spi/addicmos.c b/drivers/media/spi/addicmos.c 13 | index cedcde9982e6..1b22f075b845 100644 14 | --- a/drivers/media/spi/addicmos.c 15 | +++ b/drivers/media/spi/addicmos.c 16 | @@ -173,7 +173,7 @@ static const s64 link_freq_tbl[] = { 17 | static const struct addicmos_mode_info addicmos_mode_info_data[] = { 18 | { 19 | .width = 3840, 20 | - .height = 24, 21 | + .height = 216, 22 | .pixel_rate = 488000000, 23 | .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 24 | }, 25 | -- 26 | 2.39.0 27 | 28 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0025-drivers-media-addicmos-Reduce-line-width-for-QVGA-mo.patch: -------------------------------------------------------------------------------- 1 | From a3fbcdec6d155146e7e8b9bd9409866886563bf5 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Tue, 8 Feb 2022 14:46:37 +0200 4 | Subject: [PATCH 25/50] drivers: media: addicmos: Reduce line width for QVGA 5 | mode 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/media/spi/addicmos.c | 5 +++++ 10 | 1 file changed, 5 insertions(+) 11 | 12 | diff --git a/drivers/media/spi/addicmos.c b/drivers/media/spi/addicmos.c 13 | index 1b22f075b845..f93c97e9ee07 100644 14 | --- a/drivers/media/spi/addicmos.c 15 | +++ b/drivers/media/spi/addicmos.c 16 | @@ -628,6 +628,11 @@ static int addicmos_start_streaming(struct addicmos *addicmos) 17 | addicmos->curr_operating_mode); 18 | if (ret) 19 | dev_err(addicmos->dev, "Could not set mode register\n"); 20 | + /* Reduce line width only for mode 1 */ 21 | + if (addicmos->curr_operating_mode == 1) 22 | + ret = regmap_write(addicmos->regmap, 0x27e,0x8006); 23 | + else 24 | + ret = regmap_write(addicmos->regmap, 0x27e,0x0); 25 | } 26 | 27 | ret = pwm_enable(addicmos->pwm_fsync); 28 | -- 29 | 2.39.0 30 | 31 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0027-drivers-staging-media-imx8-isi-cap.c-Add-RAW8-suppor.patch: -------------------------------------------------------------------------------- 1 | From 25024fc7296e0e26f155dbcc806303c296947886 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Thu, 6 Jan 2022 13:45:38 +0200 4 | Subject: [PATCH 27/50] drivers: staging: media: imx8-isi-cap.c: Add RAW8 5 | support 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/staging/media/imx/imx8-isi-cap.c | 14 ++++++++++++++ 10 | 1 file changed, 14 insertions(+) 11 | 12 | diff --git a/drivers/staging/media/imx/imx8-isi-cap.c b/drivers/staging/media/imx/imx8-isi-cap.c 13 | index 5f02d3280408..8109a9dc35d0 100644 14 | --- a/drivers/staging/media/imx/imx8-isi-cap.c 15 | +++ b/drivers/staging/media/imx/imx8-isi-cap.c 16 | @@ -92,6 +92,14 @@ struct mxc_isi_fmt mxc_isi_out_formats[] = { 17 | .memplanes = 1, 18 | .colplanes = 1, 19 | .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12, 20 | + }, { 21 | + .name = "AB12_C4_D16I (CUSTOM)", 22 | + .fourcc = V4L2_PIX_FMT_SBGGR8, 23 | + .depth = { 8 }, 24 | + .color = MXC_ISI_OUT_FMT_RAW8, 25 | + .memplanes = 1, 26 | + .colplanes = 1, 27 | + .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8, 28 | } 29 | }; 30 | 31 | @@ -117,6 +125,12 @@ struct mxc_isi_fmt mxc_isi_src_formats[] = { 32 | .depth = { 16 }, 33 | .memplanes = 1, 34 | .colplanes = 1, 35 | + }, { 36 | + .name = "SBGGR8", 37 | + .fourcc = V4L2_PIX_FMT_SBGGR8, 38 | + .depth = { 8 }, 39 | + .memplanes = 1, 40 | + .colplanes = 1, 41 | } 42 | }; 43 | 44 | -- 45 | 2.39.0 46 | 47 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0028-drivers-usb-gadget-function-uvc_v4l2.c-Add-support-f.patch: -------------------------------------------------------------------------------- 1 | From e184b1c706b0eb2f2a6a1dd2bc895354b175dbdc Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Mon, 28 Feb 2022 11:07:06 +0200 4 | Subject: [PATCH 28/50] drivers: usb: gadget: function: uvc_v4l2.c: Add support 5 | for SBGGR8/16 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/usb/gadget/function/uvc_v4l2.c | 2 ++ 10 | 1 file changed, 2 insertions(+) 11 | 12 | diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c 13 | index 4ca89eab6159..19952ef98685 100644 14 | --- a/drivers/usb/gadget/function/uvc_v4l2.c 15 | +++ b/drivers/usb/gadget/function/uvc_v4l2.c 16 | @@ -58,6 +58,8 @@ struct uvc_format { 17 | static struct uvc_format uvc_formats[] = { 18 | { 16, V4L2_PIX_FMT_YUYV }, 19 | { 0, V4L2_PIX_FMT_MJPEG }, 20 | + { 8, V4L2_PIX_FMT_SBGGR8 }, 21 | + { 16, V4L2_PIX_FMT_SBGGR16 }, 22 | }; 23 | 24 | static int 25 | -- 26 | 2.39.0 27 | 28 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0030-Rename-control-to-ADSD.patch: -------------------------------------------------------------------------------- 1 | From c87c6ea5c5cf0c16bd11d956c4785d4b1715f0a8 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Thu, 5 May 2022 11:48:14 +0300 4 | Subject: [PATCH 30/50] Rename control to ADSD 5 | 6 | Signed-off-by: Bogdan Togorean 7 | --- 8 | include/uapi/linux/v4l2-controls.h | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h 12 | index 21e3b433856a..9119621a92fb 100644 13 | --- a/include/uapi/linux/v4l2-controls.h 14 | +++ b/include/uapi/linux/v4l2-controls.h 15 | @@ -202,7 +202,7 @@ enum v4l2_colorfx { 16 | * The base for the addicmos driver controls. 17 | * We reserve 16 controls for this driver. 18 | */ 19 | -#define V4L2_CID_USER_ADDICMOS_BASE (V4L2_CID_USER_BASE + 0x10e0) 20 | +#define V4L2_CID_USER_ADSD_BASE (V4L2_CID_USER_BASE + 0x10e0) 21 | 22 | /* MPEG-class control IDs */ 23 | /* The MPEG controls are applicable to all codec controls 24 | -- 25 | 2.39.0 26 | 27 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0032-drivers-media-spi-addicmos.c-Add-dummy-s_power-to-ke.patch: -------------------------------------------------------------------------------- 1 | From 7474b0a22aaa9cbbb7c811209103a94cb30a522e Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Thu, 10 Mar 2022 10:04:43 +0200 4 | Subject: [PATCH 32/50] drivers: media: spi: addicmos.c: Add dummy s_power to 5 | keep capture driver happy 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/media/spi/addicmos.c | 9 +++++++++ 10 | 1 file changed, 9 insertions(+) 11 | 12 | diff --git a/drivers/media/spi/addicmos.c b/drivers/media/spi/addicmos.c 13 | index f93c97e9ee07..b22928807ec7 100644 14 | --- a/drivers/media/spi/addicmos.c 15 | +++ b/drivers/media/spi/addicmos.c 16 | @@ -357,6 +357,14 @@ static int addicmos_s_register(struct v4l2_subdev *sd, 17 | } 18 | #endif 19 | 20 | +static int addicmos_s_power(struct v4l2_subdev *sd, int on) 21 | +{ 22 | + struct addicmos *addicmos = to_addicmos(sd); 23 | + 24 | + dev_dbg(addicmos->dev, "%s: %d\n", __func__, on); 25 | + return 0; 26 | +} 27 | + 28 | static int addicmos_chip_config(struct addicmos *addicmos, 29 | struct v4l2_ctrl *ctrl) 30 | { 31 | @@ -746,6 +754,7 @@ static const struct v4l2_subdev_core_ops addicmos_core_ops = { 32 | .g_register = addicmos_g_register, 33 | .s_register = addicmos_s_register, 34 | #endif 35 | + .s_power = addicmos_s_power, 36 | }; 37 | 38 | static const struct dev_pm_ops addicmos_pm_ops = { 39 | -- 40 | 2.39.0 41 | 42 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0038-drivers-media-adsd3500-Add-AB-test-resolution-suppor.patch: -------------------------------------------------------------------------------- 1 | From 81bfba423f281026d269bf0ab81b159fa2f4cb57 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Wed, 17 Aug 2022 09:58:58 +0300 4 | Subject: [PATCH 38/50] drivers: media: adsd3500: Add AB test resolution 5 | support 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/media/i2c/adsd3500.c | 7 +++++++ 10 | 1 file changed, 7 insertions(+) 11 | 12 | diff --git a/drivers/media/i2c/adsd3500.c b/drivers/media/i2c/adsd3500.c 13 | index 22e7f5e11f86..5668975bc436 100644 14 | --- a/drivers/media/i2c/adsd3500.c 15 | +++ b/drivers/media/i2c/adsd3500.c 16 | @@ -155,6 +155,13 @@ static const struct adsd3500_mode_info adsd3500_mode_info_data[] = { 17 | .code = MEDIA_BUS_FMT_SBGGR12_1X12, 18 | .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 19 | }, 20 | + { //RAW12 12BPP AB test 21 | + .width = 2048, 22 | + .height = 512, 23 | + .pixel_rate = 488000000, 24 | + .code = MEDIA_BUS_FMT_SBGGR12_1X12, 25 | + .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 26 | + }, 27 | { //RAW12 1 Phase / Frame 28 | .width = 1024, 29 | .height = 1024, 30 | -- 31 | 2.39.0 32 | 33 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0040-arch-arm64-imx8mp-adi-tof-adsd3500.dts-Disable-1P8-a.patch: -------------------------------------------------------------------------------- 1 | From 896799a0aa09f476bbd83c041dd426d5ca770a21 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Wed, 17 Aug 2022 10:14:34 +0300 4 | Subject: [PATCH 40/50] arch: arm64: imx8mp-adi-tof-adsd3500.dts: Disable 1P8 5 | and 0P8 reg 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | arch/arm64/boot/dts/freescale/imx8mp-adi-tof-adsd3500.dts | 6 ++---- 10 | 1 file changed, 2 insertions(+), 4 deletions(-) 11 | 12 | diff --git a/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-adsd3500.dts b/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-adsd3500.dts 13 | index e8c04e913ec9..9cd1d65b02b3 100644 14 | --- a/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-adsd3500.dts 15 | +++ b/arch/arm64/boot/dts/freescale/imx8mp-adi-tof-adsd3500.dts 16 | @@ -112,22 +112,20 @@ reg_vdd_0p8: regulator-vdd-0p8 { 17 | gpio = <&gpio_exp_1 7 GPIO_ACTIVE_HIGH>; 18 | startup-delay-us = <100000>; 19 | enable-active-high; 20 | - status = "okay"; 21 | + status = "disabled"; 22 | regulator-always-on; 23 | }; 24 | 25 | reg_vdd_1p8: regulator-vdd-1p8 { 26 | compatible = "regulator-fixed"; 27 | regulator-name = "VDD_1P8"; 28 | - pinctrl-names = "default"; 29 | - pingtrl-0 = <&pinctrl_vaux_en>; 30 | vin-supply = <®_v5v0>; 31 | regulator-min-microvolt = <1800000>; 32 | regulator-max-microvolt = <1800000>; 33 | gpio = <&gpio_exp_1 6 GPIO_ACTIVE_HIGH>; 34 | startup-delay-us = <100000>; 35 | enable-active-high; 36 | - status = "okay"; 37 | + status = "disabled"; 38 | regulator-always-on; 39 | }; 40 | 41 | -- 42 | 2.39.0 43 | 44 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0043-drivers-media-spi-adsd3100-Add-1-pase-mode.patch: -------------------------------------------------------------------------------- 1 | From e1e02886a4db741039bb1a5e36ec70faa43b8804 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Thu, 29 Sep 2022 13:32:58 +0300 4 | Subject: [PATCH 43/50] drivers: media: spi: adsd3100: Add 1 pase mode 5 | 6 | Signed-off-by: Bogdan Togorean 7 | --- 8 | drivers/media/spi/adsd3100.c | 6 ++++++ 9 | 1 file changed, 6 insertions(+) 10 | 11 | diff --git a/drivers/media/spi/adsd3100.c b/drivers/media/spi/adsd3100.c 12 | index da5b9fe9b961..d2177194dc47 100644 13 | --- a/drivers/media/spi/adsd3100.c 14 | +++ b/drivers/media/spi/adsd3100.c 15 | @@ -178,6 +178,12 @@ static const struct adsd3100_mode_info adsd3100_mode_info_data[] = { 16 | .pixel_rate = 488000000, 17 | .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 18 | }, 19 | + { /* 1 Phase mode for BD */ 20 | + .width = 4096, 21 | + .height = 192, 22 | + .pixel_rate = 488000000, 23 | + .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 24 | + }, 25 | { 26 | .width = 4096, 27 | .height = 256, 28 | -- 29 | 2.39.0 30 | 31 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0049-drivers-media-i2c-adsd3500.c-Add-LR-and-SR-RAW8-MP-m.patch: -------------------------------------------------------------------------------- 1 | From 0d13b39f83c5c64845ce3232ffbf5ee0d1f3791d Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Tue, 31 Jan 2023 15:43:46 +0200 4 | Subject: [PATCH 49/50] drivers: media: i2c: adsd3500.c: Add LR and SR RAW8 MP 5 | modes 6 | 7 | Signed-off-by: Bogdan Togorean 8 | --- 9 | drivers/media/i2c/adsd3500.c | 14 ++++++++++++++ 10 | 1 file changed, 14 insertions(+) 11 | 12 | diff --git a/drivers/media/i2c/adsd3500.c b/drivers/media/i2c/adsd3500.c 13 | index 3f118fd9bffb..adabf3c67340 100644 14 | --- a/drivers/media/i2c/adsd3500.c 15 | +++ b/drivers/media/i2c/adsd3500.c 16 | @@ -259,6 +259,20 @@ static const struct adsd3500_mode_info adsd3500_mode_info_data[] = { 17 | .pixel_rate = 488000000, 18 | .code = MEDIA_BUS_FMT_SBGGR12_1X12, 19 | .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 20 | + }, 21 | + { //RAW8 SR MP 2 phase + 1 AB 22 | + .width = 2048, 23 | + .height = 2560, 24 | + .pixel_rate = 488000000, 25 | + .code = MEDIA_BUS_FMT_SBGGR8_1X8, 26 | + .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 27 | + }, 28 | + { //RAW8 LR MP 3 phase + 1 AB 29 | + .width = 2048, 30 | + .height = 3328, 31 | + .pixel_rate = 488000000, 32 | + .code = MEDIA_BUS_FMT_SBGGR8_1X8, 33 | + .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 34 | } 35 | }; 36 | 37 | -- 38 | 2.39.0 39 | 40 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0050-drivers-media-i2c-adsd3500.c-Initialize-depth-bits-t.patch: -------------------------------------------------------------------------------- 1 | From 653f32d362aa855adf0e32acfa972db1af2103c3 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Thu, 16 Feb 2023 16:33:19 +0200 4 | Subject: [PATCH 50/50] drivers: media: i2c: adsd3500.c: Initialize depth bits 5 | to 0 6 | 7 | In order to keep private structure in sync with control data initialize 8 | the number of bits per depth to 0. 9 | 10 | Signed-off-by: Bogdan Togorean 11 | --- 12 | drivers/media/i2c/adsd3500.c | 2 +- 13 | 1 file changed, 1 insertion(+), 1 deletion(-) 14 | 15 | diff --git a/drivers/media/i2c/adsd3500.c b/drivers/media/i2c/adsd3500.c 16 | index adabf3c67340..aa10a8e17c74 100644 17 | --- a/drivers/media/i2c/adsd3500.c 18 | +++ b/drivers/media/i2c/adsd3500.c 19 | @@ -509,7 +509,7 @@ static const struct v4l2_ctrl_config adsd3500_ctrl_depth_bits = { 20 | .id = V4L2_CID_ADSD3500_DEPTH_BITS, 21 | .name = "Phase / Depth Bits", 22 | .type = V4L2_CTRL_TYPE_INTEGER_MENU, 23 | - .def = 4, 24 | + .def = 0, 25 | .min = 0, 26 | .max = 6, 27 | .menu_skip_mask = 0x02, 28 | -- 29 | 2.39.0 30 | 31 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0052-drivers-media-common-Added-v4l2-loopback-source-path.patch: -------------------------------------------------------------------------------- 1 | From e55eeeb755b8f7cabaa9f80bbe5f3fe840ec76f0 Mon Sep 17 00:00:00 2001 2 | From: Akshaya 3 | Date: Wed, 9 Aug 2023 10:26:24 +0530 4 | Subject: [PATCH] drivers: media: common: Added v4l2-loopback source path 5 | 6 | --- 7 | drivers/media/common/Kconfig | 1 + 8 | drivers/media/common/Makefile | 2 +- 9 | 2 files changed, 2 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/drivers/media/common/Kconfig b/drivers/media/common/Kconfig 12 | index 4ea03b7899a8..b27cf7cf1596 100644 13 | --- a/drivers/media/common/Kconfig 14 | +++ b/drivers/media/common/Kconfig 15 | @@ -22,3 +22,4 @@ source "drivers/media/common/b2c2/Kconfig" 16 | source "drivers/media/common/saa7146/Kconfig" 17 | source "drivers/media/common/siano/Kconfig" 18 | source "drivers/media/common/v4l2-tpg/Kconfig" 19 | +source "drivers/media/common/v4l2-loopback/Kconfig" 20 | diff --git a/drivers/media/common/Makefile b/drivers/media/common/Makefile 21 | index b71e4b62eea5..c1017d5f63ab 100644 22 | --- a/drivers/media/common/Makefile 23 | +++ b/drivers/media/common/Makefile 24 | @@ -1,5 +1,5 @@ 25 | # SPDX-License-Identifier: GPL-2.0-only 26 | -obj-y += b2c2/ saa7146/ siano/ v4l2-tpg/ videobuf2/ 27 | +obj-y += b2c2/ saa7146/ siano/ v4l2-tpg/ v4l2-loopback/ videobuf2/ 28 | obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o 29 | obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o 30 | obj-$(CONFIG_CYPRESS_FIRMWARE) += cypress_firmware.o 31 | -- 32 | 2.28.0 33 | 34 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0056-drivers-media-i2c-adsd3500.c-Added-RAW12-resolution.patch: -------------------------------------------------------------------------------- 1 | From 5ffbbe66d531aea5b7d0b9b994c52b16f7731a54 Mon Sep 17 00:00:00 2001 2 | From: Sivasubramaniyan Padmanaban 3 | Date: Thu, 2 Nov 2023 19:54:30 +0530 4 | Subject: [PATCH] drivers: media: i2c: adsd3500.c: Added RAW12 resolution 5 | 6 | Signed-off-by: Sivasubramaniyan Padmanaban 7 | --- 8 | drivers/media/i2c/adsd3500.c | 7 +++++++ 9 | 1 file changed, 7 insertions(+) 10 | 11 | diff --git a/drivers/media/i2c/adsd3500.c b/drivers/media/i2c/adsd3500.c 12 | index 5302ae3f1c48..e1b25b668550 100644 13 | --- a/drivers/media/i2c/adsd3500.c 14 | +++ b/drivers/media/i2c/adsd3500.c 15 | @@ -379,6 +379,13 @@ static const struct adsd3500_mode_info adsd3500_mode_info_data[] = { 16 | .code = MEDIA_BUS_FMT_SBGGR12_1X12, 17 | .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 18 | }, 19 | + { //RAW12 12BPP * 9 subframes ADSD3100 512x512x9 20 | + .width = 1024, 21 | + .height = 2304, 22 | + .pixel_rate = 488000000, 23 | + .code = MEDIA_BUS_FMT_SBGGR12_1X12, 24 | + .link_freq_idx = 0 /* an index in link_freq_tbl[] */ 25 | + }, 26 | { //RAW8 SR MP 2 phase + 1 AB 27 | .width = 2048, 28 | .height = 2560, 29 | -- 30 | 2.28.0 31 | 32 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0068-drivers-media-i2c-adsd3500.c-Update-the-pixel-format.patch: -------------------------------------------------------------------------------- 1 | From 7782f5522d5fe9acd251273356d228e31bcb513c Mon Sep 17 00:00:00 2001 2 | From: Sivasubramaniyan Padmanaban 3 | Date: Thu, 13 Mar 2025 20:19:19 +0530 4 | Subject: [PATCH 1/2] drivers: media: i2c: adsd3500.c: Update the pixel format 5 | code to support the RAW8 and RAW12 for the resolution which has the same 6 | width as well as height 7 | 8 | Signed-off-by: Sivasubramaniyan Padmanaban 9 | --- 10 | drivers/media/i2c/adsd3500.c | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | diff --git a/drivers/media/i2c/adsd3500.c b/drivers/media/i2c/adsd3500.c 14 | index 5e9122066cd4..89bc13f58f7f 100644 15 | --- a/drivers/media/i2c/adsd3500.c 16 | +++ b/drivers/media/i2c/adsd3500.c 17 | @@ -1188,7 +1188,7 @@ static int adsd3500_set_format(struct v4l2_subdev *sd, 18 | 19 | framefmt->width = crop->width; 20 | framefmt->height = crop->height; 21 | - framefmt->code = new_mode->code; 22 | + framefmt->code = format->format.code; 23 | framefmt->field = V4L2_FIELD_NONE; 24 | framefmt->colorspace = V4L2_COLORSPACE_RAW; 25 | 26 | -- 27 | 2.28.0 28 | 29 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/linux-imx/0069-drivers-media-spi-adsd3500-spi.c-resolution-with-sam.patch: -------------------------------------------------------------------------------- 1 | From e1db9f240f2f99d9d28eb2fe65157e22f4b10587 Mon Sep 17 00:00:00 2001 2 | From: Sivasubramaniyan Padmanaban 3 | Date: Thu, 13 Mar 2025 20:22:44 +0530 4 | Subject: [PATCH 2/2] drivers: media: spi: adsd3500-spi.c: resolution with same 5 | width and height should support the different pixel format 6 | 7 | Signed-off-by: Sivasubramaniyan Padmanaban 8 | --- 9 | drivers/media/spi/adsd3500-spi.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/drivers/media/spi/adsd3500-spi.c b/drivers/media/spi/adsd3500-spi.c 13 | index 3020bbe8c116..d290ab6fe719 100644 14 | --- a/drivers/media/spi/adsd3500-spi.c 15 | +++ b/drivers/media/spi/adsd3500-spi.c 16 | @@ -1318,7 +1318,7 @@ static int adsd3500_set_format(struct v4l2_subdev *sd, 17 | 18 | framefmt->width = crop->width; 19 | framefmt->height = crop->height; 20 | - framefmt->code = new_mode->code; 21 | + framefmt->code = format->format.code; 22 | framefmt->field = V4L2_FIELD_NONE; 23 | framefmt->colorspace = V4L2_COLORSPACE_RAW; 24 | 25 | -- 26 | 2.28.0 27 | 28 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/mfgtools/0001-add-imx8mp-support.patch: -------------------------------------------------------------------------------- 1 | From 7b7fb10172edf22957dda06f16574a7d90136abc Mon Sep 17 00:00:00 2001 2 | From: Rabeeh Khoury 3 | Date: Tue, 2 Feb 2021 17:56:12 +0200 4 | Subject: [PATCH] add imx8mp support 5 | 6 | Signed-off-by: Rabeeh Khoury 7 | --- 8 | libuuu/config.cpp | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/libuuu/config.cpp b/libuuu/config.cpp 12 | index edc68dd..1c6d4c4 100644 13 | --- a/libuuu/config.cpp 14 | +++ b/libuuu/config.cpp 15 | @@ -64,6 +64,7 @@ Config::Config() 16 | emplace_back(ConfigItem{"SDP:", "MX7ULP", nullptr, NXP_VID, 0x0126}); 17 | emplace_back(ConfigItem{"SDP:", "MXRT106X", nullptr, NXP_VID, 0x0135}); 18 | emplace_back(ConfigItem{"SDP:", "MX8MM", "MX8MQ", NXP_VID, 0x0134}); 19 | + emplace_back(ConfigItem{"SDP:", "MX8MP", "MX8MQ", NXP_VID, 0x0146}); 20 | emplace_back(ConfigItem{"SDP:", "MX8MQ", "MX8MQ", NXP_VID, 0x012B}); 21 | emplace_back(ConfigItem{"SDPU:", "SPL", "SPL", 0x0525, 0xB4A4, 0, 0x04FF}); 22 | emplace_back(ConfigItem{"SDPV:", "SPL1", "SPL", 0x0525, 0xB4A4, 0x0500, 0x9998}); 23 | -- 24 | 2.25.1 25 | 26 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/etc/firmware/BCM4345C0.1MW.hcd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/etc/firmware/BCM4345C0.1MW.hcd -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/etc/firmware/BCM4345C0_003.001.025.0144.0266.1MW.hcd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/etc/firmware/BCM4345C0_003.001.025.0144.0266.1MW.hcd -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/etc/firmware/CYW4345C0.1MW.hcd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/etc/firmware/CYW4345C0.1MW.hcd -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/etc/firmware/murata-master/_BCM4345C0.1MW.hcd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/etc/firmware/murata-master/_BCM4345C0.1MW.hcd -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/adi/addicmos-fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/adi/addicmos-fw.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/brcm/brcmfmac43455-sdio.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/brcm/brcmfmac43455-sdio.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/imx/sdma/sdma-imx6q.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/imx/sdma/sdma-imx6q.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/imx/sdma/sdma-imx7d.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/overlay/usr/lib/firmware/imx/sdma/sdma-imx7d.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/uboot-imx/0004-fix-name-of-dtb-file-for-i.MX8MP-HummingBoard-Pulse.patch: -------------------------------------------------------------------------------- 1 | From 4f33299c88ec3e5079ade1b7ad4c1f29e273dae6 Mon Sep 17 00:00:00 2001 2 | From: Josua Mayer 3 | Date: Sun, 1 Nov 2020 14:05:21 +0100 4 | Subject: [PATCH 04/11] fix name of dtb file for i.MX8MP HummingBoard Pulse 5 | 6 | --- 7 | configs/imx8mp_solidrun_defconfig | 2 +- 8 | include/configs/imx8mp_solidrun.h | 2 +- 9 | 2 files changed, 2 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/configs/imx8mp_solidrun_defconfig b/configs/imx8mp_solidrun_defconfig 12 | index 81d0ec39da..3d90115903 100644 13 | --- a/configs/imx8mp_solidrun_defconfig 14 | +++ b/configs/imx8mp_solidrun_defconfig 15 | @@ -27,7 +27,7 @@ CONFIG_SPL_LOAD_FIT=y 16 | CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh" 17 | CONFIG_OF_SYSTEM_SETUP=y 18 | CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mp-lpddr4.cfg" 19 | -CONFIG_DEFAULT_FDT_FILE="imx8mp-solidrun.dtb" 20 | +CONFIG_DEFAULT_FDT_FILE="imx8mp-hummingboard-pulse.dtb" 21 | CONFIG_BOARD_LATE_INIT=y 22 | CONFIG_BOARD_EARLY_INIT_F=y 23 | CONFIG_SPL_BOARD_INIT=y 24 | diff --git a/include/configs/imx8mp_solidrun.h b/include/configs/imx8mp_solidrun.h 25 | index e7206e56f7..a1e2c47dfe 100644 26 | --- a/include/configs/imx8mp_solidrun.h 27 | +++ b/include/configs/imx8mp_solidrun.h 28 | @@ -95,7 +95,7 @@ 29 | CONFIG_MFG_ENV_SETTINGS \ 30 | JAILHOUSE_ENV \ 31 | BOOTENV \ 32 | - "fdtfile=undefined\0" \ 33 | + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ 34 | "ramdisk_addr_r=0x50000000\0" \ 35 | "fdt_addr_r=0x43000000\0" \ 36 | "fdt_addr=0x43000000\0" \ 37 | -- 38 | 2.17.1 39 | 40 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/uboot-imx/0011-configs-imx8mp_solidrun_defoncifg-Set-boot-delay-to-.patch: -------------------------------------------------------------------------------- 1 | From 0dd7dee0549249b2fe4ade4774497a741387fdf3 Mon Sep 17 00:00:00 2001 2 | From: Bogdan Togorean 3 | Date: Fri, 1 Jul 2022 09:25:49 +0300 4 | Subject: [PATCH 11/11] configs: imx8mp_solidrun_defoncifg: Set boot delay to 0 5 | 6 | Signed-off-by: Bogdan Togorean 7 | --- 8 | configs/imx8mp_solidrun_defconfig | 1 + 9 | 1 file changed, 1 insertion(+) 10 | 11 | diff --git a/configs/imx8mp_solidrun_defconfig b/configs/imx8mp_solidrun_defconfig 12 | index e4eb41c316..1b60da17c7 100644 13 | --- a/configs/imx8mp_solidrun_defconfig 14 | +++ b/configs/imx8mp_solidrun_defconfig 15 | @@ -145,6 +145,7 @@ CONFIG_REGMAP=y 16 | CONFIG_SYSCON=y 17 | CONFIG_SYS_WHITE_ON_BLACK=y 18 | CONFIG_TARGET_IMX8MP_SOLIDRUN=y 19 | +CONFIG_BOOTDELAY=0 20 | CONFIG_BOOTP_BOOTPATH=y 21 | CONFIG_BOOTP_DNS=y 22 | CONFIG_BOOTP_GATEWAY=y 23 | -- 24 | 2.17.1 25 | 26 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/adi/adsd3100-fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/adi/adsd3100-fw.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/adi/adsd3500-fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/adi/adsd3500-fw.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/brcm/brcmfmac43455-sdio.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/brcm/brcmfmac43455-sdio.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/imx/sdma/sdma-imx6q.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/imx/sdma/sdma-imx6q.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/imx/sdma/sdma-imx7d.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/firmware/imx/sdma/sdma-imx7d.bin -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/adi-backup.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Analog Devices TOF backup service 3 | After=adi-tof.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/usr/share/systemd/backup_nvm_ccb.sh 8 | RemainAfterExit=yes 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/adi-tof.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Analog Devices TOF sensor service 3 | After=usb-gadget.target 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/usr/share/systemd/tof-power-en.sh 8 | RemainAfterExit=yes 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/network-gadget.path: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Enable network when path is available 3 | 4 | [Path] 5 | PathExists=/sys/kernel/config/usb_gadget/g1/functions/rndis.0 6 | Unit=network-gadget.service 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/network-gadget.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Network server service 3 | Wants=adi-tof.service usb-gadget.service 4 | ConditionPathExists=/sys/kernel/config/usb_gadget/g1/functions/rndis.0 5 | 6 | [Service] 7 | Type=exec 8 | ExecStart=/usr/share/systemd/aditof-server 9 | Restart=on-failure 10 | RestartSec=1 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/usb-gadget.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load USB gadget scheme 3 | Requires=sys-kernel-config.mount 4 | After=sys-kernel-config.mount 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/share/systemd/usb-gadget.sh start 9 | ExecStop=/usr/share/systemd/usb-gadget.sh stop 10 | RemainAfterExit=yes 11 | 12 | [Install] 13 | WantedBy=usb-gadget.target 14 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/usb-gadget.target: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: LGPL-2.1+ 2 | # 3 | # This file is part of systemd. 4 | # 5 | # systemd is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation; either version 2.1 of the License, or 8 | # (at your option) any later version. 9 | 10 | [Unit] 11 | Description=Hardware activated USB gadget 12 | Documentation=man:systemd.special(7) 13 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/uvc-gadget.path: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Enable uvc when path is available 3 | 4 | [Path] 5 | PathExists=/sys/kernel/config/usb_gadget/g1/functions/uvc.0 6 | Unit=uvc-gadget.service 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/lib/systemd/system/uvc-gadget.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=UVC application service 3 | Wants=adi-tof.service usb-gadget.service 4 | ConditionPathExists=/sys/kernel/config/usb_gadget/g1/functions/uvc.0 5 | 6 | [Service] 7 | Type=exec 8 | ExecStart=/usr/share/systemd/uvc-app 9 | Restart=on-failure 10 | RestartSec=1 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/sbin/reinit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Support parameters (via command line or kernel parameter): 4 | # ------------------------------------------------------------------------------ 5 | # reinit.mountsrc= 6 | # todo: maybe support reinit.dir (use a sub-directory in the mounted filesystem) 7 | # todo: maybe support mounttype when an explicit mountsrc is supplied 8 | # todo: add support for reinit.init=... 9 | 10 | onfail() { 11 | echo Error occurred, dropping to bash 12 | /bin/bash 13 | exit 1 14 | } 15 | trap onfail ERR 16 | 17 | echorun() { 18 | echo "$@" 19 | "$@" 20 | } 21 | mount -t proc none /proc 22 | 23 | # process kernel and passed in command-line parameters 24 | set -- $(cat /proc/cmdline) "$@" 25 | for arg in "$@"; do 26 | case "$arg" in 27 | reinit.mountsrc=*) 28 | mountsrc="${arg#reinit.mountsrc=}" 29 | ;; 30 | reinit.dir=*) 31 | dir="${arg#reinit.dir=}" 32 | echo Error: reinit.dir not supported yet 33 | onfail 34 | ;; 35 | esac 36 | done 37 | 38 | echo "reinit.mountsrc='$mountsrc'" 39 | 40 | if [[ -z "$mountsrc" ]]; then 41 | mount -t tmpfs none /media 42 | else 43 | # todo: maybe support an explicit mount type 44 | mount $mountsrc /media 45 | fi 46 | 47 | mkdir -p /media/rootfs /media/rootfs_upper /media/rootfs_work 48 | echorun mount -t overlay overlay /media/rootfs -o lowerdir=/,upperdir=/media/rootfs_upper,workdir=/media/rootfs_work 49 | 50 | mkdir -p /media/rootfs/oldroot 51 | cd /media/rootfs 52 | pivot_root . oldroot 53 | exec /sbin/init 54 | echo Error: reinit: exec /sbin/init failed 55 | onfail 56 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/backup_nvm_ccb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | nvm_size=741376 3 | sleep 15 4 | BOARD=$(strings /proc/device-tree/model) 5 | echo ${BOARD} 6 | if [[ $BOARD == "NXP i.MX8MPlus ADI TOF carrier + ADSD3500" ]]; then 7 | echo "Current platform is ADTF3175D" 8 | nvm="ADTF3175D.nvm" 9 | ccb="ADTF3175D.ccb" 10 | echo "nvm: ${nvm} and ccb: ${ccb}" 11 | else 12 | echo "Current platform is ADSD3030" 13 | nvm="ADSD3030.nvm" 14 | ccb="ADSD3030.ccb" 15 | echo "nvm: ${nvm} and ccb: ${ccb}" 16 | fi 17 | 18 | if [ -d "/boot" ]; then 19 | if [ ! -s "/boot/${nvm}" ]; then 20 | echo "Backup NVM_Flash image to /boot" 21 | chmod +x /home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_READ 22 | /home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_READ /boot/${nvm} 23 | else 24 | a=$(wc -c < "/boot/${nvm}") 25 | if [ $a != $nvm_size ]; then 26 | echo "Backup NVM_Flash image to /boot" 27 | chmod +x /home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_READ 28 | /home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_READ /boot/${nvm} 29 | fi 30 | 31 | fi 32 | if [ ! -s "/boot/${ccb}" ]; then 33 | echo "Backup CCB to /boot" 34 | chmod +x /home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/CCB_READ 35 | /home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/CCB_READ /boot/${ccb} 36 | fi 37 | fi 38 | 39 | chown -R analog:analog /home/analog/Workspace -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/etc/fstab: -------------------------------------------------------------------------------- 1 | # /etc/fstab: static file system information. 2 | # 3 | # Use 'blkid' to print the universally unique identifier for a device; this may 4 | # be used with UUID= as a more robust way to name devices that works even if 5 | # disks are added and removed. See fstab(5). 6 | # 7 | # 8 | /dev/mmcblk1p1 /boot vfat defaults,noatime 0 2 9 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/etc/modprobe.d/blacklist-tof.conf: -------------------------------------------------------------------------------- 1 | blacklist adsd3100 2 | blacklist imx8_media_dev 3 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/etc/systemd/network/20-wired-usb0.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Name=usb0 3 | 4 | [Network] 5 | #DHCP=yes 6 | Address=10.43.0.1/24 7 | DHCPServer=true 8 | IPMasquerade=true 9 | 10 | [DHCPServer] 11 | PoolOffset=100 12 | PoolSize=20 13 | EmitDNS=no 14 | EmitRouter=no 15 | 16 | [Link] 17 | MTUBytes=15000 18 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/etc/systemd/network/25-wired-eth0.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Name=eth0 3 | 4 | [Network] 5 | DHCP=yes 6 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/etc/systemd/network/30-wireless-wlan0.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Name=wlan0 3 | 4 | [Network] 5 | DHCP=yes 6 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/etc/systemd/resolved.conf: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # Entries in this file show the compile time defaults. 9 | # You can change settings by editing this file. 10 | # Defaults can be restored by simply deleting this file. 11 | # 12 | # See resolved.conf(5) for details 13 | 14 | [Resolve] 15 | #DNS= 16 | #FallbackDNS= 17 | #Domains= 18 | #LLMNR=no 19 | MulticastDNS=no 20 | #DNSSEC=no 21 | #Cache=yes 22 | #DNSStubListener=yes 23 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/Firmware_update_utility/Firmware_Update: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/Firmware_update_utility/Firmware_Update -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/Firmware_update_utility/README.txt: -------------------------------------------------------------------------------- 1 | 1). Steps to follow on windows machine and copy the below files to NXP host platform using Winscp application 2 |     -> Download and Install WinSCP 3 |     -> Open WinScp  4 |     -> Host Name (or IP Address) : 10.43.0.1 5 |     -> NXP Username : analog ; Password : analog 6 |     -> Copy the below listed folder from Package to /home/analog/Workspace/ 7 |         - Firmware_update_utilities 8 | 9 | -> Copy the directory from Host PC to NXP Host. (Alternate method instead of Winscp) 10 | 11 | $ pscp -P 22 -l analog -pw analog -r Firmware_update_utilities analog@10.43.0.1:/home/analog/Workspace 12 | 13 | 2). SSH into NXP platform 14 |     -> SSH with Putty example 15 |     -> Host Name (or IP Address) : 10.43.0.1 ; Port 22 ; SSH 16 |     -> NXP Username : analog 17 | Password : analog 18 | 19 | $ cd Firmware_update_utility 20 | 21 | 22 | 4) Firmware_update executable will be available at this path and it takes one argument that is the adsd3500 Fw_update_x.x.x.x.bin. 23 | 24 | Note: 25 | i) Copy the latest Fw_Update_X.X.X.bin file to Firmware_update_utility. 26 | ii) Below mentioned file, which is passed as an argument to executable file is just an example bin file. 27 | 28 | $ sudo ./firmware_update Fw_Update_x.x.x.bin 29 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adi-adsd3500-reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #ADSD3500 Reset Pin 4 | if [ ! -d /sys/class/gpio/gpio122 ] 5 | then 6 | echo 122 > /sys/class/gpio/export 7 | echo out > /sys/class/gpio/gpio122/direction 8 | fi 9 | 10 | echo 0 > /sys/class/gpio/gpio122/value 11 | 12 | sleep 1 13 | 14 | echo 1 > /sys/class/gpio/gpio122/value 15 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adi-enable-wifi.sh: -------------------------------------------------------------------------------- 1 | if [ "$#" -eq 2 ]; then 2 | wpa_passphrase $1 $2 | sudo tee /etc/wpa_supplicant/wpa_supplicant-wlan0.conf 3 | sudo systemctl enable wpa_supplicant@wlan0 4 | sudo reboot 5 | fi 6 | 7 | echo "$0 " 8 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adi-ram-disk.sh: -------------------------------------------------------------------------------- 1 | sudo mkdir /mnt/ramdisk 2> /dev/null 2 | sudo mount -t tmpfs -o rw,size=1G tmpfs /mnt/ramdisk 3 | df -h | grep ramdisk 4 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adi-stop-network-server.sh: -------------------------------------------------------------------------------- 1 | sudo systemctl stop network-gadget 2 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adi-time-manual.sh: -------------------------------------------------------------------------------- 1 | echo "Reference: https://www.cyberciti.biz/faq/howto-set-date-time-from-linux-command-prompt/ 2 | 3 | To change both the date and time, use the following syntax 4 | ========================================================== 5 | 6 | $ timedatectl set-time YYYY-MM-DD HH:MM:SS 7 | 8 | Where, 9 | 10 | HH : An hour. 11 | MM : A minute. 12 | SS : A second, all typed in two-digit form. 13 | YYYY: A four-digit year. 14 | MM : A two-digit month. 15 | DD: A two-digit day of the month. 16 | 17 | For example, set the date ’23rd Nov 2015′ and time to ‘8:10:40 am’, enter: 18 | 19 | $ timedatectl set-time '2015-11-23 08:10:40' 20 | $ date 21 | 22 | How do I set the time zone using timedatectl command? 23 | ===================================================== 24 | 25 | To see list all available time zones, enter: 26 | $ timedatectl list-timezones 27 | $ timedatectl list-timezones | more 28 | $ timedatectl list-timezones | grep -i asia 29 | $ timedatectl list-timezones | grep America/New 30 | 31 | To set the time zone to ‘Asia/Kolkata’, enter: 32 | $ timedatectl set-timezone 'Asia/Kolkata'" 33 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adi-time-network.sh: -------------------------------------------------------------------------------- 1 | if nc -zw1 google.com 443; then 2 | echo "Network avaialble, setting up network time sync." 3 | sudo timedatectl set-ntp yes 4 | else 5 | echo "Network not aviailable." 6 | fi 7 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adi-vscode-ssh.sh: -------------------------------------------------------------------------------- 1 | ssh-keygen -t ed25519 2 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADSD3030/new/get_frame_RAW8_16D_16AB_8C_ADSD3030_mode0.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=0 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2560,height=640,pixelformat=BA81 --stream-mmap --stream-to=mode0.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADSD3030/new/get_frame_RAW8_16D_16AB_8C_ADSD3030_mode1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=1 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2560,height=640,pixelformat=BA81 --stream-mmap --stream-to=mode1.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADSD3030/new/get_frame_RAW8_16D_16AB_8C_ADSD3030_mode2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=2 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=320,pixelformat=BA81 --stream-mmap --stream-to=mode2.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADSD3030/new/get_frame_RAW8_16D_16AB_8C_ADSD3030_mode3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=3 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=320,pixelformat=BA81 --stream-mmap --stream-to=mode3.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADSD3030/new/get_frame_RAW8_16D_16AB_8C_ADSD3030_mode5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=5 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=320,pixelformat=BA81 --stream-mmap --stream-to=mode5.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADSD3030/new/get_frame_RAW8_16D_16AB_8C_ADSD3030_mode6.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=6 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=1280,height=320,pixelformat=BA81 --stream-mmap --stream-to=mode6.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADTF3175D/new/get_frame_RAW8_12P_16AB_ADTF3175D_mode0.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=0 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=4 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=0 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=0 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=0 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2048,height=2560,pixelformat=BA81 --stream-mmap --stream-to=mode0.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADTF3175D/new/get_frame_RAW8_12P_16AB_ADTF3175D_mode1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=1 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=4 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=0 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=0 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=0 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2048,height=3328,pixelformat=BA81 --stream-mmap --stream-to=mode1.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADTF3175D/new/get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=2 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2560,height=512,pixelformat=BA81 --stream-mmap --stream-to=mode2.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADTF3175D/new/get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=3 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2560,height=512,pixelformat=BA81 --stream-mmap --stream-to=mode3.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADTF3175D/new/get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=5 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2560,height=512,pixelformat=BA81 --stream-mmap --stream-to=mode5.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/adsd3500_getframe/ADTF3175D/new/get_frame_RAW8_16D_16AB_8C_ADTF3175D_mode6.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nr_frames=${1:-1} 4 | 5 | v4l2-ctl --set-ctrl=operating_mode=6 -d /dev/v4l-subdev1 6 | v4l2-ctl --set-ctrl=phase_depth_bits=6 -d /dev/v4l-subdev1 7 | v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev1 8 | v4l2-ctl --set-ctrl=confidence_bits=2 -d /dev/v4l-subdev1 9 | v4l2-ctl --set-ctrl=ab_averaging=1 -d /dev/v4l-subdev1 10 | v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev1 11 | v4l2-ctl --device /dev/video0 --set-fmt-video=width=2560,height=512,pixelformat=BA81 --stream-mmap --stream-to=mode6.bin --stream-count=$nr_frames 12 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/ctrl_app/ctrl_app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/ctrl_app/ctrl_app -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/ctrl_app/infile.txt: -------------------------------------------------------------------------------- 1 | R 01 12 2 | R 00 20 3 | W 00 19 00 00 4 | R AD 00 2C 05 00 00 00 00 31 00 00 00 01 00 00 00 5 | W AD 00 00 10 00 00 00 00 10 00 00 00 01 00 00 00 6 | R 01 12 -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/ctrl_app/readme.md: -------------------------------------------------------------------------------- 1 | # ctrl_app 2 | 3 | ### Overview 4 | ADSD3500 driver accept commands from user-space through V4L2 controls. This application interract directly with "chip_config" control and can send simple or burst commands to ADSD3500. 5 | 6 | #### Building the application 7 | g++ -o ctrl_app ctrl_app.cpp 8 | 9 | #### Input arguments 10 | ctrl_app take only one argument as input, the name of the input file containing the commands list "infile.txt" 11 | 12 | #### Example command to run ctrl_app 13 | ./ctrl_app infile.txt 14 | (Assuming both ctrl_app and infile.txt are in current working directory.) 15 | 16 | #### Example input commands in infile.txt 17 | First letter on each row of infile.txt define the transfer type. 18 | 19 | | Transfer | Description | 20 | | --------- | ----------- | 21 | | R | Read transfer. Will retrieve the response from ADSD3500 for command number sent after R | 22 | | W | Write transfer. Will send write data command to ADSD3500 | 23 | 24 | 25 | | Example | Description | 26 | | --------- | ----------- | 27 | | R 01 12 | Read CHIP ID (simple command) | 28 | | R 00 20 | Get system status (simple command) | 29 | | W 00 19 00 00 | Switch to burst mode. All commands following this will have to be sent in burst mode format (simple command) | 30 | | R AD 00 2C 05 00 00 00 00 31 00 00 00 01 00 00 00 | Get Firmware version and commit ID returns 44 bytes, first 4 bytes Fw version (burst command) | 31 | | W AD 00 00 10 00 00 00 00 10 00 00 00 00 00 00 00 | Switch to simple mode. All commands following this will have to be sent in simple mode format (burst command) | 32 | | R 01 12 | Read CHIP ID (simple command) | 33 | 34 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/CCB_READ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/CCB_READ -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/CFG_READ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/CFG_READ -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/INIT_FW_WRITE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/INIT_FW_WRITE -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_READ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_READ -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_WRITE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/NVM_Utils/NVM_WRITE -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/host_boot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Remove adsd driver 4 | sudo rmmod imx8_media_dev 5 | sudo rmmod adsd3500 6 | 7 | BOARD=$(strings /proc/device-tree/model) 8 | 9 | case $BOARD in 10 | "NXP i.MX8MPlus ADI TOF carrier + ADSD3500") 11 | echo "Running on ADSD3500 + ADSD3100" 12 | NVM_GPIO='gpio507' 13 | ;; 14 | "NXP i.MX8MPlus ADI TOF carrier + ADSD3030") 15 | echo "Running on ADSD3500 + ADSD3030" 16 | NVM_GPIO='gpio492' 17 | ;; 18 | *) 19 | echo "Board model not valid" 20 | exit 1 21 | ;; 22 | esac 23 | 24 | # Make i2c-* devices accessible by normal user 25 | sudo chmod a+rw /dev/i2c-* 26 | 27 | # Select interposer Flash memory to force hostboot 28 | echo 1 | sudo tee /sys/class/gpio/$NVM_GPIO/value > /dev/null 29 | 30 | # Reset ADSD3500 31 | echo "Reset ADSD3500" 32 | echo 0 | sudo tee /sys/class/gpio/gpio122/value > /dev/null 33 | sleep 0.5 34 | echo 1 | sudo tee /sys/class/gpio/gpio122/value > /dev/null 35 | 36 | # Wait for ADSD3500 to boot 37 | echo "Waiting for ADSD3500 to boot" 38 | echo "It can take up to 30 seconds" 39 | 40 | while [[ $(i2cdetect -y 1 | grep 38) == "" ]] 41 | do 42 | sleep 1 43 | done 44 | #Install smbus2 module 45 | pip install smbus2-0.4.2-py2.py3-none-any.whl > /dev/null 2>&1 46 | 47 | 48 | # Run hostboot script 49 | python3 host_boot.py host_boot.stream 50 | 51 | # Select back the imager flash memory 52 | echo 0 | sudo tee /sys/class/gpio/$NVM_GPIO/value > /dev/null 53 | 54 | sleep 2 55 | 56 | # Read chip ID to check correct hostboot 57 | python3 read_chip_id.py 58 | 59 | # Reload ADSD3500 driver 60 | sudo modprobe adsd3500 61 | sudo modprobe imx8_media_dev 62 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/host_boot.stream: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/host_boot.stream -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/read_chip_id.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from enum import Enum 3 | from smbus2 import SMBus, i2c_msg 4 | import binascii 5 | 6 | # Select the I2C address of the ADSD3500. 7 | address = 0x38 8 | 9 | # Select the I2C buss number of the ADSD3500. 10 | bus_no = 1 11 | 12 | if len(sys.argv) > 1: 13 | if len(sys.argv) == 2: 14 | bus_no = int(sys.argv[1], 0) 15 | if len(sys.argv) == 3: 16 | address = int(sys.argv[2], 0) 17 | 18 | # Open a handle to "/dev/i2c-2", representing the I2C bus. 19 | bus = SMBus(bus_no) 20 | 21 | # Write CHIP ID read command 22 | msg = i2c_msg.write(address, [0x01, 0x12]) 23 | bus.i2c_rdwr(msg) 24 | 25 | #Get back the response 26 | msg = i2c_msg.read(address, 2) 27 | bus.i2c_rdwr(msg) 28 | data = list(msg) 29 | 30 | print([hex(x) for x in data]) 31 | 32 | if (data[0] == 0x59) and (data[1] == 0x31): 33 | print("CHIP_ID is correct. Identified ADSD3500 on bus %d at address 0x%x" % (bus_no, address)) 34 | else: 35 | print("Wrong CHIP_ID") 36 | 37 | bus.close() 38 | -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/readme.md: -------------------------------------------------------------------------------- 1 | Host-boot ADSD3500 2 | 3 | ATTENTION! host_boot.py require direct access to ADSD3500 I2C device. Make sure that adsd3500 driver is not loaded and ADSD3500 is visible on i2c bus (i2cdetect). 4 | 5 | 1. The host_boot.py script loads the ADSD3500 boot firmware through I2C 6 | ADSD3500 contain a BootROM bootloader which makes possible this host-boot usecase 7 | 2. Run ./host_boot.sh host_boot.stream to host boot the connected device. -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/smbus2-0.4.2-py2.py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analogdevicesinc/ToF/7b19e7a297760a4b7ebdbfa916108507a3a57ec5/sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/analog/Workspace/Tools/host_boot_tools/smbus2-0.4.2-py2.py3-none-any.whl -------------------------------------------------------------------------------- /sdcard-images-utils/nxp/patches/ubuntu_overlay/step3/home/bashrc_extension: -------------------------------------------------------------------------------- 1 | rsz() { 2 | if [[ -t 0 && $# -eq 0 ]];then 3 | local IFS='[;' escape geometry x y 4 | echo -ne '\e7\e[r\e[999;999H\e[6n\e8' 5 | read -t 5 -sd R escape geometry || { 6 | echo unsupported terminal emulator. >&2 7 | return 1 8 | } 9 | x="${geometry##*;}" y="${geometry%%;*}" 10 | if [[ ${COLUMNS} -eq "${x}" && ${LINES} -eq "${y}" ]];then 11 | echo "${TERM} ${x}x${y}" 12 | elif [[ "$x" -gt 0 && "$y" -gt 0 ]];then 13 | echo "${COLUMNS}x${LINES} -> ${x}x${y}" 14 | stty cols ${x} rows ${y} 15 | else 16 | echo unsupported terminal emulator. >&2 17 | return 1 18 | fi 19 | else 20 | echo 'Usage: rsz' 21 | fi 22 | } 23 | rsz -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(tools) 3 | 4 | if (ON_TARGET) 5 | add_subdirectory(nvm_tools) 6 | endif() 7 | 8 | add_subdirectory(software_check) 9 | 10 | include(GNUInstallDirs) 11 | -------------------------------------------------------------------------------- /tools/debug_apps/ctrl_app/infile.txt: -------------------------------------------------------------------------------- 1 | R 01 12 2 | R 00 20 3 | W 00 19 00 00 4 | R AD 00 2C 05 00 00 00 00 31 00 00 00 01 00 00 00 5 | W AD 00 00 10 00 00 00 00 10 00 00 00 01 00 00 00 6 | R 01 12 -------------------------------------------------------------------------------- /tools/debug_apps/ctrl_app/readme.md: -------------------------------------------------------------------------------- 1 | # ctrl_app 2 | 3 | ### Overview 4 | ADSD3500 driver accept commands from user-space through V4L2 controls. This application interract directly with "chip_config" control and can send simple or burst commands to ADSD3500. 5 | 6 | #### Building the application 7 | g++ -o ctrl_app ctrl_app.cpp 8 | 9 | #### Input arguments 10 | ctrl_app take only one argument as input, the name of the input file containing the commands list "infile.txt" 11 | 12 | #### Example command to run ctrl_app 13 | ./ctrl_app infile.txt 14 | (Assuming both ctrl_app and infile.txt are in current working directory.) 15 | 16 | #### Example input commands in infile.txt 17 | First letter on each row of infile.txt define the transfer type. 18 | 19 | | Transfer | Description | 20 | | --------- | ----------- | 21 | | R | Read transfer. Will retrieve the response from ADSD3500 for command number sent after R | 22 | | W | Write transfer. Will send write data command to ADSD3500 | 23 | 24 | 25 | | Example | Description | 26 | | --------- | ----------- | 27 | | R 01 12 | Read CHIP ID (simple command) | 28 | | R 00 20 | Get system status (simple command) | 29 | | W 00 19 00 00 | Switch to burst mode. All commands following this will have to be sent in burst mode format (simple command) | 30 | | R AD 00 2C 05 00 00 00 00 31 00 00 00 01 00 00 00 | Get Firmware version and commit ID returns 44 bytes, first 4 bytes Fw version (burst command) | 31 | | W AD 00 00 10 00 00 00 00 10 00 00 00 00 00 00 00 | Switch to simple mode. All commands following this will have to be sent in simple mode format (burst command) | 32 | | R 01 12 | Read CHIP ID (simple command) | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tools/debug_apps/readme.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | ADSD3500 debugging apps 4 | #### Directory Structure 5 | | Directory | Description | 6 | | --------- | ----------- | 7 | | ctrl_app | Application to interract through V4L2 with ADSD3500 host protocol | 8 | 9 | -------------------------------------------------------------------------------- /tools/misc/README.md: -------------------------------------------------------------------------------- 1 | # Raw File Parser Example 2 | 3 | ### Overview 4 | This example takes raw file as an input and extracts the depth, absolute brightness confidence and point cloud data. 5 | depth frame, AB frame and confidence frame(if qmp mode) are saved as `.png` while point cloud data is saved as `.ply` 6 | An `.mp4` file is also generated showing both AB and depth frames. 7 | metadata is saved as a text file. 8 | 9 | Usage: 10 | - put raw recording files in the same directory of the `rawparser.py` 11 | - run `python rawparser.py --filename [RAW_RECORDING_FILENAME]` 12 | 13 | A folder with the same name as the raw recording file will be created 14 | first point cloud frame 3d image will be visualized. Close the visualize window to proceed saving all data 15 | `.png` files for each frame of AB, Depth and confidence data will be found in the folder created 16 | 17 | ### Dependencies 18 | ``` 19 | pip install opencv-python 20 | pip install numpy 21 | pip install open3d 22 | pip install argparse 23 | ``` 24 | -------------------------------------------------------------------------------- /tools/nvm_tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(nvm_tools) 3 | 4 | add_subdirectory(fw_upgrade) 5 | add_subdirectory(nvm_write) 6 | 7 | -------------------------------------------------------------------------------- /tools/nvm_tools/fw_upgrade/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(fw_upgrade) 3 | 4 | set(NVM_COMMON ../common) 5 | 6 | include_directories( 7 | ${NVM_COMMON} 8 | ) 9 | 10 | set(SOURCES 11 | ${NVM_COMMON}/nvm_tools_common.cpp 12 | ) 13 | 14 | add_executable(${PROJECT_NAME} fw_upgrade.cpp ${SOURCES}) 15 | target_link_libraries(${PROJECT_NAME} PRIVATE crc32) 16 | -------------------------------------------------------------------------------- /tools/nvm_tools/nvm_write/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(nvm_write) 3 | 4 | set(NVM_COMMON ../common) 5 | 6 | include_directories( 7 | ${NVM_COMMON} 8 | ) 9 | 10 | set(SOURCES 11 | ${NVM_COMMON}/nvm_tools_common.cpp 12 | ) 13 | 14 | add_executable(${PROJECT_NAME} nvm_write.cpp ${SOURCES}) 15 | target_link_libraries(${PROJECT_NAME} PRIVATE crc32) 16 | -------------------------------------------------------------------------------- /tools/readme.md: -------------------------------------------------------------------------------- 1 | # 3D Time of Flight : Tools 2 | 3 | The tools in this directory provide additional functionalities such as calibrating the TOF camera. 4 | 5 | #### List of Tools 6 | 7 | | Name | Description | 8 | | --------- | -------------- | 9 | | debug-apps | ADSD3500 debug applications | 10 | | nvm_tools | ADSD3500 applications to interract with the NVM memory | 11 | | tof_lib_gen | Generate tof dpkg library for Ubuntu 18.04, Ubuntu 20.04 and Ubuntu 22.04 AMD64 for ros2 wrappers | 12 | -------------------------------------------------------------------------------- /tools/software_check/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(software_check) 3 | 4 | add_executable(${PROJECT_NAME} software_check.cpp ${SOURCES}) 5 | 6 | set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17) 7 | 8 | set(DEPENDENCIES_DIR ../../dependencies/third-party/) 9 | set(SDK_DIR ../../libaditof/sdk/include) 10 | 11 | include_directories( 12 | ${DEPENDENCIES_DIR} 13 | ${SDK_DIR} 14 | ) 15 | 16 | 17 | add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD 18 | COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/libaditof/sdk/" $/. 19 | COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/sw_versions.info" $/. 20 | ) 21 | 22 | 23 | target_link_libraries(${PROJECT_NAME} PRIVATE aditof cjson) -------------------------------------------------------------------------------- /tools/software_check/sw_versions.info: -------------------------------------------------------------------------------- 1 | { 2 | "firmware": "4.2.4.0", 3 | "firmwarehash": "5ecd368683f2b49f6af7c872deaf04d5696206c4", 4 | "sdcard": "microsd-4.2.0-b260ad46.img", 5 | "package-sdk": "4.2.0", 6 | "branch": "HEAD", 7 | "commit": "b260ad46" 8 | } -------------------------------------------------------------------------------- /tools/tof_lib_gen/generate_dpkg.bash: -------------------------------------------------------------------------------- 1 | # Generating dpkg for Crosby 2 | echo "Generating dpkg for Ubuntu 20.04 Amd64" 3 | sudo DOCKER_BUILDKIT=1 docker build --no-cache --file ubuntu_20_04/crosby/Dockerfile --output crosby/out_ubuntu20 . 4 | echo "Generating dpkg for Ubuntu 22.04 Amd64" 5 | sudo DOCKER_BUILDKIT=1 docker build --no-cache --file ubuntu_22_04/crosby/Dockerfile --output crosby/out_ubuntu22 . 6 | 7 | # enabling read and write 8 | sudo chmod -R a+rx crosby 9 | 10 | # # Generating dpkg for adsd3030 (adsd3030) 11 | echo "Generating dpkg for Ubuntu 20.04 Amd64" 12 | sudo DOCKER_BUILDKIT=1 docker build --no-cache --file ubuntu_20_04/adsd3030/Dockerfile --output adsd3030/out_ubuntu20 . 13 | echo "Generating dpkg for Ubuntu 22.04 Amd64" 14 | sudo DOCKER_BUILDKIT=1 docker build --no-cache --file ubuntu_22_04/adsd3030/Dockerfile --output adsd3030/out_ubuntu22 . 15 | 16 | sudo chmod -R a+rx adsd3030 17 | --------------------------------------------------------------------------------