-
Notifications
You must be signed in to change notification settings - Fork 70
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
Unable to program the board #48
Comments
I think that you must use MicroSD instead USB. |
I tried again using a 32GB sd card (the lowest capacity I have) formatted in fat32 but sadly it didn't work |
Try with smaller one. |
8GB or 4GB |
@tiomel I was not able to find an 8GB sd card, I bought a 16GB one but it still doesn't work, however, I have seen in other issues where people confirmed that 32GB card works with mks robin. I found out the files should be changing to .cur but that doesn't happen |
Is there any way to debug the board? like a verbose console log via the SWD or uart? |
@mks-viva any idea on how to fix this? |
You can try to download mks path Robin_nano_35.bin file and update it, confirm whether it is a 32gb card problem. |
@mks-viva thanks for the reply! I'm not sure where to find the Robin _nano_35.bin. However I have made some progress, I was able to read some sectors from the internal memory via swd and found that the bootloader sector is completely field with 0xFF I'm not sure what can cause a bootloader to be completely wiped out while maintaining marlin intact I did try to update the bootloader, but I left the board powered on for 10min because I wanted to make sure not to turn the board off while the bootloader was being written, I think this is enough time to program the bootloader without issues 🤔 Tomorrow I will try to program the bootloader via swd, I don't think I can do it via the SD card or USB without a functioning bootloader present on the cpu |
I did it!!!!! It was a wild ride, I spent 3 full days on this and finally, I made it work. I was able to program the bootloader via the SWD port, after a successful flash, programming the marlin firmware was super easy, I just plugged my pen drive into the board, after 15sec the HE1 light came on 😃 Everything is working now! I will explain what I did for anyone who may face the same issue. I used my Raspberry Pi 4, however, this should also work if you have an ST-Link
DONE. Side notes:
After this you will be able to program marlin via USB or the SD card 👍 |
@tiagooliveira95 I have followed your instructions on this and am wondering if I am missing something. I compiled openocd from source as suggested and I can telnet to 4444 with no issues or warnings. The problem I am having is when I issue the commands I get output that shows the command line usage for |
@just-trey I'm not entirely sure, this may be a stupid question but you are running these commands in the telnet window right? Can you share some screenshots? |
@tiagooliveira95, your solution seems perfect but didn't work for me. I put the bin file some folder and gave its address while uploading. however board is still stuck and do not apply anything from sd card or usb. Is there a way to make a complete reset and install everything through st-link? |
Hello from the future! I don't usually revive dead threads but this was finally the silver bullet for me. I recently came into possession of a bricked Robin Nano V3.1 and this procedure worked... with modifications. Things have changed slightly, see below. Step(s) 0:
Firstly, compile OpenOCD like normal but don't wire your pi to your board according to Adafruit's guide, it's almost 8 years out of date at the time of this writing and it doesn't work anymore (more on what to do later)! Now we need to setup our environment, I don't like making changes to base configs so I created a folder ~/mks_robin_nano/ where I created openocd.cfg. The latest rev of OpenOCD now has a unified raspberry pi configuration file so changes to openocd.cfg are below:
Then, I needed to modify /usr/local/share/openocd/scripts/interface/raspberrypi-gpio-connector.cfg to enable the srst pin:
Finally, with the Robin Nano powered off wire up your interface according to the NEW pinouts in the GPIO file above. Start with ground! Don't wire 3V3, the PI can't handle the current load (at least, my pi3 couldn't). Transfer the latest bootloader to the working folder of the pi (I used the no-beep version since someone somewhere else said it had sd AND usb flash drive support): Now you're ready to launch OpenOCD on the pi: Open a new terminal (I use screen, ctrl+a, c) and telent into openocd's server (I also had to install telnet from apt): Depending on your board revision (the stm32 cpu model, specifically), the erase flash stage needs different parameters:
Now flash the bootloader! As an additional step, I verified it wrote the same number of bytes as the bootloader file in the working dir. After this, I plugged in a USB drive formatted as fat32 with my custom Marlin firmware build in the root directory, issued a reset and the activity light started going wild on the USB drive! For me, the flash procedure took 15-30 seconds. After the USB drive went idle, I waited ~1 minute before doing another reset. Then to my absolute delight, the usb serial port came to life on my computer. I verified the firmware in two ways:
A similar procedure should work with an ST-Link debugger... I believe the program is STCubeProgrammer, but I don't have one of those (yet). If you do have one, it should be easier than spinning up a Raspberry Pi debugger. Looks like my board is back from the dead! I hope this helps some wayward traveler. |
As an update to my previous comment, I acquired a ST-Link v2, literally the cheapest one on eBay (from a domestic reseller). I hooked up Clock, DIO, RST, and GND and fired up STCubeProgrammer. I input the bootloader and meant to hit "verify" but accidentally hit "download" and I flashed my bootloader (again). It worked first try without issue and upon reset my firmware was still running. I couldn't hook up 3.3V because my USB port on my laptop couldn't handle it the combined current but USB power from a wall wart did the trick to power on the Robin Nano for flashing (and eventual verifying). If you want to throw money at the problem, this was MUCH easier than using a Pi and I recommend this recovery method. |
I just bought a brand new MKS Robin Nano V3.0 and I'm unable to program it.
My setup:
My first try was to compile marlin, I moved the "Robin_nano_v3.bin" to a USB drive, but nothing happened and the display stays off.
I thought that maybe the board was missing the bootloader, so I copied all 3 files found here and moved them to the USB, waited ~10min nothing seemed to happen.
I retried to flash the "Robin_nano_v3.bin" thinking that now the bootloader was installed, but still, nothing happened.
These are my configurations:
Configuration.h
https://drive.google.com/file/d/13tRBnM0FwDHqBN4e1VXrYYrDyE5L39co/view?usp=sharing
Configuration_adv.h
https://drive.google.com/file/d/1hKFZP_6OM88yP9NnYohVIcnmq7zs6RAd/view?usp=sharing
The text was updated successfully, but these errors were encountered: