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

mavlink_shell: fix stall on CubeOrange #20824

Merged
merged 1 commit into from
Dec 23, 2022
Merged

Conversation

julianoes
Copy link
Contributor

On CubeOrange where no console is configured by default, starting MAVLink shell just stalls, and doesn't work.

Also, logfile download has been reported not to work, and again, seems to work with this change.

@bkueng does this make any sense to you? Why are the fflushs required?

Related to #19831.

On CubeOrange where no console is configured by default, starting
MAVLink shell just stalls, and doesn't work.

Also, logfile download has been reported not to work, and again, seems
to work with this change.

Signed-off-by: Julian Oes <julian@oes.ch>
@dagar dagar added the bug label Dec 23, 2022
@dagar
Copy link
Member

dagar commented Dec 23, 2022

Looks like the fflush was added here as a potential fix for a crash. #17065

@dagar dagar merged commit bb591c6 into main Dec 23, 2022
@dagar dagar deleted the pr-fix-cubeorange-mavlinkshell branch December 23, 2022 16:00
@dagar
Copy link
Member

dagar commented Dec 23, 2022

FYI @davids5

@julianoes
Copy link
Contributor Author

Thinking more about this, fflush would probably make sense but it also makes sense that it stalls if there is nothing to flush to.

@davids5
Copy link
Member

davids5 commented Dec 24, 2022

@julianoes Is the logic to redirect the console to dev/null in place on this board? If so the question I would have is what does a write to null cause a hang?

@julianoes
Copy link
Contributor Author

Oh, how do you make it redirect to /dev/null? I don't think it does that. It's just that there is no UARTx_SERIAL_CONSOLE=y defined.

@julianoes
Copy link
Contributor Author

@davids5 I found it. Redirection to /dev/null is set up but it happens later when the shell thread is started, here:

nsh_consolemain(0, NULL);

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.

3 participants