2013年8月1日木曜日
Impression of "The secret garden"
Well, the topic of today is "The secret garden".
I don't mean the famous band of "secret garden" even though I like them quite much, I mean the classic novel "The Secret Garden". I got a kindle version from amazon, while it probably little old fashion, It is a pretty and lovely book, and it is free.
There are no much difficult vocabularies at this book, sentences are plain but attractive, Reading the book, you cannot help becoming to little Mary, feeling lonely, sorry, worry and happy as the little girl did in the book. I were impressive of the beauty words describing moor, you can smell the fresh wind was blowing from the moor when reading the describing of moor's season changing. For example, there is a describing of chapter 7, "The high, deep, blue sky arched over Misselthwaite as well as over the moor, and she kept lifting her face and looking up into it, trying to imagine what it would be like to lie down on one of the little snow-white clouds and float about. ", can you feel that? The sky, the cloud and the little Mary consist of a brilliant picture in readers mind. Just only one sentence. I hope someday I can write the words like this.
As a novel, it should keep giving reader a emotion active rather than a beautiful static scenery. The book provide a main clue the secret garden, not scary at all but mysterious enough. Although you can say that all story just is an adventure of a little girl, you would find that is really amazing even more attractive than those such as vampires, star wars, and batman and so on.
At last, that is a story which teacher you how to love. Nowadays, a increasing number of children like to stay in home, playing video game, chatting through the Internet day after day. They had forget how to talk with others, have no idea what is the nature, living in a virtual world lonely. They closed their heart and to be quite contrary. How such is like the little Mary? She were such a girl when she arrived at Misselthwaite Manor as she had never know what the love is. When she pursuit the secret of secret garden, she gradually changed herself by getting help of her friends robin, Martha, Dickon, finally she got strong enough and helped her cousin.
Everyone can read himself/herself from the story, everyone have a secret garden in his/her heart. Let's find it.
2010年1月20日水曜日
Debug in Qemu
Now it is time to try the debug in qemu.
1. Start the qemu use the switch "-s"
$ qemu-system-arm -s -kernel uImage --nographic -serial stdio -M mini2440
2. Run the gdb with the uboot, and then connect to the port 1234
$ arm-none-linux-gnueabi-gdb ~/mini2440/bootldr/mini2440/u-boot
(gdb) target remote localhost:1234
all right, you can debug the uboot now ^_^
Reference url:
http://www.h7.dion.ne.jp/~qemu-win/qemu-doc-ja.html#SEC29
1. Start the qemu use the switch "-s"
$ qemu-system-arm -s -kernel uImage --nographic -serial stdio -M mini2440
2. Run the gdb with the uboot, and then connect to the port 1234
$ arm-none-linux-gnueabi-gdb ~/mini2440/bootldr/mini2440/u-boot
(gdb) target remote localhost:1234
all right, you can debug the uboot now ^_^
Reference url:
http://www.h7.dion.ne.jp/~qemu-win/qemu-doc-ja.html#SEC29
http://www.technochakra.com/gdb-debugging-in-assembly/
http://wiki.linuxmce.com/index.php/Mini2440
http://wiki.linuxmce.com/index.php/Mini2440
2010年1月16日土曜日
Qemuでmini2440の試験環境構築
一、nfsとtftpの機能を使いたいので、先日作成したバッチファイルを使ってネット環境を設定
$ sudo bridge.sh eth0
$ ifconfig
br0 Link encap:Ethernet HWaddr 00:0a:e4:25:4e:5c
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::20a:e4ff:fe25:4e5c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13185 errors:0 dropped:0 overruns:0 frame:0
TX packets:14223 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:541714 (541.7 KB) TX bytes:8957464 (8.9 MB)
eth0 Link encap:Ethernet HWaddr 00:0a:e4:25:4e:5c
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
二、バッチファイルによってQemuを起動する
$ sudo qemu-boot.sh nfs uImage 192.168.2.1 /home/arm/mini2440/rootfs mini2440
U-Boot 1.3.2-mini2440 (Oct 6 2009 - 12:51:09)
I2C: ready
DRAM: 64 MB
Flash: 2 MB
NAND: Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
*** Warning - bad CRC or NAND, using default environment
USB: S3C2410 USB Deviced
In: serial
Out: serial
Err: serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot: 0
MINI2440 #
三、u-bootでipaddrとserveripを設定
MINI2440 # setenv ipaddr 192.168.2.2
MINI2440 # setenv serverip 192.168.2.1
四、kernelをtftpで30008000にダウンロード
MINI2440 # tftpboot 30008000 uImage
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:08:11:18:12:27
TFTP from server 192.168.2.1; our IP address is 192.168.2.2
Filename 'uImage'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###########
done
Bytes transferred = 2051788 (1f4ecc hex)
MINI2440 # md 30008000
30008000: 56190527 243ee462 e986514b 8c4e1f00 '..Vb.>$KQ....N.
30008010: 00800030 00800030 e7051465 00020205 0...0...e.......
五、nfsでrootfsをマウントするように、起動パラメータを設定
MINI2440 # setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.2.2 root=/dev/nfs rw nfsroot=192.168.2.1:/home/arm/mini2440/rootfs
六、kernelを起動
bootm 30008000
参考URL:
http://wiki.linuxmce.org/index.php/Mini2440
$ sudo bridge.sh eth0
$ ifconfig
br0 Link encap:Ethernet HWaddr 00:0a:e4:25:4e:5c
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::20a:e4ff:fe25:4e5c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13185 errors:0 dropped:0 overruns:0 frame:0
TX packets:14223 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:541714 (541.7 KB) TX bytes:8957464 (8.9 MB)
eth0 Link encap:Ethernet HWaddr 00:0a:e4:25:4e:5c
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
二、バッチファイルによってQemuを起動する
$ sudo qemu-boot.sh nfs uImage 192.168.2.1 /home/arm/mini2440/rootfs mini2440
U-Boot 1.3.2-mini2440 (Oct 6 2009 - 12:51:09)
I2C: ready
DRAM: 64 MB
Flash: 2 MB
NAND: Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
*** Warning - bad CRC or NAND, using default environment
USB: S3C2410 USB Deviced
In: serial
Out: serial
Err: serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot: 0
MINI2440 #
三、u-bootでipaddrとserveripを設定
MINI2440 # setenv ipaddr 192.168.2.2
MINI2440 # setenv serverip 192.168.2.1
四、kernelをtftpで30008000にダウンロード
MINI2440 # tftpboot 30008000 uImage
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:08:11:18:12:27
TFTP from server 192.168.2.1; our IP address is 192.168.2.2
Filename 'uImage'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###########
done
Bytes transferred = 2051788 (1f4ecc hex)
MINI2440 # md 30008000
30008000: 56190527 243ee462 e986514b 8c4e1f00 '..Vb.>$KQ....N.
30008010: 00800030 00800030 e7051465 00020205 0...0...e.......
五、nfsでrootfsをマウントするように、起動パラメータを設定
MINI2440 # setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.2.2 root=/dev/nfs rw nfsroot=192.168.2.1:/home/arm/mini2440/rootfs
六、kernelを起動
bootm 30008000
参考URL:
http://wiki.linuxmce.org/index.php/Mini2440
2010年1月15日金曜日
Qemu.mini2440
Got sources by git, use the commands as follow:
$ git clone git://repo.or.cz/qemu/mini2440.git
$ cd mini2440
$ ./configure --target-list=arm-softmmu --disable-kvm
$ make
$ sudo make install
put your u-boot.bin into "./mini2440/", and then
$ qemu-system-arm -kernel uImage --nographic -M mini2440
( Carefully, we didn't specific the path of u-boot.bin, because the path had been fix in sources,
image_size = load_image("mini2440/u-boot.bin", qemu_get_ram_ptr(0x03f80000));
if (image_size <>
image_size = load_image("u-boot.bin", qemu_get_ram_ptr(0x03f80000));
if (image_size > 0) {
if (image_size & (512 -1)) /* round size to a NAND block size */
image_size = (image_size + 512) & ~(512-1);
mini2440_printf("loaded override u-boot (size %x)\n", image_size);
s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start address, u-boot already relocated */
}
so, you should put the u-boot.bin into mini2440 folder first )
ok, now is u-boot time
S3C: CLK=240 HCLK=240 PCLK=240 UCLK=57
QEMU: ee24c08_init
DM9000: INIT QEMU MAC : 52:54:00:12:34:56
QEMU mini2440_reset: loaded default u-boot from NAND
QEMU mini2440_reset: loaded override u-boot (size 38c00)
QEMU mini2440_reset: loaded uImage (size 1f5000)
S3C: CLK=240 HCLK=240 PCLK=240 UCLK=48
S3C: CLK=304 HCLK=304 PCLK=304 UCLK=48
S3C: CLK=304 HCLK=101 PCLK=50 UCLK=48
S3C: CLK=304 HCLK=76 PCLK=38 UCLK=48
S3C: CLK=304 HCLK=76 PCLK=38 UCLK=48
S3C: CLK=405 HCLK=101 PCLK=50 UCLK=48
U-Boot 1.3.2-mini2440 (Jan 13 2010 - 19:40:10)
I2C: ready
DRAM: 64 MB
Flash: 2 MB
NAND: Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
*** Warning - bad CRC or NAND, using default environment
USB: S3C2410 USB Deviced
ERROR: usbd_device_event_irq(), 613: (3401cd88,1) NULL device or device->bus
ERROR: usbd_device_event_irq(), 613: (3401cd88,2) NULL device or device->bus
ERROR: usbd_device_event_irq(), 613: (3401cd88,3) NULL device or device->bus
In: serial
Out: serial
Err: serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot: 0
MINI2440 #
2010年1月14日木曜日
Fedoraでmini2440のQemu環境構築
① sudoの時、PATHが変わってしまうので、下記の命令が.bashrcに追加して解決できた。
alias sudo='sudo env PATH=$PATH'
② Qemuを使う前、bridgeの設定がバッチファイルにまとめ
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: `basename $0` {network interface name}."
exit
fi
# get ipaddress from ifconfig
IPADDR=`/sbin/ifconfig $1 | grep "inet addr" | awk '{ print $2}' | awk 'BEGIN { FS=":" } {print $2}'`
# get netmask from ifconfig
NETMASK=`/sbin/ifconfig $1 | grep "Mask" | awk '{ print $4}' | awk 'BEGIN { FS=":" } {print $2}'`
if [ -z $IPADDR ]; then
echo "Not found the ip address"
exit
elif [ -z $NETMASK ]; then
echo "Not found the netmask"
exit
fi
sudo /sbin/ifconfig br0 down
sudo /usr/sbin/brctl delbr br0
sudo /usr/sbin/brctl addbr br0
sudo /usr/sbin/brctl addif br0 $1
sudo /sbin/ifconfig br0 up
sudo /sbin/ifconfig $1 0.0.0.0 up
sudo /sbin/ifconfig br0 $IPADDR netmask $NETMASK
③起動と終了のスクリプト
[arm@localhost images]$ more ~/tools/qemu-ifup
#! /bin/sh
/sbin/ifconfig $1 0.0.0.0 promisc up
/usr/sbin/brctl addif br0 $1
[arm@localhost images]$ more ~/tools/qemu-ifdown
#! /bin/sh
/usr/sbin/brctl delif br0 $1
/sbin/ifconfig $1 down
④Qemuの命令が長いので、バッチファイルを作ろう
#! /bin/sh
METHOD=$1
SCRIPTPATH="/home/arm/tools"
SCRIPT="$SCRIPTPATH/qemu-ifup"
DOWNSCRIPT="$SCRIPTPATH/qemu-ifdown"
NETFLAG="-net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$SCRIPT,downscript=$DOWNSCRIPT "
if [ $METHOD == "file" ]; then
MACHINE=$4
KERNEL=$2
ROOTFS=$3
EXPECTED_ARGS=3
if [ $# -ge $EXPECTED_ARGS ]; then
if ! [ -f "$KERNEL" ];then
echo "not found kernel file"
exit
elif ! [ -f "$ROOTFS" ];then
echo "not found rootfs file"
exit
elif [ -z "$MACHINE" ];then
MACHINE=versatileab
fi
qemu-system-arm -M $MACHINE -kernel $KERNEL -append root=/dev/sda1 $ROOTFS $NETFLAG
exit
fi
elif [ $METHOD == "nfs" ]; then
MACHINE=$5
NFSPATH=$4
KERNEL=$2
HOSTIP=$3
EXPECTED_ARGS=4
if ! [ -f "$KERNEL" ];then
echo "not found kernel file"
exit
elif [ -z "$MACHINE" ];then
MACHINE=versatileab
fi
qemu-system-arm -M $MACHINE -kernel $KERNEL -append root="/dev/nfs nfsroot=$HOSTIP:$NFSPATH rw ip=dhcp" $NETFLAG
exit
fi
echo "Usage: `basename $0` (file/nfs) Kernel (Rootfs/(Hostip Nfspath) [Machine]"
2009年12月2日水曜日
Resources
Linker Script File
http://www.bravegnu.org/gnu-eprog/lds.htmlGCC Inline Assembler
http://caspar.hazymoon.jp/OpenBSD/annex/gcc_inline_asm.html
Linux内核启动过程(2.6.23)
http://blog.sina.com.cn/s/blog_4c2edd700100cne2.html
Linux2.6内核笔记
http://utensil.javaeye.com/blog/377815
http://utensil.javaeye.com/blog/382631
Linux内核启动过程(2.6.23)
http://blog.sina.com.cn/s/blog_4c2edd700100cne2.html
Linux2.6内核笔记
http://utensil.javaeye.com/blog/377815
http://utensil.javaeye.com/blog/382631
u-boot in mini2440
2009年9月16日水曜日
xclexeのリリース
I made the program for clipboard extension of Linux
everything xclexe can do is just keep watching the clipboard , and throw it to specific application by the rule.
Don't worry about you are no idea of the rule. Just execute it, and then you will get the sample under the $HOME/.xclexe
[global]
#x=50
#y=50
#width=840
#height=70
#border_width=2
[exec]
#PATH=/usr/bin/ed2k
#KEYWORD=ed2k:
#FLAG=1
There are 2 section in rule file, The first one is [global], you can define the windows size and position at here.
And second one is [exec], you can define the specific application rule at here. if you have one more rule just need to append a new [exec] section.
For example.
[exec]
PATH=/usr/bin/ed2k
KEYWORD=ed2k:
FLAG=1
PATH means specific application path.
KEYWORD means the keyword of clipboard content.
FLAG means searching rule, 1 means check the content head, 2 means check the content end, 0 - means search the keyword.
The sample means keep check the clipboard content, if the content begin with "edk2:" string,
Then clipboard content would be the first parameter execute by the /usr/bin/ed2k.
Translate to the comand line is:
/usr/bin/ed2k
BTW, # means comment out.
enjoy it!
you can download the sources from the URL
http://file7.brsbox.com/download.php?sid=cd48f0bb55ece2d19cb4329a866bfbab&fc=e63d5a4a126d0ad675631a5688bdf375/xclexe.tar.gz
everything xclexe can do is just keep watching the clipboard , and throw it to specific application by the rule.
Don't worry about you are no idea of the rule. Just execute it, and then you will get the sample under the $HOME/.xclexe
[global]
#x=50
#y=50
#width=840
#height=70
#border_width=2
[exec]
#PATH=/usr/bin/ed2k
#KEYWORD=ed2k:
#FLAG=1
There are 2 section in rule file, The first one is [global], you can define the windows size and position at here.
And second one is [exec], you can define the specific application rule at here. if you have one more rule just need to append a new [exec] section.
For example.
[exec]
PATH=/usr/bin/ed2k
KEYWORD=ed2k:
FLAG=1
PATH means specific application path.
KEYWORD means the keyword of clipboard content.
FLAG means searching rule, 1 means check the content head, 2 means check the content end, 0 - means search the keyword.
The sample means keep check the clipboard content, if the content begin with "edk2:" string,
Then clipboard content would be the first parameter execute by the /usr/bin/ed2k.
Translate to the comand line is:
/usr/bin/ed2k
BTW, # means comment out.
enjoy it!
you can download the sources from the URL
http://file7.brsbox.com/download.php?sid=cd48f0bb55ece2d19cb4329a866bfbab&fc=e63d5a4a126d0ad675631a5688bdf375/xclexe.tar.gz
2009年8月13日木曜日
Cortextと関係ないですが(その1)
子供を生まれったので、最近はものすごく忙しくで、せかくstm32f107のチープをもらったのに、試しの時間もなくなった...
父は大変よ~~~
まぁ~~最近linuxの仕事ばかりやっているので、Linuxの情報をメモしたいと思う
①Fedora11のSELINUXを止まれ
# vi /etc/sysconfig/selinux
SELINUX=disabled
保存してから再起動
②Fedora11でiptableを止まれ
# /etc/init.d/iptables stop
③Fedora11でWineで作ったプログラムをサービスとして登録
スクリプトのサンプルが下記の通り
#!/bin/bash
# chkconfig: 35 99 1
# 上記の一行はchkconfig専用、ない登録できない
progname=service
# wineのプログラムをデーモンで実行させるように、作ったプログラム、ソースは面倒から添付しない
# 原理は簡単、fork関数だけ
wineloader=/usr/local/bin/wineloader
#サービスのパス
prog=/usr/local/bin/service
# wineがrootで実行すると、かなり危険ので、通常のユーザで登録
user=kevinx
# Source function library.
#このファイルにいい関数がいっぱい入っている、Fedora11特有
. /etc/init.d/functions
RETVAL=0
start() {
echo -n $"Starting $progname: "
daemon --user $user $wineloader -e $prog
RETVAL=$?
return $RETVAL
}
stop() {
echo -n $"Stopping $progname: "
killproc $prog
RETVAL=$?
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
esac
exit $RETVAL
登録命令
chkconfig --add service
スクリプトの参照URLは
http://www.geocities.co.jp/SiliconValley-Cupertino/9120/startup.html
http://surf.ap.seikei.ac.jp/~nakano/linux/init.d.html
wineloaderの参照URLは
http://d.hatena.ne.jp/rero/20041002/p1
つづく...
父は大変よ~~~
まぁ~~最近linuxの仕事ばかりやっているので、Linuxの情報をメモしたいと思う
①Fedora11のSELINUXを止まれ
# vi /etc/sysconfig/selinux
SELINUX=disabled
保存してから再起動
②Fedora11でiptableを止まれ
# /etc/init.d/iptables stop
③Fedora11でWineで作ったプログラムをサービスとして登録
スクリプトのサンプルが下記の通り
#!/bin/bash
# chkconfig: 35 99 1
# 上記の一行はchkconfig専用、ない登録できない
progname=service
# wineのプログラムをデーモンで実行させるように、作ったプログラム、ソースは面倒から添付しない
# 原理は簡単、fork関数だけ
wineloader=/usr/local/bin/wineloader
#サービスのパス
prog=/usr/local/bin/service
# wineがrootで実行すると、かなり危険ので、通常のユーザで登録
user=kevinx
# Source function library.
#このファイルにいい関数がいっぱい入っている、Fedora11特有
. /etc/init.d/functions
RETVAL=0
start() {
echo -n $"Starting $progname: "
daemon --user $user $wineloader -e $prog
RETVAL=$?
return $RETVAL
}
stop() {
echo -n $"Stopping $progname: "
killproc $prog
RETVAL=$?
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
esac
exit $RETVAL
登録命令
chkconfig --add service
スクリプトの参照URLは
http://www.geocities.co.jp/SiliconValley-Cupertino/9120/startup.html
http://surf.ap.seikei.ac.jp/~nakano/linux/init.d.html
wineloaderの参照URLは
http://d.hatena.ne.jp/rero/20041002/p1
つづく...
2009年7月4日土曜日
Linuxのusb sniffer
昔Windowsの場合、USBのドライバを開発するとき、BUS Houndを使ってUSB通信パケットをキャプチャできるんですが、今Linuxの環境で同じようなものを探します。
結局、カーネルでCONFIG_DEBUG_FSとCONFIG_USB_MONのオプションを有効すれば、何もインストールしなくでも簡単にできるです。
命令が下記のとおり:
http://pylone.jp/blog/tips_usbmon
結局、カーネルでCONFIG_DEBUG_FSとCONFIG_USB_MONのオプションを有効すれば、何もインストールしなくでも簡単にできるです。
命令が下記のとおり:
# mount -t debugfs none /sys/kernel/debug詳しい情報が下記のURLを参照
# cat /sys/kernel/debug/usbmon/0u
ここ0uの意味は全通信を監視
特定のデバイスを監視の場合が、そのデバイス対応しているの番号を使います。
ちなみに、番号確認命令はlsusbです。
http://pylone.jp/blog/tips_usbmon
2009年6月30日火曜日
VIMが大好き!
最初はVIMのこと使いにくいと思いました。
少しつつ勉強しながら、大好きになりました。
やはり、メインキーボードだけ、なんでもできるのはかっこういいでしょう ^^
VIMでtagの使い方を探していた時、下記のURLを見つかりました。
ありがとう、勉強になりました!
2009年6月26日金曜日
NVICの優先順位について
ここ参照します。
http://blog.ednchina.com/STM32/143803/message.aspx/* 0 bits for pre-emption priority 4 bits for subpriority */
#define NVIC_PriorityGroup_0 ((u32)0x700)
/* 1 bits for pre-emption priority 3 bits for subpriority */
#define NVIC_PriorityGroup_1 ((u32)0x600)
/* 2 bits for pre-emption priority 2 bits for subpriority */
#define NVIC_PriorityGroup_2 ((u32)0x500)
/* 3 bits for pre-emption priority 1 bits for subpriority */
#define NVIC_PriorityGroup_3 ((u32)0x400)
/* 4 bits for pre-emption priority 0 bits for subpriority */
#define NVIC_PriorityGroup_4 ((u32)0x300)
割り込みを発生する時、優先順位高いの関数が優先順位低いの関数を中断して先に実行する。
pre-emptionの数字が低いの方が優先順位が高い、例えば:0が1より優先が高い。
pre-emptionは同じの場合、subpriorityの数字を確認する、小さいの方が高い。
わたしのコードが下記を示す
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
NVIC_InitStructure.NVIC_IRQChannel = USB_LP_CAN_RX0_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
/* Enable USART1 Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_Init(&NVIC_InitStructure);
/* Enable the DMA1 Channel1 Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
優先1、USART1
優先2、USB
優先3、DMA1
2009年6月22日月曜日
ADCのサンプルコード
ANALOG INPUT:PA.4(ADC_AIN_CHANNEL_X)、PC.4(ADC_AIN_CHANNEL_Y)、PC.5(ADC_AIN_CHANNEL_Z)
DMA1を利用して、X Y Z情報がADC1_DR_AddressからADC_ConvertedValueXに自動保存します。
ADC_ConvertedValueX[0]=X
ADC_ConvertedValueX[1]=Y
ADC_ConvertedValueX[2]=Z
サンプルコードが下記に示す。
void ADC_Configuration(void)
{
ADC_InitTypeDef ADC_InitStructure;
DMA_InitTypeDef DMA_InitStructure;
/* Enable DMA1 clock */
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
/* Enable ADC1 clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
/* DMA1 channel1 configuration ---------------------------------------------*/
DMA_DeInit(DMA1_Channel1);
DMA_InitStructure.DMA_PeripheralBaseAddr = ADC1_DR_Address;
DMA_InitStructure.DMA_MemoryBaseAddr = (u32)&ADC_ConvertedValueX[0];
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
DMA_InitStructure.DMA_BufferSize = 3;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;/*DMA_MemoryInc_Disable;*/
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
DMA_Init(DMA1_Channel1, &DMA_InitStructure);
/* Enable DMA1 channel1 */
DMA_Cmd(DMA1_Channel1, ENABLE);
/* Enable the DMA1 Channel1 Transfer complete interrupt */
DMA_ITConfig(DMA1_Channel1, DMA_IT_TC, ENABLE);
/* ADC1 configuration ------------------------------------------------------*/
ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
ADC_InitStructure.ADC_ScanConvMode = ENABLE;
ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
ADC_InitStructure.ADC_NbrOfChannel = 3;
ADC_Init(ADC1, &ADC_InitStructure);
/* ADC1 regular channel configuration */
ADC_RegularChannelConfig(ADC1, ADC_AIN_CHANNEL_X, 1, ADC_SampleTime_55Cycles5);
ADC_RegularChannelConfig(ADC1, ADC_AIN_CHANNEL_Y, 2, ADC_SampleTime_55Cycles5);
ADC_RegularChannelConfig(ADC1, ADC_AIN_CHANNEL_Z, 3, ADC_SampleTime_55Cycles5);
/* Enable ADC1 DMA */
ADC_DMACmd(ADC1, ENABLE);
/* Enable ADC1 */
ADC_Cmd(ADC1, ENABLE);
/* Enable ADC1 reset calibaration register */
ADC_ResetCalibration(ADC1);
/* Check the end of ADC1 reset calibration register */
while(ADC_GetResetCalibrationStatus(ADC1));
/* Start ADC1 calibaration */
ADC_StartCalibration(ADC1);
/* Check the end of ADC1 calibration */
while(ADC_GetCalibrationStatus(ADC1));
}
今、OpenJTAGを使ってデバック環境でX、Y、Z情報をきちんと取りますが、デバッグ以外の場合がDMA1の割り込みを発生しません。
何で?
DMA1を利用して、X Y Z情報がADC1_DR_AddressからADC_ConvertedValueXに自動保存します。
ADC_ConvertedValueX[0]=X
ADC_ConvertedValueX[1]=Y
ADC_ConvertedValueX[2]=Z
サンプルコードが下記に示す。
void ADC_Configuration(void)
{
ADC_InitTypeDef ADC_InitStructure;
DMA_InitTypeDef DMA_InitStructure;
/* Enable DMA1 clock */
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
/* Enable ADC1 clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
/* DMA1 channel1 configuration ---------------------------------------------*/
DMA_DeInit(DMA1_Channel1);
DMA_InitStructure.DMA_PeripheralBaseAddr = ADC1_DR_Address;
DMA_InitStructure.DMA_MemoryBaseAddr = (u32)&ADC_ConvertedValueX[0];
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC;
DMA_InitStructure.DMA_BufferSize = 3;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;/*DMA_MemoryInc_Disable;*/
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
DMA_InitStructure.DMA_Mode = DMA_Mode_Circular;
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
DMA_InitStructure.DMA_M2M = DMA_M2M_Disable;
DMA_Init(DMA1_Channel1, &DMA_InitStructure);
/* Enable DMA1 channel1 */
DMA_Cmd(DMA1_Channel1, ENABLE);
/* Enable the DMA1 Channel1 Transfer complete interrupt */
DMA_ITConfig(DMA1_Channel1, DMA_IT_TC, ENABLE);
/* ADC1 configuration ------------------------------------------------------*/
ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
ADC_InitStructure.ADC_ScanConvMode = ENABLE;
ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
ADC_InitStructure.ADC_NbrOfChannel = 3;
ADC_Init(ADC1, &ADC_InitStructure);
/* ADC1 regular channel configuration */
ADC_RegularChannelConfig(ADC1, ADC_AIN_CHANNEL_X, 1, ADC_SampleTime_55Cycles5);
ADC_RegularChannelConfig(ADC1, ADC_AIN_CHANNEL_Y, 2, ADC_SampleTime_55Cycles5);
ADC_RegularChannelConfig(ADC1, ADC_AIN_CHANNEL_Z, 3, ADC_SampleTime_55Cycles5);
/* Enable ADC1 DMA */
ADC_DMACmd(ADC1, ENABLE);
/* Enable ADC1 */
ADC_Cmd(ADC1, ENABLE);
/* Enable ADC1 reset calibaration register */
ADC_ResetCalibration(ADC1);
/* Check the end of ADC1 reset calibration register */
while(ADC_GetResetCalibrationStatus(ADC1));
/* Start ADC1 calibaration */
ADC_StartCalibration(ADC1);
/* Check the end of ADC1 calibration */
while(ADC_GetCalibrationStatus(ADC1));
}
今、OpenJTAGを使ってデバック環境でX、Y、Z情報をきちんと取りますが、デバッグ以外の場合がDMA1の割り込みを発生しません。
何で?
2009年6月12日金曜日
2009年6月8日月曜日
Virtual Com Portがやっとできました ^_^
STM32の割り込みサービスルーチン(stm32f10x_it)が更新していないのせいだ、
割り込み関数正しく処理されていませんので、USBデバイスが認識をできなくなた。
hw_config.cにNVICの定義が下記の通り
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
NVIC_InitStructure.NVIC_IRQChannel = USB_LP_CAN_RX0_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
で、今のstm32f10x_itにこの割り込み関数が空っぽだ。
void USB_LP_CAN_RX0_IRQHandler(void)
{
}
stm32f10x_itを調整して(crt0_STM32xが古いので、調整も必要です)
void USB_LP_CAN_RX0_IRQHandler(void)
{
USB_Istr();
}
OpenJTAGを外して、ボードだけPCに挿入してみると、デバイスが見つかりました!
USB認識には、OpenJTAGが直接使わないですが、
でもおかげで、あやし所を確認できました、JTAGがいいものですね ^^
2009年6月5日金曜日
工欲善其事,必先利其器
今日は開発環境構築について、参照した資料を整理します。
◆ CodeSourcery G++
◆ Openocd
私の場合が安定のためバージョン1690をインストールした
./configure --enable-ft2232_libftdi --enable-usbprog
./configure --enable-ft2232_libftdi --enable-usbprog
◆ Eclipse
GDB Hardware Debuggingの導入:
◆ OpenJTAG
◆ FreeRTOSの導入
これから、シリアルとUSBを検証したいので、下記の資料が探す
以上
2009年6月4日木曜日
Eclipse & RTOSDemo
FreeRTOSがEclipseに導入の参照資料:
JTAGKey-Tinyの設定資料:
今回OpenJtagを利用したいので、Eclipse環境にopenocdの設定ファイルを改造することを必要と思う
openocdの設定ファイルは四つがあります。
◆ jtagkey.cfg
# default ports
telnet_port 4444
gdb_port 3333
tcl_port 6666
# interface configuration
interface ft2232
#ft2232_device_desc "Amontec JTAGkey A"
ft2232_device_desc "USB<=>JTAG&RS232
#ft2232_layout jtagkey
ft2232_layout "jtagkey_prototype_v1
#ft2232_vid_pid 0x0403 0xcff8
ft2232_vid_pid 0x1457 0x511
#jtag_speed 30
#jtag_khz 500
◆ stm32_mdBZ.cfg
# for stm32 medium density RevB and Z
set _CHIPNAME stm32
set _ENDIAN little
# jtag speed
#jtag_khz 565
reset_config trst_and_srst srst_pulls_trst
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst
#jtag scan chain
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
# See STM Document RM0008
# Section 26.6.3
set _CPUTAPID 0x3ba00477
}
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
if { [info exists BSTAPID ] } {
set _BSTAPID $BSTAPID
} else {
# See STM Document RM0008
# Section 26.6.2
# Medium Density RevA
# set _BSTAPID 0x06410041
# Rev B and Rev Z
# set _BSTAPID 0x16410041
# My board is a Rev B and Rev Z
set _BSTAPID 0x16410041
}
jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BSTAPID
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
#flash bank stm32x 0 0 0 0 0
#The flash of my board is start from 0x8000000 and length is 128k
flash bank stm32x 0x08000000 0x20000 0 0 0
# For more information about the configuration files, take a look at:
# openocd.texi
◆ stm32_gdb.cfg
# default ports
telnet_port 4444
gdb_port 3333
tcl_port 6666
init
jtag_khz 565
#reset init
verify_ircapture disable
◆ stm32_program_eclipse.cfg
# default ports
telnet_port 4444
gdb_port 3333
tcl_port 6666
init
jtag_khz 565
#reset init
verify_ircapture disable
halt
wait halt
poll
stm32x mass_erase 0
#flash write_image C:/Projects/FreeRTOS/Demo/CORTEX_STM32Fxxx_Eclipse/RTOSDemo/RTOSDemo.bin 0x08000000 bin
flash write_image ./RTOSDemo/RTOSDemo.bin 0x8000000 bin
reset run
shutdown
STM32に書き込み場合が Run -> Externels Tools -> OpenOCD Programmerを使います。
デバックの場合が Run -> Externels Tools -> OpenOCD Serverを利用します。
Eclipse+OpenOCD+OpenJTAG+STM32の開発環境ができました!
d^_^b
デバックの場合が Run -> Externels Tools -> OpenOCD Serverを利用します。
Eclipse+OpenOCD+OpenJTAG+STM32の開発環境ができました!
d^_^b
2009年6月3日水曜日
zylincdtについて
Eclipse環境構築すると、大体二つの方式があります、
ELFファイルによってデバッグするの場合がzylincdtになります。
今回zylinを利用するつもりはないですが、一応メモします。
Eclipse CDT plugin | Eclipse update site | Mini FAQ
Zylin Embedded CDT
Zylin-embedded CDT works with the official Eclipse CDT 4.x or newer.
From time to time Zylin has some patches to CDT that are not yet part of the official CDT CVS HEAD. Normally there is also a bug report sent to CDT for each of the issues. These "work-in-progress-at-your-own-risk-thus-warned-patches" are kept in cdtpatches.txt together with the Zylin Embedded CDT source code.
Download & installation
1. Install Eclipse 3.3 or newer. We recommend the Eclipse Classic 3.x package
http://www.eclipse.org
2. Eclipse CDT 4.x or newer
http://www.eclipse.org/cdt
3. Install Zylin-embedded CDT using, the update site
http://opensource.zylin.com/zylincdt
If you are unfamiliar with Eclipse update sites, Subclipse provides helpful instructions. page:
http://subclipse.tigris.org/install.html
OpenJTAGの2
openocd.cfgを下記のように修正した
telnet_port 4444
gdb_port 3333
gdb_memory_map enable
gdb_flash_program enable
interface ft2232
jtag_speed 1
ft2232_vid_pid 0x1457 0x5118
ft2232_latency 2
ft2232_layout "jtagkey_prototype_v1"
reset_config trst_and_srst
# script for stm32
# jtag speed
jtag_khz 500
jtag_nsrst_delay 100
jtag_ntrst_delay 100
reset_config trst_and_srst
jtag_device 4 0x1 0xf 0xe
jtag_device 5 0x1 0x1 0x1e
target create target0 cortex_m3 -endian little -chain-position 0
[new_target_name] configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
flash bank stm32x 0x08000000 0x20000 0 0 0
openocdを実行する
kevinx@Ubuntu:~/workspace$ openocd
Open On-Chip Debugger 1.0 (2008-11-26-09:42) svn:unknown
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
jtag_speed: 1
500 kHz
Info: JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
Info: JTAG device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1)
Warning:no tcl port specified, using default port 6666
telnetに確認
kevinx@Ubuntu:~/workspace$ telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> poll
target state: unknown
> halt
target was in unknown state when halt was requested
> resume
> poll
target state: running
>
よくわからないですが、openocdができました!
telnet_port 4444
gdb_port 3333
gdb_memory_map enable
gdb_flash_program enable
interface ft2232
jtag_speed 1
ft2232_vid_pid 0x1457 0x5118
ft2232_latency 2
ft2232_layout "jtagkey_prototype_v1"
reset_config trst_and_srst
# script for stm32
# jtag speed
jtag_khz 500
jtag_nsrst_delay 100
jtag_ntrst_delay 100
reset_config trst_and_srst
jtag_device 4 0x1 0xf 0xe
jtag_device 5 0x1 0x1 0x1e
target create target0 cortex_m3 -endian little -chain-position 0
[new_target_name] configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
flash bank stm32x 0x08000000 0x20000 0 0 0
openocdを実行する
kevinx@Ubuntu:~/workspace$ openocd
Open On-Chip Debugger 1.0 (2008-11-26-09:42) svn:unknown
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
jtag_speed: 1
500 kHz
Info: JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
Info: JTAG device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1)
Warning:no tcl port specified, using default port 6666
telnetに確認
kevinx@Ubuntu:~/workspace$ telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> poll
target state: unknown
> halt
target was in unknown state when halt was requested
> resume
> poll
target state: running
>
よくわからないですが、openocdができました!
2009年6月2日火曜日
OpenJTAGの1
今日はOpenJtagを試しました。
PCに接続してみたら
kevinx@Ubuntu:~/workspace$ openocd
Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
Info: options.c:50 configuration_output_handler(): jtag_speed: 0, 0
Info: options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1)
Error: jtag.c:1399 jtag_examine_chain(): number of discovered devices in JTAG chain (2) doesn't match configuration (1)
Error: jtag.c:1400 jtag_examine_chain(): check the config file and ensure proper JTAG communication (connections, speed, ...)
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway...
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1)
Error: jtag.c:1399 jtag_examine_chain(): number of discovered devices in JTAG chain (2) doesn't match configuration (1)
Error: jtag.c:1400 jtag_examine_chain(): check the config file and ensure proper JTAG communication (connections, speed, ...)
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway...
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
設定ファイルっぽいですね。
kevinx@Ubuntu:~/workspace$ more openocd.cfg
telnet_port 4444
gdb_port 3333
interface ft2232
jtag_speed 0
ft2232_vid_pid 0x1457 0x5118
ft2232_layout "jtagkey_prototype_v1"
reset_config trst_and_srst
jtag_device 4 0x1 0xf 0xe
daemon_startup attach
target arm920t little reset_run 0 arm920t
#arm7_9 fast_memory_access enable
working_area 0 0x200000 0x4000 backup
#flash bank cfi 0 0x100000 2 2 0
#debug_level 3
nand device s3c2440 0
run_and_halt_time 0 5000
ft2232_device_desc "USB<=>JTAG&RS232"
今回のターゲットはcortex-m3ですので、target arm920t はもちろんダメじゃないですか...
正しいの設定は何だろうかな...
PCに接続してみたら
kevinx@Ubuntu:~/workspace$ openocd
Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
Info: options.c:50 configuration_output_handler(): jtag_speed: 0, 0
Info: options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1)
Error: jtag.c:1399 jtag_examine_chain(): number of discovered devices in JTAG chain (2) doesn't match configuration (1)
Error: jtag.c:1400 jtag_examine_chain(): check the config file and ensure proper JTAG communication (connections, speed, ...)
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway...
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1)
Error: jtag.c:1399 jtag_examine_chain(): number of discovered devices in JTAG chain (2) doesn't match configuration (1)
Error: jtag.c:1400 jtag_examine_chain(): check the config file and ensure proper JTAG communication (connections, speed, ...)
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway...
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x11
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
設定ファイルっぽいですね。
kevinx@Ubuntu:~/workspace$ more openocd.cfg
telnet_port 4444
gdb_port 3333
interface ft2232
jtag_speed 0
ft2232_vid_pid 0x1457 0x5118
ft2232_layout "jtagkey_prototype_v1"
reset_config trst_and_srst
jtag_device 4 0x1 0xf 0xe
daemon_startup attach
target arm920t little reset_run 0 arm920t
#arm7_9 fast_memory_access enable
working_area 0 0x200000 0x4000 backup
#flash bank cfi 0 0x100000 2 2 0
#debug_level 3
nand device s3c2440 0
run_and_halt_time 0 5000
ft2232_device_desc "USB<=>JTAG&RS232"
今回のターゲットはcortex-m3ですので、target arm920t はもちろんダメじゃないですか...
正しいの設定は何だろうかな...
2009年6月1日月曜日
登録:
投稿 (Atom)
