Wayne_Contello
Member since Dec 2016 • Last active Nov 2017- 0 conversations
- 2 comments
Most recent activity
-
I am trying to flash an STM32F0 device and added the ID to the list by modifying the python source as follows:
# Takes chip IDs (obtained via Get ID command) to human-readable names CHIP_ID_STRS = {0x410: 'STM32F1, performance, medium-density', 0x411: 'STM32F2', 0x412: 'STM32F1, performance, low-density', 0x413: 'STM32F4', 0x414: 'STM32F1, performance, high-density', 0x416: 'STM32L1, performance, medium-density', 0x418: 'STM32F1, connectivity', 0x420: 'STM32F1, value, medium-density', 0x428: 'STM32F1, value, high-density', 0x430: 'STM32F1, performance, XL-density', 0x448: 'STM32F0, performance, hi-density' }
Then I invoke the python script as follows:
Proton:STM32 wayne$ python ./stm32loader.py -b 115200 -V -p /dev/tty.usbserial-FTGVKLRW -evw ./BL.bin
then I get the response:
Open port /dev/tty.usbserial-FTGVKLRW, baud 115200 Reading data from ./BL.bin Traceback (most recent call last): File "./stm32loader.py", line 548, in <module> data = read(args[0]) File "./stm32loader.py", line 442, in read if bytes.startswith('\x7FELF'): TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Any thoughts on whether this is python script problem? or something with the device I am trying to program? I have held the boot pin button while resetting the device.
I should note that I am on macOS Sierra (10.12.1)
The indentation of the source code segment is all correct (even though this site is showing the last two entries as being indented less than the previous lines).