2012年2月23日木曜日
LPCXpresso IDEでアセンブラ単位のステップ実行
いつもどおりデバッグを始めるよね。
で、デバッグビューのツールバーには、ステップインとステップオーバーがある。ステップインは、関数内に入る。
ステップオーバーは、関数内を実行してしまい、次の行に進む。
まぁ、ここら辺までは、良いよね。でもさ、OSとかのデバッグとか、インラインアセンブラで書いた部分をデバッグしようとすると、これだと事足りないわけですよ。C言語で書いたプログラムをディスアセンブルしたものの機械語を一つずつステップ実行したいとかなるわけです。そこで、コレ。
押してみると、ビューが変わる。
ディスアセンブルしたものが見えてますね。このままステップオーバーすると、
おぉ。これぞまさに1ステップ!!
そんなわけで、アセンブラ1行ずつをステップ実行する方法でした。
2012年2月21日火曜日
MacでLPCXpresso使いたいのだー。
LPCXpressoの開発をVirtualMachine上でやってみた。
Mac向けの環境が無いんだからしょうがない。
Linuxでは動くので、VirtualBox上でDebianを動かして、そこでやってみた。
- VirtualBoxのインストール
- Debianのインストール
- LPCXpresso-IDEのインストール
2011年12月3日土曜日
ADK demokitのプロトコル
android -> accessory
| -- | msg[0] | msg[1] | msg[2] |
| LED1 RED | 0x02 | 0x00 | 0 - 255 |
| LED1 GREEN | 0x02 | 0x01 | 0 - 255 |
| LED1 BLUE | 0x02 | 0x02 | 0 - 255 |
| LED2 RED | 0x02 | 0x03 | 0 - 255 |
| LED2 GREEN | 0x02 | 0x04 | 0 - 255 |
| LED2 BLUE | 0x02 | 0x05 | 0 - 255 |
| LED3 RED | 0x02 | 0x06 | 0 - 255 |
| LED3 GREEN | 0x02 | 0x07 | 0 - 255 |
| SERVO1 | 0x02 | 0x10 | 0 - 255 |
| SERVO2 | 0x02 | 0x11 | 0 - 255 |
| SERVO3 | 0x02 | 0x12 | 0 - 255 |
| RELAY1 | 0x03 | 0x00 | 0(Low), 1(High) |
| RELAY2 | 0x03 | 0x01 | 0(Low), 1(High) |
accessory -> android
| -- | msg[0] | msg[1] | msg[2] |
| Button1 | 0x01 | 0x00 | 0, 1 |
| Button2 | 0x01 | 0x01 | 0, 1 |
| Button3 | 0x01 | 0x02 | 0, 1 |
| Button Joystick | 0x01 | 0x04 | 0, 1 |
| temperature | 0x04 | value of MSB | value of LSB |
| light | 0x05 | value of MSB | value of LSB |
| joystick | 0x06 | position of X(-128 - 127) | position of Y(-128 - 127) |
| touch robot | 0x01 | 0x03 | 0, 1 |
2011年11月16日水曜日
AquaSKKの入力規則をカスタマイズした。
これから作る入力規則のファイル名と名前を書いておく。
$ cat $HOME/Library/Application\ Support/AquaSKK/sub-rule.desc my.rule オレ用で、そのファイルに入力規則を書く。今回はひらがなモードのときの括弧を全角にしたっかの。入力規則はEUC-JPで保存しなきゃダメなところに注意ね。
$ cat $HOME/Library/Application\ Support/AquaSKK/my.rule | iconv -f euc-jp -t utf-8 (,(,(,( ),),),) ?,?,?,? !,!,!,!@see http://aquaskk.sourceforge.jp/kana_rule.html
2011年9月21日水曜日
docutilsのディレクティブを作ってみた。
reStructuredTextで、
.. code-block:: ruby ::filename:: hello.rb puts "hello, world!!"と書いて、
hello.rb: <pre class="brush: ruby"> puts "hello, world!!" </pre>に変換させたい。
class CodeBlockDirective(Directive):
required_arguments = 0
optional_arguments = 1
has_content = True
option_spec = { 'filename': directives.unchanged }
def run(self):
node = []
filename = self.options.pop('filename', None)
if filename is not None:
node.append(nodes.Text("\n%s:" % filename))
else:
node.append(nodes.Text("\n"))
opt = {'classes' : []}
if len(self.arguments) != 0:
opt['classes'].append("brush: %s" % self.arguments[0])
node.append(nodes.literal_block(self.content, "\n".join(self.content), **opt))
return node
めでたしめでたし
2011年9月6日火曜日
OS-Xでログイン時にスクリプトを実行したい。
OS-Xでログインするときにスクリプトを実行できないかなーというお話し。
http://support.apple.com/kb/HT2420
sudo defaults write com.apple.loginwindow LoginHook /path/to/scriptこれだと、(ユーザーごとでなく)グローバルに設定されてしまうので、
#!/bin/sh if [ -x $HOME/.loginhook ] then $1/.login fiこんな感じのスクリプトを設定しておくってのでどう?
登録:
投稿 (Atom)









