Flashing the Firmware with ST-Link (unable to communicate through USB)

To start out, I have a relatively new printer from somebody who sold it as new, but it wasn't.  I got the refund, but it has errant printing behavior, a non-functioning SD Card slot, and communication issues in which I get some function from JGCreate over USB cable.  Cura and pronterface just throw errors.  There was a loose connector to a motor and one to a micro-switch, but nothing looks burned.

The board may be toast, but if I can successfully flash it COMPLETELY and it doesn't work, I'll pull it and replace it.

I found only the wiki instruction and various videos and instructions for other devices, including repairing the bootloader first with a hex file (wouldn't I need to reload the bootloader if I'm having COM issues?) and then the firmware for the printer, and on other printers, that may include yet another file for the screen or whatever.  Yet the popular video out there is somebody with an audio mixing board who doesn't connect anything, and doesn't explain the firmware loader.  It didn't do it for me.
Where are the better instructions for printer boards???

and the process is so simple -  What is it like 6 easy steps?!  With some pics, it could be compressed to the size of this post.

The other thing about this is the 32bit JGAurora board firmware and the bootloader - are people flashing these things trying to fix issues, but not reloading the bootloader?  oy vey,  I'm kinda old, but if you are reloading the firmware for the printer because of an unknown issue - don't you also start fresh with the bootloader?  Get me up to speed regarding the bootloader here please.

So about the wiki
I do not know how to hook up the data wires, as well as the operations in the software for ST-Link.
It is not reasonable to just click on things, open things, etc., or even worse try to figure out which are the "data connections" and guess.

Anyway, can we do some actual instructions that would forgo understanding the technical construction of my mainboard for now?  I just want to connect the wiring properly and load the files correctly.  I included the wiki instruction below as a starting point, but it's nearly useless for me because I have no knowledge of printer mainboard designs, and I can't find a good tutorial for ST-Link Utility.

I can even help add some screenshots or pics on the board in the process once I know what I'm doing.

Connect this port up to an ST-Link V2 using jumper wires / dupont cables, and you will be able to backup and upgrade the firmware on the A5S & A1. I recommend NOT plugging in the 3.3V line, but instead provide power to the board via USB cable, and only use the data and GND lines on the ST-Link header connection. I recommend you use the STM32 ST-LINK Utility (STSW-LINK004). Please post on the jgaurora forum firmware discussion thread if you want any help with this!


  • Samuel PinchesSamuel Pinches Posts: 2,597Administrator
    edited May 19
    Unfortunately when it is a one-man-band, this is the result - lacklustre documentation. If we had more volunteers to help with this stuff, that would make things a bit easier. Any screenshots / pics you can add would be super appreciated.
    Don't watch other bootloader videos, they are mostly NOT applicable, and you will get confused about what you're trying to do and how. The JGAurora board uses an STM32 processors, which is completely different to the Arduino ATMEGA processors.
    On the ST-Link, you have a number of labelled pins. You need to connect all of those to the corresponding pins on the motherboard following the diagram I added on the wiki. The exception is the 3.3V line. Don't connect that one.
    Have you opened and installed the ST-Link software? Please watch the following video about the flashing process on STM32:

    Post edited by Samuel Pinches on
  • giantrobot2001giantrobot2001 Posts: 68Member
    I disconnect the ribbon going to the LED screen and leave the main printer power off...let the usb cable power it...  Nothing else gets disconnected?  Hook up just those 4 pins.  good so far?
  • Samuel PinchesSamuel Pinches Posts: 2,597Administrator
    edited May 19
    For the A5S, the LCD is directly controlled by the motherboard. It is not a separate module like on the A5. You can keep it connected.
    Keep main printer power off, power from USB cable, and just hook up 3 pins (aka , don't hook up the 3.3V+ pin)
    Post edited by Samuel Pinches on
  • giantrobot2001giantrobot2001 Posts: 68Member
    edited May 19
    he two 3.3v I don't use there's still 2 grounds and swdio and swclk . what do I do? just hook up one of the ground - doesnt matter?  2, 4 , 6 and hook 6 on the STLink (GND) to the corner pin above SWCLK alright?

    Post edited by giantrobot2001 on
  • Samuel PinchesSamuel Pinches Posts: 2,597Administrator
    Sorry, I should have been more specific - yes, you only need to use one of the grounds, it doesn't matter which one.
  • Samuel PinchesSamuel Pinches Posts: 2,597Administrator
    @giantrobot2001 - how did you go with this? Did you have any luck? 😬
  • giantrobot2001giantrobot2001 Posts: 68Member
    Sorry, my basement had a minor flooding.  I'm right now putting in a new sump basin and pump.

      I've been very excited to hook up the ST-Link.  Perhaps this afternoon I can post an update.

  • Samuel PinchesSamuel Pinches Posts: 2,597Administrator
    No need to apologise ... good luck with that lot! 🌊
    Thanked by 1giantrobot2001
  • giantrobot2001giantrobot2001 Posts: 68Member
    We had 4 inches of rain on Monday/Tuesday.  It was because of my lack oversight that we did get a little flooding.  Doing the correct updates in the basement now.  Easy construction job that I was planning to do with a new furnace anyway... This virus quarantine has me as busy as ever.
  • giantrobot2001giantrobot2001 Posts: 68Member
    Board was toast.  Took a lot of pictures of the ST-Link with my phone for posting.  It said it loaded the Bootloader Hex file successfully and everything. It just froze at the start of the print, like before.  I didn't try Pronterface but I'm sure it would have had the same line +1 error thing. 

    But I had a new board ready!  $70  I had talked about ordering it in the other thread.

    JGAurora direct, I ordered it a couple weeks ago.  Was an easy swap, I opened it up a couple times today doing all this.  There were some very tiny irrelevant differences visible on the new board, but it is cool that it was very slightly different.

    There was like a dozen annoying blobs of glue on the plugs that I didn't put back on the new one.  Tweezers, forceps, or my trusty cuticle/3Dprint trimmers are a must have to pull all the little glue blobs off before you begin.
    Doing some test prints.   But I'm thinking of opening it up again and going crazy with a glue gun on all the little connectors like they had.

    Oh - by the way! We need help!  The firmware links and some other things on the official  JG site are all wrong now that they did all the new brand name stuff.   It says Firmware, then it gives you links to files to make a basket - and I'm not making that up.

    Thanked by 1Samuel Pinches
  • Samuel PinchesSamuel Pinches Posts: 2,597Administrator
    I have let JGAurora know about the broken firmware page... for now people will be stuck with custom firmware :wink:

    Let me know if you want me to check the flashing was successful. I am familiar with ST-Link, could help to double check it. It sounds like the board is damaged though :disappointed:
  • giantrobot2001giantrobot2001 Posts: 68Member
    edited June 6
    I'd love to be able to do any kind of diagnosis out of the machine.  It's mostly just been on assumption so far - but I'd like to know...  Let me know what to do please. 

    I won't be able to see the LCD but if I could learn to check the firmware, and board communication or whatever, that would be great. I thought about sending it to JG and begging for support - I'm not really considering it a warranty issue though.

    Originally, when I first got the machine, I found the big plugs loose inside the machine - The machine is like new but there is inside connectors that sister up next to the outside 3 plug user assembled connectors that were loose. Especially the bottom wide one.  It was really hard to figure out just from the errant behaviors.  The connector on the outside was tight.   It was causing additional issues in the extruder movement that stopped when I got things plugged in tight.  I'm sure those connections must have been creating a hell of a spike.

    The new board did fix the machine completely from what I can see.  I left the SD card slot cable off completely.  I just don't want to use it.
    Post edited by giantrobot2001 on
Sign In or Register to comment.