Difference between revisions of "Nucleo Boards"

From RobolaboWiki
Jump to: navigation, search
Line 61: Line 61:
 
sudo udevadm control --reload-rules
 
sudo udevadm control --reload-rules
 
</pre>
 
</pre>
 +
 +
<h1> Hello World experiment  </h1>
  
 
<h2> Download STMCube </h2>
 
<h2> Download STMCube </h2>
Line 71: Line 73:
 
And select the STMCubeXX according to your microcontroller (e.g. STM32CubeL4 for STM32L4 series)
 
And select the STMCubeXX according to your microcontroller (e.g. STM32CubeL4 for STM32L4 series)
  
 +
Untar STM32CubeXX
 +
<pre>
 +
unzip stm32cubexx.zip
 +
</pre>
  
 
<<<<TODO AGUTI>>>>>
 
<<<<TODO AGUTI>>>>>

Revision as of 10:41, 25 November 2015

Configuring the environment

Install Compiler gcc-arm-none-eabi

Download last version of GCC ARM Embedded from: https://launchpad.net/gcc-arm-embedded/+download

Untar the compiler:

tar -xvjf gcc-arm-none-eabi-<VERSION>.tar.bz2

Copy it to a common place:

sudo cp -r gcc-arm-none-eabi-<VERSION> /opt/compilerNucleoST

Install OpenOCD On-Chip Debugger

Instal dependencies:

sudo apt-get install flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev autoconf texinfo build-essential \\
libftdi-dev libusb-1.0-0-dev libexpat1-dev

Download last version of Openocd from: http://openocd.org/

Untar openocd:

tar -xvzf openocd-<VERSION>.tar.gz

Go into the directory:

cd openocd-<VERSION>

Configure openocd compilation:

./configure --prefix=/opt/openocd/ --enable-jlink --enable-amtjtagaccel --enable-ftdi --enable-buspirate --enable-stlink \\ 
--enable-ftdi --enable-rlink

Compile it:

make

Install:

sudo make install

Prepare its use according to udev:

sudo cp -r contrib/99-openocd.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

Hello World experiment

Download STMCube

STMicroelectronics introduces STMCube as an initiative to ease developers life. They are sharing packages containing libraries, documentation and examples. Packages are delivered per series (such as STM32CubeF4 for STM32F4 series)

Go: http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1897?icmp=tt2930_gl_pron_oct2015&sc=stm32cube-pr14

And select the STMCubeXX according to your microcontroller (e.g. STM32CubeL4 for STM32L4 series)

Untar STM32CubeXX

unzip stm32cubexx.zip

<<<<TODO AGUTI>>>>>

/opt/compilerNucleoST/bin/./arm-none-eabi-gcc -Wall -mcpu=cortex-m4 -mlittle-endian -mthumb -I/home/aguti/universidad/proyectos/nucleoST/tools/STM32Cube_FW_L4_V1.1.0/Drivers/CMSIS/Device/ST/STM32L4xx/Include -I/home/aguti/universidad/proyectos/nucleoST/tools/STM32Cube_FW_L4_V1.1.0/Drivers/CMSIS/Include -DSTM32L476xx -Os -c system_stm32l4xx.c -o system_stm32l4xx.o
<pre>