Serial Console

From GCW Zero Wiki
Revision as of 13:09, 3 August 2014 by Kouen Hasuki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DISCLAIMER: The following operation includes many steps during which you may irreversibly damage the GCW Zero, and is intended for people working on low-level code (ie. Linux kernel and bootloader programmers).
Do it at your own risk.



Serial console output is an hardware feature aimed at debugging low-level code like the Linux kernel and UBIBoot bootloader.
It allows you to connect the GCW Zero to your computer and output the early boot messages to an external display, and also gives you control of the device through a terminal at the end of the booting processing.

The GCW Zero has four test points on its PCB[1] (RX, TX, GND, 3.3v), so one would need to solder four extension wires in order to add a serial console output to the device

Materials & tools

  1. Flat screwdriver #1.5,
  2. Philips screwdriver #00,
  3. Soldering station [2],
  4. Conical type of soldering tip 0.4mm diameter,
  5. Solder wire 0.5mm diameter [3],
  6. Kynar wrapping wire 30AWG [4],
  7. 3.3V USB-to-serial RS232 converter [5],
  8. 4 Crocodile clips (optional),
  9. 4 Dupont wire cables with pin headers (optional).

The GCW-Zero PCB is crowded with teeny components, thus the tiny diameter of materials and tools above.
The screwdrivers will help open the case, sealed by 4 small screws on the back.

Figure 1. Soldering tips

On Figure 1, from left to right:

  • Soldering tip Chisel shaped 1.2mm,
  • Soldering tip Conical 0.4mm,
  • Soldering tip Conical 0.8mm.

A 0.8mm diameter soldering tip might be workable if you're skilled enough, but using a 0.4mm tip is safer.

Figure 2. 0.5mm solder wire

Thickness of the solder wire is an important parameter. Thin wire (< 0.7mm) is preferable since it makes it easier to drop small amounts of solder at once.

Figure 3. 30AWG Kynar wrapping wire

Thinness is the key factor here too, so you should go with 30AWG [6] Kynar [7] wires.
Choose different colours to make it easier to tell which is connected to what.

Figure 4. USB to serial RS232 converter

USB-to-serial RS232 converter on Figure 3 has a 5 pins connector:

  • RX for receiving data,
  • TX for transmitting data,
  • GND for ground line,
  • 3.3V for powering the serial output,
  • 5V for powering the serial output.

Only the 3.3V output pin is needed for the GCW Zero. DO NOT USE 5V to power the serial output as it will probably damage the device.

Figure 5. Crocodile clips

The crocodile clips are optional if you choose to solder the USB-to-serial converter to the GCW-Zero.
If you choose to go with the clips the result will be messier due to more cables, but clips are easily detached to allow tucking wires away and keep the device portable.

Figure 6. Dupont wire cables and pin headers

Going with the crocodile clips, you will also need Dupont wire cables and pin headers to space out the USB converter pins which are too close to be grabbed individually with the clips.

Soldering techniques

A good place to start learning about soldering techniques is the EEVblog on Youtube [8].
David L. Jones shot a three parts soldering tutorial there:

There is not much more to tell on the subject than you'll learn watching those videos and practicing.
Remember to tin the wrapping wires and the pads on the PCB though: it should ease soldering the wires.


Figure 7. GCW Zero back with rubber pads pulled out

On the back of the device are four cylindrical rubber pads you need to pull out to reveal the screws underneath -- using the flat screwdriver should help.

After removing the screws with the Philips screwdriver, gently detach the black back cover from the case to pry it open -- you can use the flat screwdriver by inserting the blade alongside the case or just use your fingernails.
Be careful with the shoulder buttons and be aware that the battery is glued onto the inside of the back cover (on its right side) while being soldered to the PCB by two thin wires: you probably don't want to break these, unless you're ok with fixing it later.

Figure 8. GCW Zero PCB

There you have it on Figure 8, the GCW-Zero PCB in its full glory.
Notice the black back cover on the right side of the picture: the back cover is pushed on the side but not completely detached due to the battery being soldered to the board as mentioned earlier.

Figure 9. GCW Zero PCB closeup

Looking closer, you can see four test points below the Ingenic JZ4770 SoC: RX, TX, GND and 3.3v.
That's where you'll need to solder the wires to get a serial output.

Figure 10. Tinning the test points

As shown on Figure 10, first tin the test points by dropping a small amount of solder onto them.

Strip away the tip of the insulation of your wire-wrapping wire, and slightly coat the strand with solder too.
Having tinned both the pads on the board and the wires, you should now be ready to solder the wires to each of the test points.

Figure 11. Closeup of RX, TX and 3.3v wires soldered

Due to the small pad size, you shouldn't use too much solder when tinning the pads: it results in bigger solder joints than needed as you can see in the figure above.
Watch out for the green wire which is way too much close to that capacitor: a little push and it will short RX, making the problem hard to find out.

Figure 12. Closeup of GND wire soldered

Having a hard time soldering the GND test point, the corresponding wire was ultimately soldered to the large pad next to the GCW Zero logo since it is used for ground connection anyway.
Note that there's too much solder on this joint too, and you'll probably need a small wire cutter to cut that kind of strand off.

Figure 13. Overview of all serial wires soldered

Big picture looks good. Not exactly pretty but good enough will do.

Figure 14. Glueing the wires and passing them through speaker hole

To hold everything in place and tidy up a bit, the wires are glued on top of the MicroSD card holder on Figure 14.
Also, the speaker grill on the bottom left has been removed to pass the wires through -- gently push it inward from the outside, it should come off easily.


As you may have already noticed, the wrapping wires pictured before are of different colours.
In order to make the connection scheme easier to remember, you can use the following colour code:

  • White for TX,
  • Green for RX,
  • Black for GND,
  • Red for Power (3.3v).

Figure 15. GCW Zero enabled with serial console output

Looking at the figure above, you should connect the wires to the USB-to-serial converter as follows:

  • Connect TX (white) from GCW Zero to RX on the USB-to-serial converter,
  • Connect RX (green) from GCW Zero to TX on the USB-to-serial converter,
  • Connect GND (black) from GCW Zero to GND on the USB-to-serial converter,
  • Connect 3.3v (red) from GCW Zero to 3.3v on the USB-to-serial converter.

Software setup

With the GCW-Zero now enabled with a serial output, hook it up via USB to a computer running your favourite terminal program (running Minicom in Figure 16).

Figure 16. GCW Zero boot process displayed in Minicom

Software configuration is as follows:

  • 57600 Bits/s baud rate,
  • 8 bits data, No parity, 1 stop bit (8N1),
  • No hardware flow control,
  • No software flow control.

Happy debugging :-).