-
Notifications
You must be signed in to change notification settings - Fork 20
Argument parsing for write firmware
broken
#68
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
Comments
Haha, that's certainly on-brand for this tool. Almost a fundamental philosophy. Sorry for breaking this though. I expect I broke it in cmd: {read,write}: Enable bounded access to RAM. As alluded to in #60 the argument parsing stuff is in a pretty sad state. It seems that the December break is my traditional time for hacking on culvert, so if you don't cook up a better patch in the mean-time I'll try to fix it as part of a broader argument-parsing cleanup. |
My C skills are rather limited and I am happy that I can program my ESP chips without doing too many malloc/free's 😄 I was thinking of looking into |
Honestly I prefer we don't allow independent order. argp looks nice, I hadn't actually come across it, so thanks. I'll poke a bit more at that when I have a moment. |
That makes it way easier to implement then 😄
|
I encountered an issue when writing firmware via UART on a test system (as the AHB bridge is locked). The argument parsing in the
debug_uart
driver behaves unexpectedly when usingculvert write firmware /dev/ttyUSB0 < image-bmc
.Specifically, it takes
firmware
as the first argument inahb *debug_driver_probe
and/dev/ttyUSB0
as the second one, causing the driver to fail sinceargc
is 2 instead of the expected 1 or 5.culvert/src/bridge/debug.c
Lines 518 to 535 in 8335227
I hacked something in so that it is usable again, although I hate it 😄 .
Temporary hack to use it
The text was updated successfully, but these errors were encountered: