Revision 6feb961b

View differences:

README.txt
81 81
1.1 - stm32flash
82 82
----------------
83 83

  
84
To build the tool from source, clone the GIT repository to a local folder on
85
your machine:
86
  >$ git clone git://git.code.sf.net/p/stm32flash/code
87
Make sure that you have selected version 0.4 or later of the tool. You can now
88
build the tool simply by executing 'make'. Finally, you must make the resulting
89
binary (stm32flash) globally available in your environment. You can do so by
90
either copying the file to an appropriate location (e.g. /usr/local/bin/) or
91
creating an according link. The tool must be available as 'stm32flash' in every
92
new shell.
84
This tool is required to flash the bootloader binaries to the microcontrollers.
85
Since it is included in this project as a submodule, you can just run the setup
86
script in the root directory:
87
  >$ ./setup.sh
88
Follow the instructions to download the source code and compile the tool. The
89
resulting binary path is ./Host/stm32flash/stm32flash.
90

  
91
The setup script does not install the tool to your system path, though, since
92
this usually requires root permissions. However, stm32flash provides a Makefile
93
with installation capabilities. Just Follow the instructions given in the file
94
./Host/stm32flash/INSTALL.
93 95

  
94 96

  
95 97
1.2 - GCC ARM Embedded Toolchain
Target/Demo/flash.mk
1
STM32FLASH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../../Host/stm32flash/bin/stm32flash
1
STM32FLASH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../../Host/stm32flash/stm32flash
2 2
ifeq ($(OS),Windows_NT)
3 3
	STM32FLASH_PORT ?= COM5
4 4
else
setup.sh
87 87
    BUILD_STM32FLASH=true
88 88

  
89 89
    # test for existing bonary
90
    if [ -f bin/stm32flash ]; then
90
    if [ -f stm32flash ]; then
91 91
      printf "WARNING: stm32flash binary already exists.\n"
92 92
      read -p "Would you like to delete and rebuild it? [Y/n] " -n 1 -i "Y" -e USER_INPUT
93 93
      if [[ $USER_INPUT =~ ^[Yy]$ ]]; then
94 94
        BUILD_STM32FLASH=true
95
        rm -rf bin/
95
        make clean
96 96
      elif [[ ! $USER_INPUT =~ ^[YyNn]$ ]]; then
97 97
        BUILD_STM32FLASH=false
98 98
        printf "'%s' is no valid selection. Aborting setup.\n" $USER_INPUT
......
103 103

  
104 104
    # build the tool if required
105 105
    if [ $BUILD_STM32FLASH = true ]; then
106
      mkdir bin
107 106
      make
108
      mv stm32flash bin/
109
      make clean
110 107
    fi
111 108

  
112 109
    cd $USER_DIR

Also available in: Unified diff