Closed acehoss closed 7 months ago
The px_uploader.py
script fails silently if the current user can't access the serial port.
sudo usermod -a -G dialout $USER
Logout and log back in and make ark_fmu-v6x upload
succeeds. However, flash_px4.sh
doesn't work:
jetson@ark-orin-drone:~/git/PX4-Autopilot$ flash_px4.sh build/ark_fmu-v6x_default/ark_fmu-v6x_default.bin
Flashing firmware: build/ark_fmu-v6x_default/ark_fmu-v6x_default.bin
/dev/ttyACM0
WARNING: Carrier board is not from a Jetson Developer Kit.
WARNNIG: Jetson.GPIO library has not been verified with this carrier board,
WARNING: and in fact is unlikely to work correctly.
Resetting Flight Controller!
Waiting for bootloader...
Found board id: 57,0 bootloader version: 5 on /dev/ttyACM0
Traceback (most recent call last):
File "/usr/bin/px_uploader.py", line 954, in <module>
main()
File "/usr/bin/px_uploader.py", line 910, in main
up.upload(args.firmware, force=args.force, boot_delay=args.boot_delay)
File "/usr/bin/px_uploader.py", line 589, in upload
fw = firmware(file)
File "/usr/bin/px_uploader.py", line 146, in __init__
self.desc = json.load(f)
File "/usr/lib/python3.8/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 0: invalid continuation byte
I'm good with the make ark_fmu-v6x upload
approach, but wanted to give you feedback on the flash_px4.sh
approach since it's in your documentation. Not sure what the difference is there because /usr/bin/px_uploader.py
is identical to the version in PX4-Firmware/Tools
used by make
.
Can you try pulling current main and re-running the setup.sh script? Then try the flash_px4.sh again.
Pulled and reran setup.sh
, then tried to flash. Got the same error again.
jetson@ark-orin-drone:~/git/ark_jetson_scripts$ git pull
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 27 (delta 4), reused 22 (delta 4), pack-reused 0
Unpacking objects: 100% (27/27), 4.98 KiB | 1019.00 KiB/s, done.
From https://github.com/ARK-Electronics/ark_jetson_scripts
3259af3..eb52439 main -> origin/main
Updating 3259af3..eb52439
Fast-forward
.gitignore | 2 +
README.md | 12 ++-
99-gpio.rules => jetson/99-gpio.rules | 0
main.conf => jetson/main.conf | 0
{scripts => jetson/scripts}/flash_px4.sh | 0
{scripts => jetson/scripts}/get_serial_number.py | 0
{scripts => jetson/scripts}/mavlink_shell.py | 0
{scripts => jetson/scripts}/pcie_set_speed.sh | 0
{scripts => jetson/scripts}/px4_shell_command.py | 0
{scripts => jetson/scripts}/px_uploader.py | 0
{scripts => jetson/scripts}/reset_fmu_fast.py | 0
{scripts => jetson/scripts}/reset_fmu_wait_bl.py | 0
{scripts => jetson/scripts}/start_can_interface.sh | 0
{scripts => jetson/scripts}/start_mavlink_router.sh | 0
{scripts => jetson/scripts}/stop_can_interface.sh | 0
{scripts => jetson/scripts}/vbus_disable.py | 0
{scripts => jetson/scripts}/vbus_enable.py | 0
{services => jetson/services}/dds-agent.service | 0
{services => jetson/services}/jetson-can.service | 0
{services => jetson/services}/jetson-clocks.service | 0
{services => jetson/services}/logloader.service | 5 +-
{services => jetson/services}/mavlink-router.service | 0
pi/main.conf | 26 +++++
pi/scripts/flash_px4.sh | 24 +++++
pi/scripts/mavlink_shell.py | 246 ++++++++++++++++++++++++++++++++++++++++++++++++
pi/scripts/px4_shell_command.py | 134 ++++++++++++++++++++++++++
pi/scripts/px_uploader.py | 956 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pi/scripts/reset_fmu_fast.py | 51 ++++++++++
pi/scripts/reset_fmu_wait_bl.py | 50 ++++++++++
pi/scripts/start_mavlink_router.sh | 10 ++
pi/scripts/vbus_disable.py | 40 ++++++++
pi/scripts/vbus_enable.py | 40 ++++++++
pi/services/dds-agent.service | 14 +++
pi/services/logloader.service | 16 ++++
pi/services/mavlink-router.service | 13 +++
setup.sh | 185 ++++++++++++++++++++++++++----------
36 files changed, 1769 insertions(+), 55 deletions(-)
create mode 100644 .gitignore
rename 99-gpio.rules => jetson/99-gpio.rules (100%)
rename main.conf => jetson/main.conf (100%)
rename {scripts => jetson/scripts}/flash_px4.sh (100%)
rename {scripts => jetson/scripts}/get_serial_number.py (100%)
rename {scripts => jetson/scripts}/mavlink_shell.py (100%)
rename {scripts => jetson/scripts}/pcie_set_speed.sh (100%)
rename {scripts => jetson/scripts}/px4_shell_command.py (100%)
rename {scripts => jetson/scripts}/px_uploader.py (100%)
rename {scripts => jetson/scripts}/reset_fmu_fast.py (100%)
rename {scripts => jetson/scripts}/reset_fmu_wait_bl.py (100%)
rename {scripts => jetson/scripts}/start_can_interface.sh (100%)
rename {scripts => jetson/scripts}/start_mavlink_router.sh (100%)
rename {scripts => jetson/scripts}/stop_can_interface.sh (100%)
rename {scripts => jetson/scripts}/vbus_disable.py (100%)
rename {scripts => jetson/scripts}/vbus_enable.py (100%)
rename {services => jetson/services}/dds-agent.service (100%)
rename {services => jetson/services}/jetson-can.service (100%)
rename {services => jetson/services}/jetson-clocks.service (100%)
rename {services => jetson/services}/logloader.service (77%)
rename {services => jetson/services}/mavlink-router.service (100%)
create mode 100644 pi/main.conf
create mode 100755 pi/scripts/flash_px4.sh
create mode 100755 pi/scripts/mavlink_shell.py
create mode 100755 pi/scripts/px4_shell_command.py
create mode 100755 pi/scripts/px_uploader.py
create mode 100755 pi/scripts/reset_fmu_fast.py
create mode 100755 pi/scripts/reset_fmu_wait_bl.py
create mode 100755 pi/scripts/start_mavlink_router.sh
create mode 100755 pi/scripts/vbus_disable.py
create mode 100755 pi/scripts/vbus_enable.py
create mode 100644 pi/services/dds-agent.service
create mode 100644 pi/services/logloader.service
create mode 100644 pi/services/mavlink-router.service
jetson@ark-orin-drone:~/git/ark_jetson_scripts$ sudo ./setup.sh
[sudo] password for jetson:
Do you want to install micro-xrce-dds-agent? (y/n)
y
Do you want to install logloader? (y/n)
y
Please enter your email:
redacted
Do you want to auto upload to PX4 Flight Review? (y/n)
y
Do you want your logs to be public? (y/n)
y
Linux ark-orin-drone 5.10.192-tegra #2 SMP PREEMPT Wed Apr 3 23:10:29 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
Hit:1 https://repo.download.nvidia.com/jetson/common r35.5 InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:3 https://repo.download.nvidia.com/jetson/t234 r35.5 InRelease
Hit:4 https://www.synaptics.com/sites/default/files/Ubuntu stable InRelease
Hit:5 https://repo.download.nvidia.com/jetson/ffmpeg r35.5 InRelease
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:7 https://pkgs.tailscale.com/stable/ubuntu focal InRelease
Hit:8 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease
Hit:9 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:10 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Fetched 120 kB in 2s (77.4 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
106 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:9.3.0-1ubuntu2).
gcc is already the newest version (4:9.3.0-1ubuntu2).
nano is already the newest version (4.8-1ubuntu1).
pkg-config is already the newest version (0.29.1-0ubuntu4).
astyle is already the newest version (3.1-2build1).
gcc-arm-none-eabi is already the newest version (15:9-2019-q4-0ubuntu1).
git-lfs is already the newest version (2.9.2-1).
ninja-build is already the newest version (1.10.0-1build1).
apt-utils is already the newest version (2.0.10).
cmake is already the newest version (3.16.3-1ubuntu1.20.04.1).
curl is already the newest version (7.68.0-1ubuntu2.22).
git is already the newest version (1:2.25.1-1ubuntu3.11).
systemd is already the newest version (245.4-4ubuntu3.23).
python3-pip is already the newest version (20.0.2-5ubuntu1.10).
The following additional packages will be installed:
libjq1 libonig5
The following NEW packages will be installed:
jq libjq1 libonig5 snap
The following packages will be upgraded:
snapd
1 upgraded, 4 newly installed, 0 to remove and 105 not upgraded.
Need to get 21.5 MB of archives.
After this operation, 63.5 MB disk space will be freed.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 libonig5 arm64 6.9.4-1 [134 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 libjq1 arm64 1.6-1ubuntu0.20.04.1 [107 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 jq arm64 1.6-1ubuntu0.20.04.1 [49.6 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 snapd arm64 2.61.3+20.04 [20.9 MB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 snap arm64 2013-11-29-9 [349 kB]
Fetched 21.5 MB in 5s (4,003 kB/s)
Selecting previously unselected package libonig5:arm64.
(Reading database ... 190128 files and directories currently installed.)
Preparing to unpack .../libonig5_6.9.4-1_arm64.deb ...
Unpacking libonig5:arm64 (6.9.4-1) ...
Selecting previously unselected package libjq1:arm64.
Preparing to unpack .../libjq1_1.6-1ubuntu0.20.04.1_arm64.deb ...
Unpacking libjq1:arm64 (1.6-1ubuntu0.20.04.1) ...
Selecting previously unselected package jq.
Preparing to unpack .../jq_1.6-1ubuntu0.20.04.1_arm64.deb ...
Unpacking jq (1.6-1ubuntu0.20.04.1) ...
Preparing to unpack .../snapd_2.61.3+20.04_arm64.deb ...
Unpacking snapd (2.61.3+20.04) over (2.58+20.04.1) ...
Selecting previously unselected package snap.
Preparing to unpack .../snap_2013-11-29-9_arm64.deb ...
Unpacking snap (2013-11-29-9) ...
Setting up snapd (2.61.3+20.04) ...
Installing new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine.real ...
snapd.failure.service is a disabled or a static unit not running, not starting it.
snapd.snap-repair.service is a disabled or a static unit not running, not starting it.
Failed to restart snapd.mounts-pre.target: Operation refused, unit snapd.mounts-pre.target may be requested by dependency only (it is configured to refuse manual start/stop).
See system logs and 'systemctl status snapd.mounts-pre.target' for details.
Setting up snap (2013-11-29-9) ...
Setting up libonig5:arm64 (6.9.4-1) ...
Setting up libjq1:arm64 (1.6-1ubuntu0.20.04.1) ...
Setting up jq (1.6-1ubuntu0.20.04.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.3) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Requirement already satisfied: Jetson.GPIO in /usr/lib/python3/dist-packages (2.1.6)
Requirement already satisfied: meson in /usr/local/lib/python3.8/dist-packages (1.4.0)
Requirement already satisfied: pyserial in /usr/local/lib/python3.8/dist-packages (3.5)
Requirement already satisfied: pymavlink in /usr/local/lib/python3.8/dist-packages (2.4.41)
Requirement already satisfied: dronecan in /usr/local/lib/python3.8/dist-packages (1.0.26)
Requirement already satisfied: future in /usr/lib/python3/dist-packages (from pymavlink) (0.18.2)
Requirement already satisfied: lxml in /usr/local/lib/python3.8/dist-packages (from pymavlink) (5.2.1)
Configuring environment
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'modemmanager' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 105 not upgraded.
Installing scripts
Installing mavlink-router
/home/jetson/git/ark_jetson_scripts /home/jetson/git/ark_jetson_scripts
Cloning into '/root/code/mavlink-router'...
remote: Enumerating objects: 90, done.
remote: Counting objects: 100% (90/90), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 90 (delta 18), reused 38 (delta 3), pack-reused 0
Unpacking objects: 100% (90/90), 107.66 KiB | 2.03 MiB/s, done.
Submodule 'modules/mavlink_c_library_v2' (https://github.com/mavlink/c_library_v2.git) registered for path 'modules/mavlink_c_library_v2'
Cloning into '/root/code/mavlink-router/modules/mavlink_c_library_v2'...
remote: Enumerating objects: 509, done.
remote: Counting objects: 100% (509/509), done.
remote: Compressing objects: 100% (485/485), done.
remote: Total 509 (delta 305), reused 41 (delta 24), pack-reused 0
Receiving objects: 100% (509/509), 1.20 MiB | 6.38 MiB/s, done.
Resolving deltas: 100% (305/305), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 777, done.
remote: Counting objects: 100% (777/777), done.
remote: Compressing objects: 100% (354/354), done.
remote: Total 405 (delta 386), reused 55 (delta 51), pack-reused 0
Receiving objects: 100% (405/405), 163.57 KiB | 4.81 MiB/s, done.
Resolving deltas: 100% (386/386), completed with 319 local objects.
From https://github.com/mavlink/c_library_v2
* branch 92b1a43468e8737da2d4cc1e72304e6443dcfdd3 -> FETCH_HEAD
Submodule path 'modules/mavlink_c_library_v2': checked out '92b1a43468e8737da2d4cc1e72304e6443dcfdd3'
The Meson build system
Version: 1.4.0
Source dir: /root/code/mavlink-router
Build dir: /root/code/mavlink-router/build
Build type: native build
Project name: mavlink-router
Project version: 3
C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0")
C linker for the host machine: cc ld.bfd 2.34
C++ compiler for the host machine: c++ (gcc 9.4.0 "c++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0")
C++ linker for the host machine: c++ ld.bfd 2.34
Host machine cpu family: aarch64
Host machine cpu: aarch64
Library m found: YES
Library rt found: YES
Run-time dependency threads found: YES
Found pkg-config: YES (/usr/bin/pkg-config) 0.29.1
Run-time dependency systemd found: YES 245
Run-time dependency GTest found: NO (tried pkgconfig and system)
Compiler for C supports arguments -Wno-inline: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wlogical-op: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wdeclaration-after-statement: YES
Compiler for C supports arguments -Wfloat-equal: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Wstrict-aliasing=3: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wno-long-long: YES
Compiler for C supports arguments -Wno-overlength-strings: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-result: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wchar-subscripts: YES
Compiler for C supports arguments -Wtype-limits: YES
Compiler for C supports arguments -Wuninitialized: YES
Compiler for C supports arguments -Waddress-of-packed-member: YES
Compiler for C supports arguments -Wno-inline: YES (cached)
Compiler for C supports arguments -Wundef: YES (cached)
Compiler for C supports arguments -Wformat=2: YES (cached)
Compiler for C supports arguments -Wlogical-op: YES (cached)
Compiler for C supports arguments -Wsign-compare: YES (cached)
Compiler for C supports arguments -Wformat-security: YES (cached)
Compiler for C supports arguments -Wmissing-include-dirs: YES (cached)
Compiler for C supports arguments -Wformat-nonliteral: YES (cached)
Compiler for C supports arguments -Wpointer-arith: YES (cached)
Compiler for C supports arguments -Winit-self: YES (cached)
Compiler for C supports arguments -Wfloat-equal: YES (cached)
Compiler for C supports arguments -Wredundant-decls: YES (cached)
Compiler for C supports arguments -Wmissing-declarations: YES (cached)
Compiler for C supports arguments -Wmissing-noreturn: YES (cached)
Compiler for C supports arguments -Wshadow: YES (cached)
Compiler for C supports arguments -Wendif-labels: YES (cached)
Compiler for C supports arguments -Wstrict-aliasing=3: YES (cached)
Compiler for C supports arguments -Wwrite-strings: YES (cached)
Compiler for C supports arguments -Wno-long-long: YES (cached)
Compiler for C supports arguments -Wno-overlength-strings: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
Compiler for C supports arguments -Wno-unused-result: YES (cached)
Compiler for C supports arguments -Wchar-subscripts: YES (cached)
Compiler for C supports arguments -Wtype-limits: YES (cached)
Compiler for C supports arguments -Wuninitialized: YES (cached)
Compiler for C++ supports arguments -Waddress-of-packed-member: YES
Header "aio.h" has symbol "aio_init" : YES
Configuring config.h using configuration
Configuring mavlink-router.service using configuration
Program run-clang-tidy found: NO
Build targets in project: 6
Found ninja-1.10.0 at /usr/bin/ninja
ninja: Entering directory `build'
[25/25] Linking target src/mavlink-routerd
ninja: Entering directory `build'
[1/2] Installing files.
Installing src/mavlink-routerd to /usr/bin
Installing /root/code/mavlink-router/build/mavlink-router.service to /lib/systemd/system
/home/jetson/git/ark_jetson_scripts
Installing micro-xrce-dds-agent
snap "micro-xrce-dds-agent" is already installed, see 'snap help refresh'
Installing logloader
Downloading the latest release of mavsdk
Downloading https://github.com/mavlink/MAVSDK/releases/download/v2.7.0/libmavsdk-dev_2.7.0_debian12_arm64.deb...
Installing libmavsdk-dev_2.7.0_debian12_arm64.deb
(Reading database ... 190220 files and directories currently installed.)
Preparing to unpack libmavsdk-dev_2.7.0_debian12_arm64.deb ...
Unpacking libmavsdk-dev (2.7.0) over (2.6.0) ...
Setting up libmavsdk-dev (2.7.0) ...
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...
/home/jetson/git/ark_jetson_scripts /home/jetson/git/ark_jetson_scripts
Cloning into '/root/code/logloader'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 15 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (15/15), 8.62 KiB | 2.87 MiB/s, done.
Submodule 'third_party/cpp-httplib' (https://github.com/yhirose/cpp-httplib.git) registered for path 'third_party/cpp-httplib'
Submodule 'third_party/tomlplusplus' (https://github.com/marzer/tomlplusplus.git) registered for path 'third_party/tomlplusplus'
Cloning into '/root/code/logloader/third_party/cpp-httplib'...
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 88 (delta 10), reused 49 (delta 3), pack-reused 0
Cloning into '/root/code/logloader/third_party/tomlplusplus'...
remote: Enumerating objects: 237, done.
remote: Counting objects: 100% (237/237), done.
remote: Compressing objects: 100% (182/182), done.
remote: Total 237 (delta 64), reused 159 (delta 47), pack-reused 0
Receiving objects: 100% (237/237), 1.27 MiB | 9.00 MiB/s, done.
Resolving deltas: 100% (64/64), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 14 (delta 10), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (14/14), 3.19 KiB | 204.00 KiB/s, done.
From https://github.com/yhirose/cpp-httplib
* branch ad40bd6a009c5fd237f2972987a528d59a8526ba -> FETCH_HEAD
Submodule path 'third_party/cpp-httplib': checked out 'ad40bd6a009c5fd237f2972987a528d59a8526ba'
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 13 (delta 10), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (13/13), 2.11 KiB | 113.00 KiB/s, done.
From https://github.com/marzer/tomlplusplus
* branch 482878fcd22ad04dcd3a912fcb52fcaa83fcc29a -> FETCH_HEAD
Submodule path 'third_party/tomlplusplus': checked out '482878fcd22ad04dcd3a912fcb52fcaa83fcc29a'
OpenSSL 3.0.2 is already installed.
-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/local/lib/libcrypto.so (Required is at least version "3.0.2")
-- Configuring done
-- Generating done
-- Build files have been written to: /root/code/logloader/build
cmake --build build -j
make[1]: Entering directory '/root/code/logloader/build'
make[2]: Entering directory '/root/code/logloader/build'
make[3]: Entering directory '/root/code/logloader/build'
Scanning dependencies of target logloader
make[3]: Leaving directory '/root/code/logloader/build'
make[3]: Entering directory '/root/code/logloader/build'
[ 66%] Building CXX object CMakeFiles/logloader.dir/src/main.cpp.o
[ 66%] Building CXX object CMakeFiles/logloader.dir/src/LogLoader.cpp.o
[100%] Linking CXX executable logloader
make[3]: Leaving directory '/root/code/logloader/build'
[100%] Built target logloader
make[2]: Leaving directory '/root/code/logloader/build'
make[1]: Leaving directory '/root/code/logloader/build'
-- Install configuration: ""
-- Installing: /usr/local/bin/logloader
-- Set runtime path of "/usr/local/bin/logloader" to ""
/home/jetson/git/ark_jetson_scripts
Installing Jetson services
Finished
jetson@ark-orin-drone:~/git/ark_jetson_scripts$ sudo shutdown -r now
[sudo] password for jetson:
Connection to 100.107.219.115 closed by remote host.
Connection to 100.107.219.115 closed.
(base)
~ ⌚ 9:23:43
$ ssh jetson@100.107.219.115
jetson@100.107.219.115's password:
Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.10.192-tegra aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.
To restore this content, you can run the 'unminimize' command.
Expanded Security Maintenance for Applications is not enabled.
102 updates can be applied immediately.
80 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
33 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm
Last login: Tue Apr 9 09:23:13 2024 from 100.120.154.36
jetson@ark-orin-drone:~$ cd git/PX4-Autopilot/
jetson@ark-orin-drone:~/git/PX4-Autopilot$ flash_px4.sh build/ark_fmu-v6x_default/ark_fmu-v6x_default.bin
Flashing firmware: build/ark_fmu-v6x_default/ark_fmu-v6x_default.bin
/dev/ttyACM0
[sudo] password for jetson:
WARNING: Carrier board is not from a Jetson Developer Kit.
WARNNIG: Jetson.GPIO library has not been verified with this carrier board,
WARNING: and in fact is unlikely to work correctly.
Resetting Flight Controller!
Waiting for bootloader...
Found board id: 57,0 bootloader version: 5 on /dev/ttyACM0
Traceback (most recent call last):
File "/usr/bin/px_uploader.py", line 954, in <module>
main()
File "/usr/bin/px_uploader.py", line 910, in main
up.upload(args.firmware, force=args.force, boot_delay=args.boot_delay)
File "/usr/bin/px_uploader.py", line 589, in upload
fw = firmware(file)
File "/usr/bin/px_uploader.py", line 146, in __init__
self.desc = json.load(f)
File "/usr/lib/python3.8/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 0: invalid continuation byte
jetson@ark-orin-drone:~/git/PX4-Autopilot$
I just ran through the same steps and I'm able to flash through make upload and the flash_px4.sh script in this repo.
jetson@tegra-ubuntu:~/ark_companion_scripts$ git log
commit eb52439bc645e83edc809d8103fbd2aca3365680 (HEAD -> main, origin/main, origin/HEAD)
Author: Alex Klimaj <alex@arkelectron.com>
Date: Mon Apr 8 17:23:54 2024 -0600
Update setup.sh
commit ac4fbc4216c7926eef4c2269f99fd54556bd16da
Author: alexklimaj <alex@arkelectron.com>
Date: Mon Apr 8 22:16:55 2024 +0000
Fix jetson detection
commit 004f5b40bf6de9564d71b7d50281b00f8b7d22c6
Author: alexklimaj <alex@arkelectron.com>
Date: Mon Apr 8 12:47:30 2024 -0600
Add gitignore
commit b460df24b97e1b407f290b8c67aa2a80047ec3fb
Author: alexklimaj <alex@arkelectron.com>
jetson@tegra-ubuntu:~/ark_companion_scripts$
jetson@tegra-ubuntu:~/ark_companion_scripts$
jetson@tegra-ubuntu:~/ark_companion_scripts$ ./setup.sh
[sudo] password for jetson:
Do you want to install micro-xrce-dds-agent? (y/n)
y
Do you want to install logloader? (y/n)
y
Please enter your email:
alex@arkelectron.com
Do you want to auto upload to PX4 Flight Review? (y/n)
y
Do you want your logs to be public? (y/n)
y
Linux tegra-ubuntu 5.10.104-tegra #1 SMP PREEMPT Sun Mar 19 07:55:28 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux
Hit:1 https://cli.github.com/packages stable InRelease
Hit:2 http://packages.ros.org/ros2/ubuntu focal InRelease
Hit:3 https://repo.download.nvidia.com/jetson/common r35.3 InRelease
Hit:4 https://deb.nodesource.com/node_20.x nodistro InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:6 https://repo.download.nvidia.com/jetson/t234 r35.3 InRelease
Hit:7 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:8 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:9 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
92 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:9.3.0-1ubuntu2).
gcc is already the newest version (4:9.3.0-1ubuntu2).
nano is already the newest version (4.8-1ubuntu1).
pkg-config is already the newest version (0.29.1-0ubuntu4).
astyle is already the newest version (3.1-2build1).
gcc-arm-none-eabi is already the newest version (15:9-2019-q4-0ubuntu1).
git-lfs is already the newest version (2.9.2-1).
ninja-build is already the newest version (1.10.0-1build1).
snap is already the newest version (2013-11-29-9).
apt-utils is already the newest version (2.0.10).
cmake is already the newest version (3.16.3-1ubuntu1.20.04.1).
curl is already the newest version (7.68.0-1ubuntu2.22).
git is already the newest version (1:2.25.1-1ubuntu3.11).
systemd is already the newest version (245.4-4ubuntu3.23).
jq is already the newest version (1.6-1ubuntu0.20.04.1).
python3-pip is already the newest version (20.0.2-5ubuntu1.10).
The following packages were automatically installed and are no longer required:
binutils-arm-linux-gnueabi cpp-9-arm-linux-gnueabi cpp-arm-linux-gnueabi gcc-10-cross-base gcc-9-arm-linux-gnueabi gcc-9-arm-linux-gnueabi-base gcc-9-cross-base gcc-9-multilib-arm-linux-gnueabi gcc-arm-linux-gnueabi libasan5-armel-cross libatomic1-armel-cross libc6-armel-cross
libc6-armhf-armel-cross libc6-armhf-cross libc6-dev-armel-cross libc6-dev-armhf-armel-cross libc6-dev-armhf-cross libgcc-9-dev-armel-cross libgcc-s1-armel-cross libgomp1-armel-cross libhfasan5-armel-cross libhfatomic1-armel-cross libhfgcc-9-dev-armel-cross libhfgcc-s1-armel-cross
libhfgomp1-armel-cross libhfstdc++6-armel-cross libhfubsan1-armel-cross libstdc++6-armel-cross libubsan1-armel-cross linux-libc-dev-armel-cross linux-libc-dev-armhf-cross
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
snapd
1 upgraded, 0 newly installed, 0 to remove and 91 not upgraded.
Need to get 20.9 MB of archives.
After this operation, 67.1 MB disk space will be freed.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 snapd arm64 2.61.3+20.04 [20.9 MB]
Fetched 20.9 MB in 2s (9,365 kB/s)
(Reading database ... 238724 files and directories currently installed.)
Preparing to unpack .../snapd_2.61.3+20.04_arm64.deb ...
Unpacking snapd (2.61.3+20.04) over (2.58+20.04.1) ...
Setting up snapd (2.61.3+20.04) ...
Installing new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine.real ...
snapd.failure.service is a disabled or a static unit not running, not starting it.
snapd.snap-repair.service is a disabled or a static unit not running, not starting it.
Failed to restart snapd.mounts-pre.target: Operation refused, unit snapd.mounts-pre.target may be requested by dependency only (it is configured to refuse manual start/stop).
See system logs and 'systemctl status snapd.mounts-pre.target' for details.
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.3) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Requirement already satisfied: Jetson.GPIO in /usr/lib/python3/dist-packages (2.1.1)
Requirement already satisfied: meson in /usr/local/lib/python3.8/dist-packages (1.2.1)
Requirement already satisfied: pyserial in /usr/local/lib/python3.8/dist-packages (3.5)
Requirement already satisfied: pymavlink in /usr/local/lib/python3.8/dist-packages (2.4.40)
Requirement already satisfied: dronecan in /usr/local/lib/python3.8/dist-packages (1.0.25)
Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from pymavlink) (4.5.0)
Requirement already satisfied: future in /usr/lib/python3/dist-packages (from pymavlink) (0.18.2)
Configuring environment
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'modemmanager' is not installed, so not removed
The following packages were automatically installed and are no longer required:
binutils-arm-linux-gnueabi cpp-9-arm-linux-gnueabi cpp-arm-linux-gnueabi gcc-10-cross-base gcc-9-arm-linux-gnueabi gcc-9-arm-linux-gnueabi-base gcc-9-cross-base gcc-9-multilib-arm-linux-gnueabi gcc-arm-linux-gnueabi libasan5-armel-cross libatomic1-armel-cross libc6-armel-cross
libc6-armhf-armel-cross libc6-armhf-cross libc6-dev-armel-cross libc6-dev-armhf-armel-cross libc6-dev-armhf-cross libgcc-9-dev-armel-cross libgcc-s1-armel-cross libgomp1-armel-cross libhfasan5-armel-cross libhfatomic1-armel-cross libhfgcc-9-dev-armel-cross libhfgcc-s1-armel-cross
libhfgomp1-armel-cross libhfstdc++6-armel-cross libhfubsan1-armel-cross libstdc++6-armel-cross libubsan1-armel-cross linux-libc-dev-armel-cross linux-libc-dev-armhf-cross
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 91 not upgraded.
Installing scripts
Installing mavlink-router
~/ark_companion_scripts ~/ark_companion_scripts
Cloning into '/home/jetson/code/mavlink-router'...
remote: Enumerating objects: 90, done.
remote: Counting objects: 100% (90/90), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 90 (delta 18), reused 38 (delta 3), pack-reused 0
Unpacking objects: 100% (90/90), 107.66 KiB | 1.18 MiB/s, done.
Submodule 'modules/mavlink_c_library_v2' (https://github.com/mavlink/c_library_v2.git) registered for path 'modules/mavlink_c_library_v2'
Cloning into '/home/jetson/code/mavlink-router/modules/mavlink_c_library_v2'...
remote: Enumerating objects: 509, done.
remote: Counting objects: 100% (509/509), done.
remote: Compressing objects: 100% (485/485), done.
remote: Total 509 (delta 305), reused 41 (delta 24), pack-reused 0
Receiving objects: 100% (509/509), 1.20 MiB | 2.35 MiB/s, done.
Resolving deltas: 100% (305/305), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 777, done.
remote: Counting objects: 100% (777/777), done.
remote: Compressing objects: 100% (354/354), done.
remote: Total 405 (delta 386), reused 55 (delta 51), pack-reused 0
Receiving objects: 100% (405/405), 163.57 KiB | 1.31 MiB/s, done.
Resolving deltas: 100% (386/386), completed with 319 local objects.
From https://github.com/mavlink/c_library_v2
* branch 92b1a43468e8737da2d4cc1e72304e6443dcfdd3 -> FETCH_HEAD
Submodule path 'modules/mavlink_c_library_v2': checked out '92b1a43468e8737da2d4cc1e72304e6443dcfdd3'
The Meson build system
Version: 1.2.1
Source dir: /home/jetson/code/mavlink-router
Build dir: /home/jetson/code/mavlink-router/build
Build type: native build
Project name: mavlink-router
Project version: 3
C compiler for the host machine: ccache cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0")
C linker for the host machine: cc ld.bfd 2.34
C++ compiler for the host machine: ccache c++ (gcc 9.4.0 "c++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0")
C++ linker for the host machine: c++ ld.bfd 2.34
Host machine cpu family: aarch64
Host machine cpu: aarch64
Library m found: YES
Library rt found: YES
Run-time dependency threads found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency systemd found: YES 245
Run-time dependency GTest found: YES 1.10.0
Compiler for C supports arguments -Wno-inline: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wlogical-op: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wdeclaration-after-statement: YES
Compiler for C supports arguments -Wfloat-equal: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Wstrict-aliasing=3: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wno-long-long: YES
Compiler for C supports arguments -Wno-overlength-strings: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-result: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wchar-subscripts: YES
Compiler for C supports arguments -Wtype-limits: YES
Compiler for C supports arguments -Wuninitialized: YES
Compiler for C supports arguments -Waddress-of-packed-member: YES
Compiler for C supports arguments -Wno-inline: YES (cached)
Compiler for C supports arguments -Wundef: YES (cached)
Compiler for C supports arguments -Wformat=2: YES (cached)
Compiler for C supports arguments -Wlogical-op: YES (cached)
Compiler for C supports arguments -Wsign-compare: YES (cached)
Compiler for C supports arguments -Wformat-security: YES (cached)
Compiler for C supports arguments -Wmissing-include-dirs: YES (cached)
Compiler for C supports arguments -Wformat-nonliteral: YES (cached)
Compiler for C supports arguments -Wpointer-arith: YES (cached)
Compiler for C supports arguments -Winit-self: YES (cached)
Compiler for C supports arguments -Wfloat-equal: YES (cached)
Compiler for C supports arguments -Wredundant-decls: YES (cached)
Compiler for C supports arguments -Wmissing-declarations: YES (cached)
Compiler for C supports arguments -Wmissing-noreturn: YES (cached)
Compiler for C supports arguments -Wshadow: YES (cached)
Compiler for C supports arguments -Wendif-labels: YES (cached)
Compiler for C supports arguments -Wstrict-aliasing=3: YES (cached)
Compiler for C supports arguments -Wwrite-strings: YES (cached)
Compiler for C supports arguments -Wno-long-long: YES (cached)
Compiler for C supports arguments -Wno-overlength-strings: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES (cached)
Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
Compiler for C supports arguments -Wno-unused-result: YES (cached)
Compiler for C supports arguments -Wchar-subscripts: YES (cached)
Compiler for C supports arguments -Wtype-limits: YES (cached)
Compiler for C supports arguments -Wuninitialized: YES (cached)
Compiler for C++ supports arguments -Waddress-of-packed-member: YES
Header "aio.h" has symbol "aio_init" : YES
Configuring config.h using configuration
Configuring mavlink-router.service using configuration
Program run-clang-tidy found: YES (/usr/bin/run-clang-tidy)
Build targets in project: 10
Found ninja-1.10.0 at /usr/bin/ninja
ninja: Entering directory `build'
[22/49] Compiling C++ object src/mainloop_test.p/binlog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[26/49] Compiling C++ object src/mainloop_test.p/dedup.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[27/49] Compiling C++ object src/mainloop_test.p/autolog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[28/49] Compiling C++ object src/mainloop_test.p/pollable.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[29/49] Compiling C++ object src/mainloop_test.p/timeout.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[30/49] Compiling C++ object src/mainloop_test.p/logendpoint.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[31/49] Compiling C++ object src/mainloop_test.p/mainloop.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[32/49] Compiling C++ object src/mainloop_test.p/endpoint.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[33/49] Compiling C++ object src/endpoints_test.p/dedup.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[34/49] Compiling C++ object src/mainloop_test.p/mainloop_test.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[35/49] Compiling C++ object src/endpoints_test.p/autolog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[36/49] Compiling C++ object src/mainloop_test.p/ulog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[37/49] Compiling C++ object src/mainloop_test.p/tlog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[38/49] Compiling C++ object src/endpoints_test.p/pollable.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[39/49] Compiling C++ object src/endpoints_test.p/binlog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[40/49] Compiling C++ object src/endpoints_test.p/endpoint.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[41/49] Compiling C++ object src/endpoints_test.p/endpoints_test.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[42/49] Compiling C++ object src/endpoints_test.p/logendpoint.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[43/49] Compiling C++ object src/endpoints_test.p/mainloop.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[44/49] Compiling C++ object src/endpoints_test.p/timeout.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[45/49] Compiling C++ object src/endpoints_test.p/ulog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[46/49] Compiling C++ object src/endpoints_test.p/tlog.cpp.o
cc1plus: warning: /usr/lib/aarch64-linux-gnu/pkgconfig/../../include: No such file or directory [-Wmissing-include-dirs]
[49/49] Linking target src/endpoints_test
ninja: Entering directory `build'
[1/2] Installing files.
Installing src/mavlink-routerd to /usr/bin
Installing /home/jetson/code/mavlink-router/build/mavlink-router.service to /lib/systemd/system
~/ark_companion_scripts
Installing micro-xrce-dds-agent
snap "micro-xrce-dds-agent" is already installed, see 'snap help refresh'
Installing logloader
Downloading the latest release of mavsdk
Downloading https://github.com/mavlink/MAVSDK/releases/download/v2.7.0/libmavsdk-dev_2.7.0_debian12_arm64.deb...
Installing libmavsdk-dev_2.7.0_debian12_arm64.deb
(Reading database ... 238721 files and directories currently installed.)
Preparing to unpack libmavsdk-dev_2.7.0_debian12_arm64.deb ...
Unpacking libmavsdk-dev (2.7.0) over (2.7.0) ...
Setting up libmavsdk-dev (2.7.0) ...
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...
~/ark_companion_scripts ~/ark_companion_scripts
Cloning into '/home/jetson/code/logloader'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 15 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (15/15), 8.62 KiB | 1.72 MiB/s, done.
Submodule 'third_party/cpp-httplib' (https://github.com/yhirose/cpp-httplib.git) registered for path 'third_party/cpp-httplib'
Submodule 'third_party/tomlplusplus' (https://github.com/marzer/tomlplusplus.git) registered for path 'third_party/tomlplusplus'
Cloning into '/home/jetson/code/logloader/third_party/cpp-httplib'...
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 88 (delta 10), reused 49 (delta 3), pack-reused 0
Cloning into '/home/jetson/code/logloader/third_party/tomlplusplus'...
remote: Enumerating objects: 237, done.
remote: Counting objects: 100% (237/237), done.
remote: Compressing objects: 100% (182/182), done.
remote: Total 237 (delta 64), reused 159 (delta 47), pack-reused 0
Receiving objects: 100% (237/237), 1.27 MiB | 3.89 MiB/s, done.
Resolving deltas: 100% (64/64), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 14 (delta 10), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (14/14), 3.19 KiB | 105.00 KiB/s, done.
From https://github.com/yhirose/cpp-httplib
* branch ad40bd6a009c5fd237f2972987a528d59a8526ba -> FETCH_HEAD
Submodule path 'third_party/cpp-httplib': checked out 'ad40bd6a009c5fd237f2972987a528d59a8526ba'
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 13 (delta 10), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (13/13), 2.11 KiB | 67.00 KiB/s, done.
From https://github.com/marzer/tomlplusplus
* branch 482878fcd22ad04dcd3a912fcb52fcaa83fcc29a -> FETCH_HEAD
Submodule path 'third_party/tomlplusplus': checked out '482878fcd22ad04dcd3a912fcb52fcaa83fcc29a'
OpenSSL 3.0.2 is already installed.
-- The CXX compiler identification is GNU 9.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/local/lib/libcrypto.so (found suitable version "3.0.2", minimum required is "3.0.2")
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/jetson/code/logloader/build
cmake --build build -j
make[1]: Entering directory '/home/jetson/code/logloader/build'
make[2]: Entering directory '/home/jetson/code/logloader/build'
make[3]: Entering directory '/home/jetson/code/logloader/build'
make[3]: Leaving directory '/home/jetson/code/logloader/build'
make[3]: Entering directory '/home/jetson/code/logloader/build'
[ 66%] Building CXX object CMakeFiles/logloader.dir/src/main.cpp.o
[ 66%] Building CXX object CMakeFiles/logloader.dir/src/LogLoader.cpp.o
[100%] Linking CXX executable logloader
make[3]: Leaving directory '/home/jetson/code/logloader/build'
[100%] Built target logloader
make[2]: Leaving directory '/home/jetson/code/logloader/build'
make[1]: Leaving directory '/home/jetson/code/logloader/build'
-- Install configuration: ""
-- Installing: /usr/local/bin/logloader
-- Set runtime path of "/usr/local/bin/logloader" to ""
~/ark_companion_scripts
Installing Jetson services
Finished
jetson@tegra-ubuntu:~/ark_companion_scripts$ cd
jetson@tegra-ubuntu:~$ cd PX4-Autopilot/
jetson@tegra-ubuntu:~/PX4-Autopilot$ git fetch
jetson@tegra-ubuntu:~/PX4-Autopilot$ git fetch upstream
remote: Enumerating objects: 121, done.
remote: Counting objects: 100% (121/121), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 121 (delta 77), reused 111 (delta 71), pack-reused 0
Receiving objects: 100% (121/121), 96.85 KiB | 10.76 MiB/s, done.
Resolving deltas: 100% (77/77), completed with 31 local objects.
From https://github.com/PX4/PX4-Autopilot
5f61e3b785..a73df4752f main -> upstream/main
c8b04b0d71..0c95343bf7 pr-aux1_buttons -> upstream/pr-aux1_buttons
* [new branch] pr-fw-pos-c-fix-hand-launch-no-lau-det-main -> upstream/pr-fw-pos-c-fix-hand-launch-no-lau-det-main
+ 623fc9b34f...4856b7863e pr-update-all-nuttx-defconfig -> upstream/pr-update-all-nuttx-defconfig (forced update)
+ 87d59f9e18...051f7275cb pr-update-all-px4board-defconfig -> upstream/pr-update-all-px4board-defconfig (forced update)
+ ecd156358a...054d5371a6 pr-update-world_magnetic_model -> upstream/pr-update-world_magnetic_model (forced update)
+ 452edda21e...808e298d26 pr-update_Tools/simulation/gazebo-classic/sitl_gazebo-classic -> upstream/pr-update_Tools/simulation/gazebo-classic/sitl_gazebo-classic (forced update)
+ 4a561f7bf1...40610a9129 pr-update_Tools/simulation/gz -> upstream/pr-update_Tools/simulation/gz (forced update)
+ 5e5f8e1796...11c6d9a414 pr-update_src/drivers/cyphal/libcanard -> upstream/pr-update_src/drivers/cyphal/libcanard (forced update)
+ 31d07b9e00...a928a18c27 pr-update_src/drivers/cyphal/public_regulated_data_types -> upstream/pr-update_src/drivers/cyphal/public_regulated_data_types (forced update)
+ 0091804a35...1956c9706d pr-update_src/drivers/gps/devices -> upstream/pr-update_src/drivers/gps/devices (forced update)
+ e486ddc1c7...d466e2a694 pr-update_src/drivers/uavcan/libuavcan -> upstream/pr-update_src/drivers/uavcan/libuavcan (forced update)
+ 987fa56559...4e6fd095f7 pr-update_src/lib/cdrstream/cyclonedds -> upstream/pr-update_src/lib/cdrstream/cyclonedds (forced update)
+ bf0704b721...bc3218fa44 pr-update_src/lib/cdrstream/rosidl -> upstream/pr-update_src/lib/cdrstream/rosidl (forced update)
+ 3036a9aa11...2787a4c736 pr-update_src/modules/mavlink/mavlink -> upstream/pr-update_src/modules/mavlink/mavlink (forced update)
* [new branch] pr-voxl_save_cal_params -> upstream/pr-voxl_save_cal_params
jetson@tegra-ubuntu:~/PX4-Autopilot$ git checkout upstream/main
Previous HEAD position was 5f61e3b785 ekf2: update change indicator
HEAD is now at a73df4752f px4_fmu-v6x:Add Holybro Pixhawk Jetson Baseboard ver 0x100
jetson@tegra-ubuntu:~/PX4-Autopilot$ git submodule update --init --recursive
jetson@tegra-ubuntu:~/PX4-Autopilot$
jetson@tegra-ubuntu:~/PX4-Autopilot$ make ark_fmu-v6x upload
[295/298] Linking CXX executable ark_fmu-v6x_default.elf
Memory region Used Size Region Size %age Used
ITCM_RAM: 0 GB 64 KB 0.00%
FLASH: 1952568 B 1920 KB 99.31%
DTCM1_RAM: 0 GB 64 KB 0.00%
DTCM2_RAM: 0 GB 64 KB 0.00%
AXI_SRAM: 98596 B 512 KB 18.81%
SRAM1: 0 GB 128 KB 0.00%
SRAM2: 0 GB 128 KB 0.00%
SRAM3: 0 GB 32 KB 0.00%
SRAM4: 2 KB 64 KB 3.12%
BKPRAM: 0 GB 4 KB 0.00%
[297/298] uploading px4
Waiting for bootloader...
Attempting reboot on /dev/serial/by-id/usb-ARK_ARK_FMU_v6X.x_0-if00 with baudrate=57600...
If the board does not respond, unplug and re-plug the USB connector.
Found board id: 57,0 bootloader version: 5 on /dev/serial/by-id/usb-ARK_ARK_BL_FMU_v6X.x_0-if00
Loaded firmware for board id: 57,0 size: 1952568 bytes (99.31%)
sn: 003f00223332510936383236
chip: 20036450
family: b'STM32H7[4|5]x'
revision: b'V'
flash: 1966080 bytes
Windowed mode: False
Erase : [====================] 100.0%
Program: [====================] 100.0%
Verify : [====================] 100.0%
Rebooting. Elapsed Time 27.166
jetson@tegra-ubuntu:~/PX4-Autopilot$ cd
jetson@tegra-ubuntu:~$ cd ark_companion_scripts/jetson/scripts/
jetson@tegra-ubuntu:~/ark_companion_scripts/jetson/scripts$ ./flash_px4.sh ../../../PX4-Autopilot/build/ark_fmu-v6x_default/ark_fmu-v6x_default.px4
Flashing firmware: ../../../PX4-Autopilot/build/ark_fmu-v6x_default/ark_fmu-v6x_default.px4
/dev/ttyACM0
WARNING: Carrier board is not from a Jetson Developer Kit.
WARNNIG: Jetson.GPIO library has not been verified with this carrier board,
WARNING: and in fact is unlikely to work correctly.
Resetting Flight Controller!
Waiting for bootloader...
Found board id: 57,0 bootloader version: 5 on /dev/ttyACM0
Loaded firmware for board id: 57,0 size: 1952568 bytes (99.31%)
sn: 003f00223332510936383236
chip: 20036450
family: b'STM32H7[4|5]x'
revision: b'V'
flash: 1966080 bytes
Windowed mode: False
Erase : [====================] 100.0%
Program: [====================] 100.0%
Verify : [====================] 100.0%
Rebooting. Elapsed Time 27.177
jetson@tegra-ubuntu:~/ark_companion_scripts/jetson/scripts$
@acehoss you need to be flashing the .px4 file, not the .bin
Yep, good catch, that was the problem. 🤦🏼♂️
I'm running into an issue with flashing. Following the instructions, the flash got stuck at
Waiting for bootloader…
. I waited a couple minutes. I also tried manually flashing.Companion computer is a Nvidia Jetson Orin NX 16 GB, flashed with a custom built kernel and device tree. The extra dts and dtsi files were copied to the kernel and kernel/bootloader directories before flashing.
PX4 Build & Flash
Manual Flash
The FMU did appear to reset: