Welcome! Log In Create A New Profile

Advanced

unable to upload firmware to sd card from windows

Posted by doug_scott 
unable to upload firmware to sd card from windows
June 23, 2020 10:48AM
I was able to reliably upload a freshly compiled firmware.bin file to the SD card inserted into the onboard card reader on both my MKS SGEN_L LPC1768 and MKS SGEN LPC1769 until I recently downloaded new release source code. When running newly compiled firmware I can no longer see the onboard SD card, and cannot upload firmware as before. The only way I can deploy new firmware is to take my box that contains all the electronics apart to get access to the SD card to remove it and insert it into my notebook to copy the firmware to it, then put it all back together. I have tried using a remote SD card device that mounts into the onboard reader and I can then insert the SD card into that remote reader, but, it uses a flat ribbon cable and it appears it is sensitive to "noise" because Marlin does not see the card as being there, so it will not flash the firmware on startup.

I went back to source code from first week in April (both Release and BugFix) and it works again. Both release and bugfix from June 2 do not work. I am using a smaller than 32gb primary partition, formatted as FAT32, with volume label REARM. Is there some change in configuration that needs to be made in order to access the SD card in recent builds?
Re: unable to upload firmware to sd card from windows
June 23, 2020 12:11PM
One thing that comes to mind is if marlin is using onboard sd as its main sd card you have to release the sd card back to the operating system via LCD or M22 gcode
Re: unable to upload firmware to sd card from windows
June 23, 2020 04:25PM
Would Marlin have to be configured to use the onboard sd as its main sd card? I don't see anything in either configuration.h or configuration_adv.h files that look like that. The way I have understood how to generate and deploy firmware under Marlin 2.x was to use VSC/Platformio to compile and then upload the firmware.bin file to an SD card that appears in Windows Explorer with a volume name of REARM. When I got my first 32 bit board that required Marlin 2.x, those instructions were how to do it, and it worked. The only change I made was to get a newer release when I went to a release version instead of the BugFix version. Then going back to the current BugFix version still behaved the same broken way. I have been moving my two config files to the different releases, nothing else.
Re: unable to upload firmware to sd card from windows
June 24, 2020 09:27PM
Quote
doug_scott
I have been moving my two config files to the different releases, nothing else.

Maybe there is a problem there. I have not found the config files to be the same between builds.
So if you are just moving them that could be a problem. However, it should throw a compile error if you are.
Probably a sanity check.
Re: unable to upload firmware to sd card from windows
August 28, 2020 06:09PM
I am experiencing the same problem. I can see the Marlin attached in Windows 10 Device manager under Disk Drives and in Portable Devices. Windows 10 seems to recognize the Re=Arm board but not the SD card.
I had it working with Smoothieware but decided to switch to Marlin to be consistent with my other printer. As soon as I switched to Marlin, the Re-arm SD drive is no longer recognized.
I can use the Re-Arm by compiling the Configuration.h in VSC Platformio and then copying the binary file by inserting the SD card into my laptop and then copying the binary file from the build folder,

Any help would be greatly appreciated.
Re: unable to upload firmware to sd card from windows
August 28, 2020 07:05PM
What build are you using? I am now running v2.0.6 of the full version. One thing that you must do though is download the full zip file, and unzip to a new folder. Then open that folder in Visual Studio Core and compare the new configuration.h and configuration_adv.h to your working ones. Put your settings into the newer files. Also edit the platformio.ini and update the default_envs setting. Trying to use your original .h files just doesn't work. The compare is the best way. I have updated a couple of times since June and have not lost access again. BTW, doing the compare also finds you new things you didn't know were there, like in my case, the case insensitive setting.
You can keep the Smoothieware usb driver, it works fine for Marlin as well.
Sorry, only registered users may post in this forum.

Click here to login