File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- OLIMEX_EXTENSIONS_DIR =$FW_TARGETDIR /freertos_apps/microros_nucleo_f746zg_extensions
1+ EXTENSIONS_DIR =$FW_TARGETDIR /freertos_apps/microros_nucleo_f746zg_extensions
22
3- pushd $OLIMEX_EXTENSIONS_DIR > /dev/null
3+ USE_STFLASH=false
4+
5+ pushd $EXTENSIONS_DIR > /dev/null
46
57 if [ -f build/micro-ROS.bin ]; then
8+
69 echo " Flashing firmware for $RTOS platform $PLATFORM "
7-
8- if lsusb -d 15BA:002a ; then
9- PROGRAMMER=interface/ftdi/nucleo-arm-usb-tiny-h.cfg
10- elif lsusb -d 15BA:0003 ; then
11- PROGRAMMER =interface/ftdi/nucleo-arm-usb-ocd .cfg
12- elif lsusb -d 15BA:002b ; then
13- PROGRAMMER =interface/ftdi/nucleo-arm-usb-ocd-h .cfg
10+ if [ $USE_STFLASH = true] ; then
11+ st-flash --reset write build/micro-ROS.bin 0x8000000
12+ else
13+ if lsusb -d 0483:374b ; then
14+ ST_INTERFACE =interface/stlink-v2-1 .cfg
15+ elif lsusb -d 0483:3748 ; then
16+ ST_INTERFACE =interface/stlink-v2 .cfg
1417 else
18+ # TODO: add stlink v3, should it be stlink.cfg ?
1519 echo " Error. Unsuported OpenOCD USB programmer"
1620 exit 1
1721 fi
18-
19- openocd -f $PROGRAMMER -f target/stm32f7x.cfg -c init -c " reset halt " -c " flash write_image erase build/micro-ROS.bin 0x08000000 " -c " reset " -c " exit "
22+ openocd -f $ST_INTERFACE -f target/stm32f7x.cfg -c init -c " reset halt " -c " flash write_image erase build/micro-ROS.bin 0x08000000 " -c " reset " -c " exit "
23+ fi
2024 else
2125 echo " build/micro-ROS.bin not found: please compile before flashing."
2226 fi
Original file line number Diff line number Diff line change 1- OLIMEX_EXTENSIONS_DIR =$FW_TARGETDIR /freertos_apps/microros_nucleo_f767zi_extensions
1+ EXTENSIONS_DIR =$FW_TARGETDIR /freertos_apps/microros_nucleo_f767zi_extensions
22
3- pushd $OLIMEX_EXTENSIONS_DIR > /dev/null
3+ USE_STFLASH=false
4+
5+ pushd $EXTENSIONS_DIR > /dev/null
46
57 if [ -f build/micro-ROS.bin ]; then
8+
69 echo " Flashing firmware for $RTOS platform $PLATFORM "
7-
8- if lsusb -d 15BA:002a ; then
9- PROGRAMMER=interface/ftdi/nucleo-arm-usb-tiny-h.cfg
10- elif lsusb -d 15BA:0003 ; then
11- PROGRAMMER =interface/ftdi/nucleo-arm-usb-ocd .cfg
12- elif lsusb -d 15BA:002b ; then
13- PROGRAMMER =interface/ftdi/nucleo-arm-usb-ocd-h .cfg
10+ if [ $USE_STFLASH = true] ; then
11+ st-flash --reset write build/micro-ROS.bin 0x8000000
12+ else
13+ if lsusb -d 0483:374b ; then
14+ ST_INTERFACE =interface/stlink-v2-1 .cfg
15+ elif lsusb -d 0483:3748 ; then
16+ ST_INTERFACE =interface/stlink-v2 .cfg
1417 else
18+ # TODO: add stlink v3, should it be stlink.cfg ?
1519 echo " Error. Unsuported OpenOCD USB programmer"
1620 exit 1
1721 fi
18-
19- openocd -f $PROGRAMMER -f target/stm32f7x.cfg -c init -c " reset halt " -c " flash write_image erase build/micro-ROS.bin 0x08000000 " -c " reset " -c " exit "
22+ openocd -f $ST_INTERFACE -f target/stm32f7x.cfg -c init -c " reset halt " -c " flash write_image erase build/micro-ROS.bin 0x08000000 " -c " reset " -c " exit "
23+ fi
2024 else
2125 echo " build/micro-ROS.bin not found: please compile before flashing."
2226 fi
You can’t perform that action at this time.
0 commit comments