Page 1 of 2

DFU ubuntu 17.04

Posted: Tue Oct 10, 2017 9:41 pm
by rsc
Hi, I read the mayority of post and I not solution my problem, sometimes upload and sometimes not, what I do wrong?
I flash the bootloader on flash demonstrator(windows) I work on ubuntu 17.04 64 bit, dfu-util 0,8 installed,
Image

Re: DFU ubuntu 17.04

Posted: Tue Oct 10, 2017 11:26 pm
by RogerClark
Did you run the install.sh to set the udev rules ?

Re: DFU ubuntu 17.04

Posted: Wed Oct 11, 2017 1:41 am
by rsc
yes

Code: Select all

ATTRS{idProduct}=="1001", ATTRS{idVendor}=="0110", MODE="664", GROUP="dialout"
ATTRS{idProduct}=="1002", ATTRS{idVendor}=="0110", MODE="664", GROUP="dialout"
ATTRS{idProduct}=="0003", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="dialout" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idProduct}=="0004", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="dialout" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"

Re: DFU ubuntu 17.04

Posted: Wed Oct 11, 2017 3:08 am
by RogerClark
Did you select the serial device ?

Is the serial device appearing at all ?

Note. If you downloaded the bootloader from a few months ago, it did not originally enumerate as a serial device before you uploaded your first sketch
This is because the bootloader is only the DFU device, and the Serial (or other USB e.g. HID ) devices are created as part of the sketch, as part of the core (even if you don't call Serial.begin())

But a lot of people found this confusing, so I updated the bootloader to contain a dummy sketch that does some Serial.print()'s

Hence, if you have just installed the bootloader, and open the Serial Monitor, you should see it spitting out messages

If you don't see that, you have not selected the correct Serial port, or the bootloader is not working correctly

Re: DFU ubuntu 17.04

Posted: Wed Oct 11, 2017 4:58 am
by rsc
using stm32flash to upload bootloader(on linux) and then open serial monitor:
Image
but when I try to upload "blink" I get the same error as shown in first image

Re: DFU ubuntu 17.04

Posted: Wed Oct 11, 2017 5:19 am
by rsc
when i press reset button and immediately upload sketch and then reset again, it run, but i don't understand why, BOOT0 and BOOT1 are low

Re: DFU ubuntu 17.04

Posted: Wed Oct 11, 2017 6:21 am
by RogerClark
Boot0 and Boot1 are used to upload the bootloader using a USB to Serial adaptor.

Once the USB bootloader is installed, Boot0 and 1 need to be set back to low to prevent the MCU entering its internal Serial bootloader

What appears to be happening in your case is that the IDE is not sending the signal to the sketch to tell it to reboot into the bootloader, ready for upload.

However I'm not a linux user so someone else will need to help you debug what you are doing wrong

Re: DFU ubuntu 17.04

Posted: Sat Oct 14, 2017 6:31 pm
by Ahmad
Do you set serial port permission ?
https://www.arduino.cc/en/Guide/Linux#toc6

Re: DFU ubuntu 17.04

Posted: Sun Oct 15, 2017 12:52 am
by rsc
I set permission, now reset the board but not upload

Re: DFU ubuntu 17.04

Posted: Sun Oct 15, 2017 7:14 am
by RogerClark
Turn on verbose logging for compile and upload and post the output here, otherwise we have no idea what your system is doing