target icon

Purpose

This tutorial explains how to connect the MB1225 evaluation kit to a PC Linux for flashing the software.

list icon

Prerequisites

  • A STMicroelectronics discovery kit with STM32F769NI MCU, order code 32F769IDISCOVERY (name on PCB: STM32F769I-DISCO).
  • USB 2.0 male to micro USB cable (supplied with evaluation kit).
  • A full installation of an Hyperpanel OS release on a linux based PC including tools for flashing and debugging. This tutorial requires release V30.01.01 for MB1225 or higher. Hyperpanel OS releases are available for free in the “Download” section of the website.
  • A Lunix PC with ARM gcc compiler, ARM gdb debuffer and minicom installed.

align left icon

Description

  • On www.tutorial.hyperpanel.com, select “Download” from the main menu.
  • Download “Hyperpanel OS V30.01.01 for MB1225” or higher release for the MB1225 kit. (hypv300101.zip).
  • On your PC Linux, copy and unzip the zip file in your root directory, for example:
    cp hypv300101.zip /home/hyperpanel
    cd /home/hyperpanel
    unzip hypv300101.zip 
  • With a text editor, update hhome environment variable in the stm32m7 file:
    cd ~/hypv300101/shells
    vi stm32m7

    Update the first line, according to your root directory:

    export hhome=/home/hyperpanel/hypv300101 
  • Save this file and an execute the command:
    source stm32m7
  • Connect the MB1225 board to a USB port on your Linux PC using the USB cable supplied with the board. Wait for a window to appear, then close it.
  • Open a Terminal window and run minicom to get access to the Hyperpanel OS serial port and to the application messages:
    minicom -D /dev/ttyACM0 -b 115200
  • Open another Terminal window on your computer and enter the following commands:
    cd ~/hypv300101/shells
    source stm32m7
    exe  
  • Upload software to the board:
    hgdb
    romload stm32m7 <file>

    You should see messages similar to these:

    Open On-Chip Debugger 0.10.0+dev-00001-g0ecee83-dirty (2017-02-10-06:53)
    Licensed under GNU GPL v2
    For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
    0x08005634 in ?? ()
    target halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x080052e4 msp: 0x20002000
    auto erase enabled
    Ignoring packet error, continuing...
    target halted due to breakpoint, current mode: Thread
    xPSR: 0x61000000 pc: 0x20000046 msp: 0x20002000
    wrote 524288 bytes from file <file>.bin in 10.224703s (50.075 KiB/s)
    Cannot access memory at address 0xffffffff
    <file>.elf: No such file or directory.

    Wait until the flashing operation is complete (approx. 30 seconds). The last message (<file>.elf: No such file or directory) is normal.

Terminal

 ~/hypv100302/boards/stm32m7/exe >> hgdb
GNU gdb (7.10-1ubuntu3+9) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

man                    Display again this manual
stm32m7                Send the reset halt command to openocd
armdisconnect          Deconnexion command
peek adr               Read and display  a 32 bit value at adr
poke adr val           Write a val 32 bits value at adr
poke_m adr msk val     Write bits in a 32 bits word with a mask
peekrange base o1 o2   Read 32 bits words from base+o1 to base+o2
affichb adr size       Print a memory area starting at adr
vmio n                 Display the tnote_evt_s debug table
int                    Display the tnote_it debug table
rte                    Return from interrupt
romload stm32m7 app    Write the app executable file in flash
rom stm32m7 app        Connect to target and load app dbg symbols
gpio bank n state      Set GPIO n (0-15) of bank (1-9) to 0/1
clock 0/1/2/3          Output SYSCLK/PLLI2S/HSE/PLL to MO2/PC9
(gdb) romload stm32m7 <file>
Open On-Chip Debugger 0.10.0+dev-00001-g0ecee83-dirty (2017-02-10-06:53)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
0x00002ed2 in ?? ()
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00003148 msp: 0x10002000
auto erase enabled
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x20000046 msp: 0x10002000
wrote 393216 bytes from file <file>.bin in 11.088839s (34.629 KiB/s)
(gdb)