Koda: |
openocd -f ~/Documents/ARM/sarm.cfg --log_output ~/Documents/ARM/sarm_error.log |
Koda: |
Error: arm_jtag.c:38 arm_jtag_set_instr_error_handler(): setting the new JTAG instruction failed, debugging is likely to be broken |
Koda: |
#daemon configuration
telnet_port 4444 gdb_port 3333 #interface interface parport parport_port /dev/parport0 parport_cable wiggler jtag_speed 2 #use combined on interfaces or targets that can't set TRST/SRST separately reset_config trst_and_srst #jtag scan chain #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) jtag_device 4 0x1 0xf 0xe #target configuration daemon_startup reset #target <type> <startup mode> #target arm7tdmi <reset mode> <chainpos> <endianness> <variant> target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4 target_script 0 reset h2294_init.script run_and_halt_time 0 30 working_area 0 0x40000000 0x40000 nobackup #flash configuration: *** LPC2138 (32KB RAM, 512KB flash) *** flash bank lpc2000 0x0 0x7D000 0 0 lpc2000_v2 0 24000 calc_checksum #flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum flash bank cfi 0x80000000 0x400000 2 2 0 |
Koda: |
#daemon configuration telnet_port 4444 gdb_port 3333 #commands specific to the Amontec JTAGKey interface ft2232 ft2232_device_desc "Olimex OpenOCD JTAG A" ft2232_layout "olimex-jtag" ft2232_vid_pid 0x15BA 0x0003 jtag_speed 9 jtag_nsrst_delay 333 jtag_ntrst_delay 333 #use combined on interfaces or targets that can't set TRST/SRST separately #reset_config trst_and_srst srst_pulls_trst reset_config trst_and_srst trst_pulls_srst #jtag scan chain #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) jtag_device 4 0x1 0xf 0xe #target configuration daemon_startup reset #target <type> <startup mode> #target arm7tdmi <reset mode> <chainpos> <endianness> <variant> target arm7tdmi little run_and_init 0 arm7tdmi-s_r4 run_and_halt_time 0 30 # flash-options LPC2138 #target_script 0 reset openocd_lpc2138_flash.script working_area 0 0x40000000 0x4000 nobackup # LPC2378 @ 12MHz / 0x80000 from 512*1024 ## up to version SVN188: #flash bank lpc2000 0x0 0x7D000 0 0 lpc2000_v2 0 12000 calc_checksum ## from Version SVN189: flash bank lpc2000 0x0 0x7D000 0 0 0 lpc2000_v2 12000 calc_checksum # For more information about the configuration files, take a look at: # http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger |
Koda: |
@echo off echo --- echo This script will setup path variable echo and start OpenOCD echo --- @echo on REM Variables: SET YAGARTO_ROOT=D:\Programs\yagarto REM SET WORKING_DIR=D:\ SET OPENOCD_BIN=openocd-ftd2xx.exe SET OPENOCD_PARAMS=-d -f SET OPENOCD_CONFIG=D:\Programs\yagarto\openocd\bin\arm7_usb-ocd.cfg REM Set PATH variable: SET PATH_BAK=%PATH% SET PATH=%YAGARTO_ROOT%\bin;%YAGARTO_ROOT%\arm-elf\bin;%YAGARTO_ROOT%\openocd\utils;%YAGARTO_ROOT%\openocd\bin;%PATH% REM Start OpenOCD %OPENOCD_BIN% %OPENOCD_PARAMS% %OPENOCD_CONFIG% pause |
Koda: |
jtag_speed 9 jtag_nsrst_delay 333 jtag_ntrst_delay 333 |
hazzard je napisal/a: |
opisovali ste uporabo JTAG debuggerja preko paralelnega porta, jaz pa tega na prenosniku seveda nimam. |
chaos je napisal/a: |
Kupiš pa lahko recimo Olimexov USB-OCD. |
hazzard je napisal/a: |
Torej prva težava, kakšen debugger naj uporabim?? kaj s tistim na plošči ni mogoče nič delat? |
hazzard je napisal/a: |
če se da bi rad naredil kaj doma... |
hazzard je napisal/a: |
Če je pa že kdo si nastavil eclipse za tak primer, naj mi prosim pomaga, v eclipse pa še nisem nikoli delal.
Torej kako spravim zadevo da bi delala? |
Koda: |
source [find interface/olimex-arm-usb-ocd-h.cfg]
##################################################### # Based on Philips LPC2138 # NXP LPC2138 ARM7TDMI-S with # 512kB flash (12kB used by bootloader) # 40kB SRAM (8kB for USB DMA) # clocked with 12MHz crystal source [find target/lpc2xxx.cfg] # parameters: # - chip_name - name of the chip, e.g. lpc2103 # - cputapids - TAP IDs of the core, should be quoted if more than one, e.g. 0x4f1f0f0f or "0x3f0f0f0f 0x4f1f0f0f" # - flash_size - size of on-chip flash (available for code, not including the bootloader) in bytes, e.g. 0x8000 # - flash_variant - "type" of LPC2xxx device, lpc2000_v1 (LPC22xx and older LPC21xx) or lpc2000_v2 (LPC213x, LPC214x, LPC210[123], LPC23xx and LPC24xx) # - workarea_size - size of work-area in RAM for flashing procedures, must not exceed the size of RAM available at 0x40000000, e.g. 0x2000 # - core_freq_khz - frequency of core in kHz during flashing, usually equal to connected crystal or internal oscillator, e.g. 12000 # - adapter_freq_khz - frequency of debug adapter in kHz, should be 8x slower than core_freq_khz, e.g. 1000 proc init_targets {} { # 500kB flash and 32kB SRAM # setup_lpc2xxx <chip_name> <cputapid> <flash_size> <flash_variant> <workarea_size> <core_freq_khz> <adapter_freq_khz> setup_lpc2xxx lpc2138 0x4f1f0f0f 0x7d000 lpc2000_v2 0x8000 12000 1500 } #daemon configuration telnet_port 4444 gdb_port 3333 |
Koda: |
openocd -f openocd.cfg |
Koda: |
arm-none-eabi-gdb mojProgram.elf |
Koda: |
(gdb) l |
Koda: |
1 // Date: 17.10.2011
2 // Author: Janez Puhan 3 4 #include "inc/pwm.h" 5 #include "inc/gpio.h" 6 7 int main() 8 { 9 return 0; 10 } |
Koda: |
arm-none-eabi-gdb -tui mojProgram.elf |
Koda: |
arm-none-eabi-gdbtui mojProgram.elf |
Koda: |
layout split |
Koda: |
fs {src | asm | regs | cmd} |
Koda: |
help karMeZanima |