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

Add M997 support and an implementation for LPC176x #13281

Merged
merged 1 commit into from
Mar 2, 2019

Conversation

p3p
Copy link
Member

@p3p p3p commented Mar 1, 2019

Description

Add M997 support to the gcode parser and an implementation for the LPC176x platform. All that is required on the LPC176x is a reset and boot-loader takes care of flashing so in effect this is just a reset command.

Benefits

Allows for remote flashing of the LPC176x after a firmware file is transferred to the sdcard either by the usb mass storage or serial binary transfer.

@p3p p3p changed the title Adds M997 support and an implementation for LPC176x Add M997 support and an implementation for LPC176x Mar 1, 2019
@thinkyhead thinkyhead merged commit b0553d2 into MarlinFirmware:bugfix-2.0.x Mar 2, 2019
@VanessaE
Copy link
Contributor

VanessaE commented Mar 3, 2019

I'm glad to see this sort of functionality is now present ... but could it be patched to not reset/disconnect the USB port? That way one can see all of Marlin's startup spew in e.g. Pronterface.

@thinkyhead
Copy link
Member

thinkyhead commented Mar 3, 2019

That's a function of the bootloader and/or UART, and not something we can control in the firmware.

@VanessaE
Copy link
Contributor

VanessaE commented Mar 3, 2019

Bummer. ok.

@p3p
Copy link
Member Author

p3p commented Mar 3, 2019

Indeed I'm afraid there is nothing we can do about the slow initialisation of the native usb cdc or the need reinitialise it when the board is reset, on the bright side you do get 100KiB/s transfer rate of Gcode and lossless transmission with inbuilt flow control.

@VanessaE
Copy link
Contributor

VanessaE commented Mar 3, 2019

It's all good. I just miss seeing the startup dump. If nothing else, it used to help me be sure that the firmware it booted with is what I expected (for example, I put the commit ID in the "author" field, since that field is printed at bootup, and visible in e.g. pronterface's debug console).

Could Marlin perhaps be made to withhold or cache its startup dump until after a connection is made with the host program?

@AnHardt
Copy link
Member

AnHardt commented Mar 3, 2019

Could Marlin perhaps be made to withhold or cache its startup dump until after a connection is made with the host program?

Means: Hang forever if no USB is connected. Probably not what we want.

@VanessaE
Copy link
Contributor

VanessaE commented Mar 3, 2019

@AnHardt Heh, no. I was thinking more like: boot up, recording all messages to a buffer, then at the end, mark the buffer as dirty and go into whatever passes for Marlin's "main loop", awaiting commands and events as usual.

When a host connection is made, if the buffer is marked as dirty, dump it to the host at the appropriate moment (perhaps on receipt of the host's first command, e.g. M105), wipe the buffer and mark it as empty, then never look at it again (until the next host connect).

@thinkyhead
Copy link
Member

It's desirable to print the startup message ahead of settings.load because (with EEPROM_CHITCHAT) it echoes the current settings. But for your purposes, it should be fine for you to move the code that prints the startup message in setup() down to the end of setup().

@reloxx13
Copy link
Contributor

reloxx13 commented Sep 8, 2019

docs are missing for M997 :S

http://marlinfw.org/docs/gcode/M997.html

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

Successfully merging this pull request may close these issues.

5 participants