Сперва столкнулся с отсутствием прав доступа на usb устройство программатора. Решается одной строкой в правилась UDEV
ATTRS{idProduct}=="3748", ATTRS{idVendor}=="0483", MODE="0660", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1"
В еще не распакованную плату скетч залился сразу без проблем, но залить этот же скетч в плату с загрузчиком stm32duino bootloader не получилось
Sketch uses 14300 bytes (21%) of program storage space. Maximum is 65536 bytes. Global variables use 3088 bytes (15%) of dynamic memory, leaving 17392 bytes for local variables. Maximum is 20480 bytes. USB Status [unknown] 2018-11-25T17:02:34 INFO src/usb.c: -- exit_dfu_mode 2018-11-25T17:02:34 INFO src/common.c: Loading device parameters.... 2018-11-25T17:02:34 WARN src/common.c: unknown chip id! 0xe0042000 USB Status [unknown] Waiting for tty device should now be available.
Ошибка WARN src/common.c: unknown chip id! 0xe0042000. Погуглил и нашел рецепт как это вылечить.
Нужно установить перемычку BOOT0 в High
и выполнить команду
st-flash erase
$ cd .arduino15/packages/stm32duino/tools/stm32tools/2018.11.11/linux/stlink $ ./st-info --probe Found 1 stlink programmers serial: 483f6f06653f515321402467 openocd: "\x48\x3f\x6f\x06\x65\x3f\x51\x53\x21\x40\x24\x67" flash: 65536 (pagesize: 1024) sram: 20480 chipid: 0x0410 descr: F1 Medium-density device $ ./st-info --chipid 0x0410 $ ./st-flash erase 2018-11-25T17:09:18 INFO src/common.c: Loading device parameters.... 2018-11-25T17:09:18 INFO src/common.c: Device connected is: F1 Medium-density device, id 0x20036410 2018-11-25T17:09:18 INFO src/common.c: SRAM size: 0x5000 bytes (20 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes Mass erasing
Теперь скетч залился без проблем и во вторую плату.
Sketch uses 14300 bytes (21%) of program storage space. Maximum is 65536 bytes. Global variables use 3088 bytes (15%) of dynamic memory, leaving 17392 bytes for local variables. Maximum is 20480 bytes. USB Status [unknown] 2018-11-25T17:26:53 INFO src/usb.c: -- exit_dfu_mode 2018-11-25T17:26:53 INFO src/common.c: Loading device parameters.... 2018-11-25T17:26:53 INFO src/common.c: Device connected is: F1 Medium-density device, id 0x20036410 2018-11-25T17:26:53 INFO src/common.c: SRAM size: 0x5000 bytes (20 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes 2018-11-25T17:26:53 INFO src/common.c: Attempting to write 14300 (0x37dc) bytes to stm32 address: 134217728 (0x8000000) Flash page at addr: 0x08000000 erased Flash page at addr: 0x08000400 erased Flash page at addr: 0x08000800 erased Flash page at addr: 0x08000c00 erased Flash page at addr: 0x08001000 erased Flash page at addr: 0x08001400 erased Flash page at addr: 0x08001800 erased Flash page at addr: 0x08001c00 erased Flash page at addr: 0x08002000 erased Flash page at addr: 0x08002400 erased Flash page at addr: 0x08002800 erased Flash page at addr: 0x08002c00 erased Flash page at addr: 0x08003000 erased2018-11-25T17:26:53 INFO src/common.c: Finished erasing 14 pages of 1024 (0x400) bytes 2018-11-25T17:26:53 INFO src/common.c: Starting Flash write for VL/F0/F3 core id 2018-11-25T17:26:53 INFO src/common.c: Successfully loaded flash loader in sram Flash page at addr: 0x08003400 erased 0/13 pages written 1/13 pages written 2/13 pages written 3/13 pages written 4/13 pages written 5/13 pages written 6/13 pages written 7/13 pages written 8/13 pages written 9/13 pages written 10/13 pages written 11/13 pages written2018-11-25T17:26:54 INFO src/common.c: Starting verification of write complete 12/13 pages written 13/13 pages written2018-11-25T17:26:54 INFO src/common.c: Flash written and verified! jolly good! USB Status [unknown] Waiting for tty device
Комментариев нет:
Отправить комментарий