aboutsummaryrefslogtreecommitdiffstats
path: root/include/toplevel.mk
Commit message (Expand)AuthorAgeFilesLines
* optimize the .config dependency chain in the toplevel makefileFelix Fietkau2009-03-031-2/+2
* avoid implicit rules in even more placesFelix Fietkau2009-03-031-7/+7
* add staging_dir/host/lib to LD_LIBRARY_PATH so that host-built applications c...Felix Fietkau2009-02-281-0/+2
* one more instance of r13005Felix Fietkau2008-10-181-1/+1
* don't overwrite .config if it's a symlink (fix
Debugging hardware can be tricky especially when doing kernel and drivers
development. It might become handy for you to add serial console to your
device as well as using JTAG to debug your code.

\subsection{Adding a serial port}

Most routers come with an UART integrated into the System-on-chip
and its pins are routed on the Printed Circuit Board to allow
debugging, firmware replacement or serial device connection (like
modems).

Finding an UART on a router is fairly easy since it only needs at
least 4 signals (without modem signaling) to work : VCC, GND, TX and
RX. Since your router is very likely to have its I/O pins working at
3.3V (TTL level), you will need a level shifter such as a Maxim MAX232
to change the level from 3.3V to your computer level which is usually
at 12V.

To find out the serial console pins on the PCB, you will be looking
for a populated or unpopulated 4-pin header, which can be far from
the SoC (signals are relatively slow) and usually with tracks on
the top or bottom layer of the PCB, and connected to the TX and RX.

Once found, you can easily check where is GND, which is connected to
the same ground layer than the power connector. VCC should be fixed
at 3.3V and connected to the supply layer, TX is also at 3.3V level
but using a multimeter as an ohm-meter and showing an infinite
value between TX and VCC pins will tell you about them being different
signals (or not). RX and GND are by default at 0V, so using the same
technique you can determine the remaining pins like this.

If you do not have a multimeter a simple trick that usually works is
using a speaker or a LED to determine the 3.3V signals. Additionnaly
most PCB designer will draw a square pad to indicate ping number 1.

Once found, just interface your level shifter with the device and the
serial port on the PC on the other side. Most common baudrates for the
off-the-shelf devices are 9600, 38400 and 115200 with 8-bits data, no
parity, 1-bit stop.

\subsection{JTAG}

JTAG stands for Joint Test Action Group, which is an IEEE workgroup
defining an electrical interface for integrated circuit testing and
programming.

There is usually a JTAG automate integrated into your System-on-Chip
or CPU which allows an external software, controlling the JTAG adapter
to make it perform commands like reads and writes at arbitray locations.
Additionnaly it can be useful to recover your devices if you erased the
bootloader resident on the flash.

Different CPUs have different automates behavior and reset sequence,
most likely you will find ARM and MIPS CPUs, both having their standard
to allow controlling the CPU behavior using JTAG.

Finding JTAG connector on a PCB can be a little easier than finding the
UART since most vendors leave those headers unpopulated after production.
JTAG connectors are usually 12, 14, or 20-pins headers with one side of
the connector having some signals at 3.3V and the other side being
connected to GND.
fix parallel build issuesFelix Fietkau2007-11-041-0/+1 * increase scan depth to 5 for package/ (x.org is nested deeper than the rest o...Felix Fietkau2007-11-031-1/+1 * add autorebuild check for menuconfigFelix Fietkau2007-10-141-1/+1 * add possibility to set default .config valuesJohn Crispin2007-10-141-0/+2 * remove feeds dir on distcleanFelix Fietkau2007-10-091-1/+1 * only run svn info if .svn existsFelix Fietkau2007-10-091-1/+1 * add initial version of a package feeds management scriptFelix Fietkau2007-09-231-3/+5 * major target cleanup. it is now possible to have subtargets that can override...Felix Fietkau2007-09-081-2/+1 * strip the kernel version suffix from target directories, except for brcm-2.4 ...Felix Fietkau2007-09-061-1/+1 * build system cleanup/restructuring as described in http://lists.openwrt.org/p...Felix Fietkau2007-08-071-1/+4 * next round of cleanup, convert target/ - make -j works now ;)Felix Fietkau2007-07-301-3/+5 * next round of build system cleanup - convert package/ to new structureFelix Fietkau2007-07-301-26/+16 * build system fixes, more cleanupFelix Fietkau2007-07-281-11/+13 * more build system cleanupFelix Fietkau2007-07-281-0/+132