{"id":2212,"date":"2014-03-05T19:01:45","date_gmt":"2014-03-05T10:01:45","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/?p=2212"},"modified":"2014-03-05T19:01:45","modified_gmt":"2014-03-05T10:01:45","slug":"maverics-stm32f4discovery-3","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/2212","title":{"rendered":"OS X(Mavericks)\u306bSTM32F4DISCOVERY\u7528\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\uff08\u30b5\u30f3\u30d7\u30eb\u5b9f\u884c\u7de8\uff09"},"content":{"rendered":"<p><a href=\"http:\/\/oohito.com\/nqthm\/archives\/2205\" title=\"OS X(Maverics)\u306bSTM32F4DISCOVERY\u7528\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\uff08\u30b5\u30f3\u30d7\u30eb\u30d3\u30eb\u30c9\u7de8\uff09\">\u524d\u56de<\/a>\u30d3\u30eb\u30c9\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5b9f\u884c\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002<br \/>\nST-Link\u306fSTM32\u306e\u30c7\u30d0\u30c3\u30ac\uff06\u30d7\u30ed\u30b0\u30e9\u30de\u3067\u3001STM32F4DISCOVERY\u3067\u306f\u30b8\u30e3\u30f3\u30d1\u30d4\u30f3\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u30aa\u30f3\u30dc\u30fc\u30c9\u3067ST-Link\u304c\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002<br \/>\nopenocd\u306f\u3001ST-Link\u7d4c\u7531\u306e\u30de\u30a4\u30b3\u30f3\u3068\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092TCP\/IP\u901a\u4fe1\u3067\u63d0\u4f9b\u3059\u308b\u3082\u306e\u3067\u3001gdb\u306a\u3069\u3092\u7528\u3044\u305f\u30c7\u30d0\u30c3\u30b0\u304c\u5bb9\u6613\u306b\u3067\u304d\u308b\u3002<br \/>\n<!--more--><\/p>\n<h2>openocd\u306e\u8d77\u52d5<\/h2>\n<p>openocd\u306b\u306f\u4f7f\u7528\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u3054\u3068\u306b\u8a73\u7d30\u306a\u8a2d\u5b9a\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308b\u304c\u3001openocd\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u3001\u305d\u306e\u4e2d\u306bSTM32F4DISCOVERY\u3078\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3092\u5229\u7528\u3059\u308c\u3070\u3088\u3044\u3002<br \/>\n\u8d77\u52d5\u3059\u308b\u306b\u306f\u3001STM32F4DISCOVERY\u306e\u4e0a\u5074\u306emini-USB\u30dd\u30fc\u30c8\u3068PC\u306eUSB\u30dd\u30fc\u30c8\u3092\u63a5\u7d9a\u3057\u305f\u4e0a\u3067\u3001Terminal\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<br \/>\n(\u304a\u305d\u3089\u304f\u63a5\u7d9a\u306b\u306f\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3060\u3068\u601d\u308f\u308c\u308b\u304c\u3001\u30a6\u30c1\u306e\u74b0\u5883\u3067\u306f\u65e2\u306b\u3042\u308b\u30c9\u30e9\u30a4\u30d0\u304c\u4f7f\u308f\u308c\u305f\u306e\u304b\u3001\u554f\u984c\u306a\u304f\u63a5\u7d9a\u3067\u304d\u305f)<\/p>\n<pre>openocd -s ~\/local\/share\/openocd\/scripts\/ -f interface\/stlink-v2.cfg -f target\/stm32f4x_stlink.cfg<\/pre>\n<p>(<a href=\"http:\/\/strobo.hatenablog.com\/entry\/2013\/06\/30\/155220\">Mac\u3067STM32F4-Discovery\u306e\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u3066ChibiOS\/RT\u3092\u52d5\u304b\u3059<\/a>\u3088\u308a\u5f15\u7528)<br \/>\n\u8d77\u52d5\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre>Open On-Chip Debugger 0.8.0-dev-00361-gbc1340c-dirty (2014-03-02-21:12)\nLicensed under GNU GPL v2\nFor bug reports, read\n\thttp:\/\/openocd.sourceforge.net\/doc\/doxygen\/bugs.html\nInfo : This adapter doesn't support configurable speed\nInfo : STLINK v2 JTAG v14 API v2 SWIM v0 VID 0x0483 PID 0x3748\nInfo : using stlink api v2\nInfo : Target voltage: 2.892743\nInfo : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints<\/pre>\n<p>\u4e00\u756a\u6700\u5f8c\u306e\u884c\u3067\u63a5\u7d9a\u306b\u6210\u529f\u3057\u305f\u3053\u3068\u304c\u308f\u304b\u308b\u3002PC\u3068\u30de\u30a4\u30b3\u30f3\u304c\u63a5\u7d9a\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre>Info : This adapter doesn't support configurable speed\nError: open failed\nin procedure 'transport'\nin procedure 'init'<\/pre>\n<p>(\u6700\u5f8c\u306e4\u884c\u306e\u307f\u629c\u7c8b)<\/p>\n<h2>gdb\u306b\u3088\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5b9f\u884c<\/h2>\n<p>openocd\u3092\u8d77\u52d5\u3057\u305f\u72b6\u614b\u3067\u5225\u306eTerminal\u3092\u8d77\u52d5\u3057(\u3042\u308b\u3044\u306f\u65b0\u3057\u3044\u30bf\u30d6\u3092\u958b\u304f)\u3001\u30d3\u30eb\u30c9\u6e08\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5165\u3063\u305f\u30d5\u30a9\u30eb\u30c0\u3067\u4ee5\u4e0b\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre>arm-none-eabi-gdb demo.elf<\/pre>\n<p>\u30c7\u30d0\u30c3\u30ac\u304c\u8d77\u52d5\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre>GNU gdb (GDB) 7.5.1\nCopyright (C) 2012 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <http: \/\/gnu.org\/licenses\/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"--host=x86_64-apple-darwin13.0.0 --target=arm-none-eabi\".\nFor bug reporting instructions, please see:\n<\/http:><http: \/\/www.gnu.org\/software\/gdb\/bugs><\/http:>...\nReading symbols from \/Users\/***\/sample\/demo.elf...done.\n(gdb)<\/pre>\n<p>\u8d77\u52d5\u6e08\u307f\u306eopenocd\u306b\u63a5\u7d9a\u3059\u308b\u3002openocd\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u63a5\u7d9a\u30dd\u30fc\u30c8\u306f3333\u3067\u3042\u308b\u3002<\/p>\n<pre>(gdb) target extended localhost:3333\nRemote debugging using localhost:3333\n0x00000000 in ?? ()<\/pre>\n<p>(1\u884c\u76ee\u306e(gdb)\u4ee5\u964d\u306e\u307f\u5165\u529b\u3059\u308b\u3002\u4ee5\u4e0b\u540c\u69d8)<br \/>\n\u306a\u304a\u3001\u4e0a\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u306f\u3001<code>tar ext: 3333<\/code>\u3068\u7701\u7565\u3067\u304d\u308b\u3002<br \/>\n\u30de\u30a4\u30b3\u30f3\u3092\u30ea\u30bb\u30c3\u30c8\u3057\u3001\u505c\u6b62\u3055\u305b\u308b\u3002<\/p>\n<pre>(gdb) monitor reset halt\ntarget state: halted\ntarget halted due to debug-request, current mode: Thread\nxPSR: 0x01000000 pc: 0x08001e40 msp: 0x20020000<\/pre>\n<p>(mon reset halt\u3068\u7701\u7565\u53ef)<br \/>\ndemo.elf\u3092\u30de\u30a4\u30b3\u30f3\u306b\u66f8\u304d\u8fbc\u3080\u3002<\/p>\n<pre>(gdb) load\nLoading section .isr_vector, size 0x188 lma 0x8000000\nLoading section .text, size 0x1d5c lma 0x8000188\nLoading section .ARM, size 0x8 lma 0x8001ee4\nLoading section .init_array, size 0x8 lma 0x8001eec\nLoading section .fini_array, size 0x4 lma 0x8001ef4\nLoading section .data, size 0x46c lma 0x8001ef8\nLoading section .jcr, size 0x4 lma 0x8002364\nStart address 0x8001e41, load size 9064\nTransfer rate: 11 KB\/sec, 1294 bytes\/write.<\/pre>\n<p>\u30ea\u30bb\u30c3\u30c8\u3057\u3066\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre>(gdb) monitor reset<\/pre>\n<p>STM32F4DISCOVERY\u4e0a\u306e\u4e0b\u5074\u4e2d\u592e\u306b\u3042\u308b\uff14\u3064\u306eLED\u304c\u3001\u7dd1\u2192\u30aa\u30ec\u30f3\u30b8\u2192\u8d64\u2192\u9752\u306e\u9806\u3067\u70b9\u706f\u3057\u3001\u5168\u6d88\u706f\u3057\u305f\u5f8c\u307e\u305f\u70b9\u706f\u3057\u306f\u3058\u3081\u308b\u3068\u3044\u3046\u30c7\u30e2\u304c\u59cb\u307e\u308b\u3002<br \/>\n\u306a\u304a\u3001\u4e00\u65e6\u30d5\u30e9\u30c3\u30b7\u30e5\u306b\u66f8\u304d\u8fbc\u3093\u3060\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u96fb\u6e90\u304c\u5207\u308c\u3066\u3082\u6d88\u3048\u306a\u3044\u305f\u3081\u3001\u96fb\u6e90\u30aa\u30d5\u5f8c\u306b\u518d\u5ea6\u96fb\u6e90\u3092\u5165\u308c\u308b\u3068\u30c7\u30e2\u304c\u81ea\u52d5\u7684\u306b\u5b9f\u884c\u3055\u308c\u308b\u3002<br \/>\n\u6b21\u306e\u8a18\u4e8b\u3067\u306f\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30d0\u30c3\u30b0\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u4e88\u5b9a\u3067\u3042\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u30d3\u30eb\u30c9\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5b9f\u884c\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002 ST-Link\u306fSTM32\u306e\u30c7\u30d0\u30c3\u30ac\uff06\u30d7\u30ed\u30b0\u30e9\u30de\u3067\u3001STM32F4DISCOVERY\u3067\u306f\u30b8\u30e3\u30f3\u30d1\u30d4\u30f3\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u30aa\u30f3\u30dc\u30fc\u30c9\u3067ST-Link\u304c\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,42],"tags":[],"class_list":["post-2212","post","type-post","status-publish","format-standard","hentry","category-mac","category-stm32"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=2212"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2212\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=2212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=2212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=2212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}