Revision 03906dc3

View differences:

Host/Source/SerialBoot/main.c
95 95
/****************************************************************************************
96 96
* Local data declarations
97 97
****************************************************************************************/
98
/** \brief Name of the serial device, such as COM4 or /dev/ttyUSB0. */
98
/** \brief Name of the serial device, such as COM4, /dev/ttyUSB0 or /dev/ttyAMiRo0. */
99 99
static sb_char serialDeviceName[32];
100 100

  
101 101
/** \brief Id of the bluetooth device, such as 01:23:45:67:89:AB. */
......
244 244
  printf("Example 4:  SerialBoot -dCOM4 -b57600 firmware.srec\n\n");
245 245
  printf("WARNING: SerialBoot is not really functional with windows! Please use\n");
246 246
  printf("         the Linux version.\n\n");
247
  printf("  -> In all four cases it connects to COM4 and configures a communication\n");
247
  printf("  -> In all four cases it connects to COM4.\n");
248 248
#else
249
  printf("Example 2:  SerialBoot -d/dev/ttyUSB0 -b57600 -T3 firmware.srec\n");
250
  printf("Example 3:  SerialBoot -d/dev/ttyUSB0 -b57600 -T0 firm1.srec -T3 firm2.srec\n");
251
  printf("Example 4:  SerialBoot -d/dev/ttyUSB0 -b57600 firmware.srec\n\n");
252
  printf("  -> In all four cases it connects to ttyUSB0 and configures a communication\n");
249
  printf("Example 2:  SerialBoot -d/dev/ttyAMiRo0 -b57600 -T3 firmware.srec\n");
250
  printf("Example 3:  SerialBoot -d/dev/ttyAMiRo0 -b57600 -T0 firm1.srec -T3 firm2.srec\n");
251
  printf("Example 4:  SerialBoot -d/dev/ttyAMiRo0 -b57600 firmware.srec\n\n");
252
  printf("  -> In all four cases it connects to '/dev/ttyAMiRo0' alias '/dev/ttyUSB0'.\n");
253 253
#endif
254
  printf("     speed of 57600 bits/second. The bootloaders will be set into flashing\n");
255
  printf("     mode and will be reset after flashing the last binary file.\n");
254
  printf("  -> In all four cases a communication speed of 57600 bits/second is configured.\n");
255
  printf("     The bootloaders will be set into flashing mode and will be reset after\n");
256
  printf("     flashing the last binary file.\n");
256 257
  printf("  -> In the first example this help will be opened\n");
257 258
  printf("  -> In the second example the binary file 'firmware.srec' will be flashed on\n");
258 259
  printf("     device 0x03.\n");
README.txt
202 202
following lines:
203 203

  
204 204
  # Future Technology Devices International Ltd. - TTL-232RG
205
  SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB[0-9]*",
205
  SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB[0-9]*", SYMLINK+="ttyAMiRo%n",
206 206
  ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666"
207 207

  
208 208
  # Future Technology Devices International Ltd. - FT231X
209
  SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB[0-9]*",
209
  SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="ttyUSB[0-9]*", SYMLINK+="ttyAMiRo%n",
210 210
  ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="0666"
211 211

  
212 212
Now connect the module you want to flash directly to your system (note that
Target/Modules/flash.mk
28 28
ifeq ($(OS),Windows_NT)
29 29
	STM32FLASH_PORT ?= COM5
30 30
else
31
	STM32FLASH_PORT ?= /dev/ttyUSB0
31
	# check whether /dev/ttyAMiRo0 exists
32
	ifeq (,$(wildcard /dev/ttyAMiRo0))
33
		# check whether /dev/ttyUSB0 exists
34
		ifeq (,$(wildcard /dev/ttyUSB0))
35
			# set to /dev/ttyAMiRo0 for meaningful error message
36
			STM32FLASH_PORT ?= /dev/ttyAMiRo0
37
		else
38
			# legacy support
39
			STM32FLASH_PORT ?= /dev/ttyUSB0
40
		endif
41
	else
42
		STM32FLASH_PORT ?= /dev/ttyAMiRo0
43
	endif
32 44
endif
33 45
BAUDRATE = 115200
34 46
BINARY = $(BIN_PATH)/$(PROJ_NAME).hex

Also available in: Unified diff