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

[BUG] SD target broken #249

Closed
leptun opened this issue Sep 28, 2020 · 10 comments · Fixed by #250 or #254
Closed

[BUG] SD target broken #249

leptun opened this issue Sep 28, 2020 · 10 comments · Fixed by #250 or #254
Labels
bug Something isn't working regression Used to work but is now broken
Milestone

Comments

@leptun
Copy link
Collaborator

leptun commented Sep 28, 2020

I think the sd card target is currently broken in the latest master (or at the very least the latest master this morning). It generates an outdated output filename for the sd card image file.
Instead of Prusa_MK3S_SDcard.bin it generates Einsy_mega2560_sdcard.bin (or something like that. Writing these names from memory). I have to manually rename the generated file for the specific printer hardware config I’m using.

@leptun leptun added the bug Something isn't working label Sep 28, 2020
@vintagepc
Copy link
Owner

Oops, yeah... forgot about that when I changed it so each printer has its own SD card and storage files.

@vintagepc vintagepc added this to the v1.1 milestone Sep 28, 2020
@vintagepc
Copy link
Owner

image

PR pending, I've got it auto-generating a list of printer SD card targets in CMake now.

@3d-gussner
Copy link
Collaborator

Still broken as it builds the SD cards but with wrong name:
SD card image (Prusa_MK25S_13_SDcard.bin) could not be mounted (error -1 ).
but it created Prusa_MK25S_mR13_SDcard.bin

@3d-gussner 3d-gussner reopened this Sep 30, 2020
@vintagepc
Copy link
Owner

shoot, the minirambo naming throws a wrench in the works there since the printer name does not reflect the c++ class name used to get the storage filenames.

I'll fix tonight.

@vintagepc vintagepc added the regression Used to work but is now broken label Sep 30, 2020
vintagepc added a commit that referenced this issue Oct 1, 2020
* SD card targets based on printer code files (#249)

* Fix self-immolating bed on 2.5 series (#252)
@leptun
Copy link
Collaborator Author

leptun commented Oct 5, 2020

The saga continues.
Added a gcode file to SDCard named Buton_umbrela_Florica_MKB_FAST.gcode, ran the Prusa_MK3S_SDcard.bin target and got this in the build log:

[build] Wrote 134217728 bytes to SD image.Wrote /home/alex/Desktop/MK404/build/Prusa_MK3S_SDcard.bin. You can now use mcopy to copy gcode files into the image.
[build] Copying Test.gcode
[build] [100%] Built target Prusa_MK3S_SDcard.bin
[build] Build finished with exit code 0

As can be seen, only Test.gcode was copied.

@leptun leptun reopened this Oct 5, 2020
@vintagepc
Copy link
Owner

vintagepc commented Oct 5, 2020

It should work if you re-run cmake first so it picks up the new .gcode file.
I had to alter the handling slightly as mcopy doesn't do wildcards on extensions and I wanted to stop it copying non-gcode files to the SD card.

If you expand the CMAKE target in VS code the listed GCODE files are the ones it will copy (and that is what is updated every time you re-run cmake)

@leptun
Copy link
Collaborator Author

leptun commented Oct 5, 2020

Ok. Good to know. Just did this and it works.
One more issue, though. Files that have "()" break the generated makefile. Something to look into.

[build] Wrote 134217728 bytes to SD image.Wrote /home/alex/Desktop/MK404/build/Prusa_MK3S_SDcard.bin. You can now use mcopy to copy gcode files into the image.
[build] /bin/sh: 1: Syntax error: "(" unexpected
[build] make[3]: *** [SDCard/CMakeFiles/Prusa_MK3S_SDcard.bin.dir/build.make:58: SDCard/CMakeFiles/Prusa_MK3S_SDcard.bin] Error 2
[build] make[2]: *** [CMakeFiles/Makefile2:2265: SDCard/CMakeFiles/Prusa_MK3S_SDcard.bin.dir/all] Error 2
[build] make[1]: *** [CMakeFiles/Makefile2:2272: SDCard/CMakeFiles/Prusa_MK3S_SDcard.bin.dir/rule] Error 2
[build] make: *** [Makefile:1137: Prusa_MK3S_SDcard.bin] Error 2
[build] Build finished with exit code 2

Used filename was Test (2).gcode

@vintagepc
Copy link
Owner

Good find. I probably just missed putting quotes around a filename variable somewhere.

@vintagepc
Copy link
Owner

OK, I have a fix for both of these, I think. I managed to make the wildcard for *.gcode work, which both pulls in the current state of the directory and fixes the issue with special chars in the filename.

Cmake convenience entries for gcode files are still dependent on re-running cmake to pick up new ones to list under a target though.

@vintagepc
Copy link
Owner

Third time's the charm, I hope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Used to work but is now broken
Projects
None yet
3 participants