summaryrefslogtreecommitdiffstats
path: root/include/package-debug.mk
blob: 2a85bfebb87a8eaca7aea1109fae19fa32760c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 
# Copyright (C) 2006,2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

ifeq ($(DUMP),)
  define BuildTarget/debug

    DEBUG_STAMP_$(1) := $(DEBUG_DIR)/stamp/$(1)

    ifdef Package/$(1)/install
      ifneq ($(CONFIG_PACKAGE_$(1))$(SDK)$(DEVELOPER),)
        compile: $$(DEBUG_STAMP_$(1))
      endif
    endif

    $$(DEBUG_STAMP_$(1)): $(PKG_BUILD_DIR)/.built
		mkdir -p $(DEBUG_DIR)/stamp
		$(call Package/$(1)/install,$(DEBUG_DIR))
		touch $$(DEBUG_STAMP_$(1))


  endef
endif
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.