LPC800シリーズを使ってみる2
-前回までのあらすじ-
OpenOCDで最初の1kByteしか書けなくてふてくされて他の事やってました。
特にいないさんの誕生日が近づいてきているのでそれの準備に虹裏メイドパワーを
お注ぎ申したり(もう製作完了しました!2月9日はこうご期待!)、副業先の引っ
越しに巻き込まれたり500mも移動してませんが住み家の引っ越しやらでいろいろ忙し
かったのですが、ちょっと落ち着いたのでOpenOCDのコミットを見るとLPC43xx系の
フラッシュありタイプの書き込みサポートがレビュー中状態で追加されていました。
気になって変更箇所見てみるとLPC800シリーズの書き込みにも関する大きなヒント
が見つかったので再びチャレンジしてみた次第です。
ゲームは一瞬で終わっていた…ユーザーマニュアルにちゃんと明記されてたorz
LPC812はLPC2000系やLPC17xx,LPC12xx,LPC13xx,LPC11xxx系と違いIAPスタック
の最大消費量が少し多くなるとの事です。少しの差が成否を分けていたようですorz
そいやvsprogのコードにもそんなこと書いてあったような…まぁいいです。
それをもとにちゃんとドライバを作り込むと拍子抜けするくらい簡単に書き込みが
出来るようになりましためでたしめでたし!
↓LPC812完全対応のOpenOCD+SWD接続のVersaloonで書いた時のメッセージです。
> "C:¥Devz¥Coreutils¥bin¥make.exe" program
openocd -s C:/Devz/ARM/OCD/tcl -f interface/vsllink_swd.cfg -f target/lpc812_swd_flash.cfg -c "mt_flash main.elf"
Open On-Chip Debugger 0.7.0-dev-00151-g4a5c9a4-dirty (2013-01-31-19:33)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : OpenOCD runs in SWD mode
none separate
adapter speed: 250 kHz
cortex_m3 reset_config sysresetreq
Info : Versaloon(0x15)by Simon(compiled on Jul 18 2012)
Info : USB_TO_XXX abilities: 0x0000072E:0x010001EF:0xC0000007
Info : clock speed 250 kHz
Info : lpc812.cpu: hardware has 4 breakpoints, 2 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x1fff0008 msp: 0x10000ffc
auto erase enabled
wrote 2048 bytes from file main.elf in 0.499965s (4.000 KiB/s)
verified 1600 bytes in 0.109367s (14.287 KiB/s)
shutdown command invoked
> Process Exit Code: 0
> Time Taken: 00:01
↓SWDで繋がるということはもちろんSTlink/V2も使用できるということですね♥
> "C:¥Devz¥Coreutils¥bin¥make.exe" program
openocd -s C:/Devz/ARM/OCD/tcl -f interface/stlink-v2.cfg -f target/lpc812_hla_flash.cfg -c "mt_flash main.elf"
Open On-Chip Debugger 0.7.0-dev-00151-g4a5c9a4-dirty (2013-01-31-19:33)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
none separate
adapter speed: 250 kHz
Info : clock speed 250 kHz
Info : STLINK v2 JTAG v16 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : Target voltage: 2.869535
Info : lpc812.cpu: hardware has 4 breakpoints, 2 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x1fff0008 msp: 0x10000ffc
auto erase enabled
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x10000004 msp: 0x100000c8
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x10000004 msp: 0x100000c8
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x10000004 msp: 0x100000c8
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x10000004 msp: 0x100000c8
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x10000004 msp: 0x100000c8
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x10000004 msp: 0x100000c8
wrote 2048 bytes from file main.elf in 0.343750s (5.818 KiB/s)
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x1000002e msp: 0x10000ffc
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x1000002e msp: 0x10000ffc
verified 1600 bytes in 0.062500s (25.000 KiB/s)
shutdown command invoked
> Process Exit Code: 0
> Time Taken: 00:01
STLink/V2のほうが若干書き込み速度が速いですか…!
でもLPC800系はフラッシュ容量の最大が16kByteなので特に気にならないかと
思われます…。
当たり前ですがいつも通りのデバッグもいつも通り可能です。
もちろんSTLink/V2でも自由自在に可能です♥
て訳でLPC812の書き込み・デバッグに完全対応したOpenOCDのバイナリ
公開します。OpenOCDのLPC812対応に関しては全世界でねむいさんが最初です!
あとは秋月さんがLPC810のDIP品を売ってくれるのを待つばかりですね〜♥
あ、ついでにLPC812-LPCXpressoのプロジェクトも更新してます。
おまけ
尺が余ったのでもう少し続けます。
先日ChaN'氏がFatFs0.09bをリリースしました。ドライブのボリュームラベルに対応
しています!ねむいさんもこちらの適用を進めてすでにおきぱにて対応済みのサンプル
を公開しています。今回の作業でSTM32VL,STM32Lでボリュームラベルを設定した時に
ディレクトリ構造が破壊される恐ろしいバグが自分のMMCドライバ側に眠っていたのが
判明したので何気に修正してます。
…ぇーっといままでwriteの方は放置してましたすみません!!
-
免責・連絡先は↑のリンクを
↓SNSもやってます↓
powered by まめわざ- ARM/STM32 (116)
- OpenOCD (27)
- ARM/NxP (34)
- ARM/Cypress (5)
- ARM/Others (3)
- ARM/Raspi (1)
- AVR (13)
- FPGA (4)
- GPS/GNSS (19)
- MISC (81)
- STM8 (2)
- Wirelessなアレ (16)
- おきぱ (1)
- ブラウザベンチマーク (28)
- 日本の自然歩道 (25)
- STM32U0はぢめました
⇒ ねむい (08/07) - STM32U0はぢめました
⇒ ひかわ (07/28) - STM32H5を使ってみる3 -待ち受ける初見殺しの罠たち-
⇒ ねむい (05/17) - STM32H5を使ってみる3 -待ち受ける初見殺しの罠たち-
⇒ どじょりん (05/16) - STM32H5を使ってみる3 -待ち受ける初見殺しの罠たち-
⇒ どじょりん (05/16) - いろいろ試す61(と今年の反省会)
⇒ ねむい (01/02) - いろいろ試す61(と今年の反省会)
⇒ ひかわ (01/02) - いろいろ試す61(と今年の反省会)
⇒ ひかわ (01/01) - STM32H5を使ってみる3 -待ち受ける初見殺しの罠たち-
⇒ ねむい (12/31) - STM32H5を使ってみる3 -待ち受ける初見殺しの罠たち-
⇒ ひかわ (12/31)
- October 2024 (1)
- September 2024 (1)
- August 2024 (1)
- July 2024 (1)
- June 2024 (1)
- May 2024 (1)
- April 2024 (1)
- March 2024 (1)
- February 2024 (2)
- January 2024 (1)
- December 2023 (4)
- November 2023 (2)
- October 2023 (2)
- September 2023 (1)
- August 2023 (2)
- July 2023 (1)
- June 2023 (2)
- May 2023 (3)
- April 2023 (1)
- March 2023 (1)
- February 2023 (1)
- January 2023 (1)
- December 2022 (2)
- November 2022 (1)
- October 2022 (1)
- September 2022 (1)
- August 2022 (1)
- July 2022 (1)
- June 2022 (1)
- May 2022 (1)
- April 2022 (1)
- March 2022 (1)
- February 2022 (1)
- January 2022 (1)
- December 2021 (2)
- November 2021 (2)
- October 2021 (1)
- September 2021 (1)
- August 2021 (1)
- July 2021 (1)
- June 2021 (1)
- May 2021 (1)
- April 2021 (1)
- March 2021 (1)
- February 2021 (1)
- January 2021 (1)
- December 2020 (3)
- November 2020 (1)
- October 2020 (1)
- September 2020 (1)
- August 2020 (1)
- July 2020 (1)
- June 2020 (2)
- May 2020 (1)
- April 2020 (1)
- March 2020 (1)
- February 2020 (1)
- January 2020 (1)
- December 2019 (3)
- November 2019 (1)
- October 2019 (1)
- September 2019 (2)
- August 2019 (1)
- July 2019 (1)
- June 2019 (1)
- May 2019 (1)
- April 2019 (1)
- March 2019 (1)
- February 2019 (1)
- January 2019 (1)
- December 2018 (3)
- November 2018 (2)
- October 2018 (1)
- September 2018 (1)
- August 2018 (1)
- July 2018 (1)
- June 2018 (1)
- May 2018 (1)
- April 2018 (2)
- March 2018 (1)
- February 2018 (1)
- January 2018 (1)
- December 2017 (2)
- November 2017 (2)
- October 2017 (1)
- September 2017 (1)
- August 2017 (1)
- July 2017 (1)
- June 2017 (1)
- May 2017 (1)
- April 2017 (1)
- March 2017 (2)
- February 2017 (2)
- January 2017 (2)
- December 2016 (7)
- November 2016 (2)
- October 2016 (2)
- September 2016 (1)
- August 2016 (1)
- July 2016 (1)
- June 2016 (1)
- May 2016 (2)
- April 2016 (1)
- March 2016 (2)
- February 2016 (1)
- January 2016 (1)
- December 2015 (3)
- November 2015 (1)
- October 2015 (3)
- September 2015 (2)
- August 2015 (2)
- July 2015 (3)
- June 2015 (3)
- May 2015 (4)
- April 2015 (2)
- March 2015 (4)
- February 2015 (1)
- January 2015 (3)
- December 2014 (3)
- November 2014 (2)
- October 2014 (1)
- September 2014 (2)
- August 2014 (2)
- July 2014 (3)
- June 2014 (2)
- May 2014 (1)
- April 2014 (1)
- March 2014 (4)
- February 2014 (4)
- January 2014 (3)
- December 2013 (5)
- November 2013 (4)
- October 2013 (3)
- September 2013 (2)
- August 2013 (2)
- July 2013 (2)
- June 2013 (3)
- May 2013 (2)
- April 2013 (2)
- March 2013 (2)
- February 2013 (2)
- January 2013 (3)
- December 2012 (4)
- November 2012 (2)
- October 2012 (2)
- September 2012 (4)
- August 2012 (1)
- July 2012 (3)
- June 2012 (2)
- May 2012 (3)
- April 2012 (3)
- March 2012 (2)
- February 2012 (3)
- January 2012 (3)
- December 2011 (5)
- November 2011 (3)
- October 2011 (2)
- September 2011 (2)
- August 2011 (2)
- July 2011 (2)
- June 2011 (2)
- May 2011 (2)
- April 2011 (2)
- March 2011 (2)
- February 2011 (2)
- January 2011 (3)
- December 2010 (7)
- November 2010 (1)
- October 2010 (1)
- September 2010 (1)
- August 2010 (3)
- July 2010 (4)
- May 2010 (1)
- April 2010 (2)
- March 2010 (2)
- February 2010 (2)
- January 2010 (3)
- December 2009 (3)
- November 2009 (8)
- October 2009 (7)
- September 2009 (5)
- August 2009 (4)
- July 2009 (6)
- June 2009 (6)
- May 2009 (14)
- January 1970 (1)
Copyright(C) B-Blog project All rights reserved.
Comments
Post a Comment