{"id":1505,"date":"2014-11-25T00:35:10","date_gmt":"2014-11-25T00:35:10","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=1505"},"modified":"2014-11-25T02:39:25","modified_gmt":"2014-11-25T02:39:25","slug":"stm32-discovery","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2014\/11\/stm32-discovery\/","title":{"rendered":"STM32-Discovery on Linux"},"content":{"rendered":"<p><a href=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2014\/11\/stm32-e1416875694833.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/41j.com\/blog\/wp-content\/uploads\/2014\/11\/stm32-e1416875694833-1024x523.jpg\" alt=\"stm32\" width=\"700\" height=\"357\" class=\"aligncenter size-large wp-image-1506\" srcset=\"https:\/\/41j.com\/blog\/wp-content\/uploads\/2014\/11\/stm32-e1416875694833-1024x523.jpg 1024w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2014\/11\/stm32-e1416875694833-300x153.jpg 300w, https:\/\/41j.com\/blog\/wp-content\/uploads\/2014\/11\/stm32-e1416875694833.jpg 1619w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>The following instructions should work for the STM32-Discovery (STM32F101 based device) and STM32f4-discovery (STM32F4 based device). The support tools are the same, the code obviously needs to be different. The instructions assume Debian Jessie.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#get compilers, a other reqs.\r\nsudo apt-get install gdb-arm-none-eabi gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi\r\nsudo apt-get install autoconf pkg-config libusb-1.0 git\r\n\r\n# get stlink, compile and install\r\ngit clone https:\/\/github.com\/texane\/stlink.git\r\ncd ~\/stlink\r\n.\/autogen.sh\r\n.\/configure\r\nmake\r\nsudo make install\r\n#install the modprobe exceptions\r\nsudo cp stlink_v1.modprobe.conf \/etc\/modprobe.d\r\nsudo modprobe -r usb-storage &amp;&amp; modprobe usb-storage\r\n\r\n# Grab the code example (originally from &lt;a href=&quot;http:\/\/gostm32.blogspot.jp\/2010\/09\/blinky-ii.html&quot;&gt;this useful blog post&lt;\/a&gt;)\r\ncd ~\r\ngit clone https:\/\/github.com\/new299\/stm32vl_blinky.git\r\ncd stm32vl_blinky\r\nmake\r\nsudo make burn\r\n<\/pre>\n<p>st-link seems a bit flakey, and I never get 100% of flashes to verify correctly. However it mostly seems to program correctly. Ocassionally it reports the incorrect amount of flash. I&#8217;ve found that hitting reset during a flash sometimes seems to kick it into functioning correctly again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following instructions should work for the STM32-Discovery (STM32F101 based device) and STM32f4-discovery (STM32F4 based device). The support tools are the same, the code obviously needs to be different. The instructions assume Debian Jessie. #get compilers, a other reqs. sudo apt-get install gdb-arm-none-eabi gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi sudo apt-get install autoconf pkg-config libusb-1.0 git # get [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1505","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-oh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/1505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=1505"}],"version-history":[{"count":2,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/1505\/revisions"}],"predecessor-version":[{"id":1510,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/1505\/revisions\/1510"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=1505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=1505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=1505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}