Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

waf: add defaults.parm support to esp32 using ROMFS #28867

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Dec 15, 2024

And drop broken remnants of code using apj_tool to do it. Now just load the file at libraries/AP_HAL_ESP32/hwdef/<board>/defaults.parm until we get hwdef.dat support in.

According to tridge, apj_tool is deprecated anyway. It's difficult to use because the .bin has an XOR checksum and SHA256 checksum that would have to be patched up. So just switch to using the already-working ROMFS.

Tested on the stampfly.

Copy link
Contributor

@srmainwaring srmainwaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested with esp32s3empty:

Edit esp32s3empty.h to enable ROM_FS:

-#define AP_FILESYSTEM_ESP32_ENABLED 0
+#define AP_FILESYSTEM_ESP32_ENABLED 1
 #define AP_SCRIPTING_ENABLED 0
-#define HAL_USE_EMPTY_STORAGE 1
+// #define HAL_USE_EMPTY_STORAGE 1

Add ./libraries/AP_HAL_ESP32/hwdef/esp32s3empty/defaults.parm

LOG_DISARMED 1
SERIAL0_PROTOCOL 0

Clean, configure, build, upload and verify that the console does not display mavlink. Found I need to switch vehicle type and power cycle to be sure the changes are picked up.

It's already conditionally defined to nullptr in the top-level AP_HAL.
Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really qualified but it looks harmless so I think we should merge it

@peterbarker peterbarker merged commit 54e3d74 into ArduPilot:master Dec 23, 2024
99 checks passed
@tpwrules tpwrules deleted the pr/esp32-defaults branch December 24, 2024 00:09
Copy link
Collaborator

@davidbuzz davidbuzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did review this, after it was merged. and was just gonna say merge-it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants