User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/stm32f4.meta failed
tutorials:stm32f4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:stm32f4 [2016/10/28 11:21] – [Stlink] amoratutorials:stm32f4 [2022/09/20 00:08] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Using the STM32F* ======
  
 +**NOTICE**: If you are using a computer of the Laboratory you can skip directly to the Step for installing Libopencm3.
  
-=====  Arm Toolchain =====+If you are using a personal computer, and are using Debian Buster or newer, then execute: 
 + 
 +  sudo apt install gcc-arm-none-eabi libftdi1 openocd libusb-1.0-0-dev stlink-tools 
 + 
 +===== Libopencm3 ===== 
 + 
 +[[http://www.libopencm3.org/]] 
 + 
 + 
 +To build the library: 
 + 
 +  cd ~/local/src/ 
 +  git clone https://github.com/libopencm3/libopencm3-examples 
 +  cd libopencm3-examples 
 +  git submodule init 
 +  git submodule update 
 +  cd libopencm3 
 +  make 
 +   
 + Be sure to install  python-yaml first. 
 + 
 +To build an example and flash it to the f4discovery: 
 + 
 +  cd ../ 
 +  cd examples/stm32/f4/stm32f4-discovery/miniblink/ 
 +  make 
 +  make flash 
 + 
 + 
 +=====New STM versions===== 
 + 
 +New versions use STLINK 2-1. If you have errors, flashing the microcontroller, you should change your OOCD_INTERFACE configuration in the corresponding Makefile or passing as an argument on the flash instruction as seen below:  
 + 
 +  $ make flash OOCD_INTERFACE=stlink-v2-1 
 + 
 + 
 +===== Old Debian version ===== 
 + 
 +** WARNING **: Only follow this tutorial if you are using Jessie or older versions. 
 + 
 +===  Arm Toolchain === 
 + 
 + 
 +**Warning**: Only follow this if you have an old version of Debian. 
  
 Before we used the summon-arm-toolchain script to make the crosscompiler tool, but now summon-arm-toolchain is not maintained anymore and now they recommend to use the official toolchain from ARM: Before we used the summon-arm-toolchain script to make the crosscompiler tool, but now summon-arm-toolchain is not maintained anymore and now they recommend to use the official toolchain from ARM:
Line 53: Line 98:
  
  
-===== Stlink =====+=== Stlink === 
 + 
 +**WARNING**: Only follow this if you have older Debian versions.
  
 Project's webpage: [[https://github.com/texane/stlink]] Project's webpage: [[https://github.com/texane/stlink]]
Line 74: Line 121:
      
   cd stlink   cd stlink
-    
  
 Configuramos  Configuramos 
Line 99: Line 145:
   sudo cp 49-stlinkv2-1.rules /etc/udev/rules.d/   sudo cp 49-stlinkv2-1.rules /etc/udev/rules.d/
   sudo /etc/init.d/udev restart   sudo /etc/init.d/udev restart
 +  udevadm control --reload-rules
 +  udevadm trigger --attr-match=subsystem=usb
  
  
  
-===== Libopencm3 ===== 
- 
-[[http://www.libopencm3.org/]] 
- 
- 
-To build the library: 
- 
-  cd ~/local/src/ 
-  git clone https://github.com/libopencm3/libopencm3-examples 
-  cd libopencm3-examples 
-  git submodule init 
-  git submodule update 
-  cd libopencm3 
-  make 
-   
- Be sure to install  python-yaml first. 
- 
-To build an example and flash it to the f4discovery: 
- 
-  cd ../ 
-  cd examples/stm32/f4/stm32f4-discovery/miniblink/ 
-  make 
-  make flash 
- 
- 
-======New STM versions====== 
- 
-New versions use STLINK 2-1. If you have errors, flashing the microcontroller, you should change your OOCD_INTERFACE configuration in the corresponding Makefile or passing as an argument on the flash instruction as seen below:  
- 
-  $ make flash OOCD_INTERFACE=stlink-v2-1 
  
-~~DISCUSSION~~ 
tutorials/stm32f4.1477653719.txt.gz · Last modified: 2022/09/20 00:08 (external edit)