DFU ubuntu 17.04

rsc
Tue Oct 10, 2017 9:41 pm
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

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

rsc
Wed Oct 11, 2017 1:41 am
yes
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"

RogerClark
Wed Oct 11, 2017 3:08 am
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


rsc
Wed Oct 11, 2017 4:58 am
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

rsc
Wed Oct 11, 2017 5:19 am
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

RogerClark
Wed Oct 11, 2017 6:21 am
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


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

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

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

rsc
Mon Oct 16, 2017 1:39 am
I don’t know why but now upload fine, but can’t upload if is plased in my board, bootloader use a pin? (Using serial can upload directly)
Image

RogerClark
Mon Oct 16, 2017 4:15 am
Bootloader uses a pin as button to force it to lock in bootloader mode.

I forget which pin it is on each bootloader version

Check in config.h


rsc
Mon Oct 16, 2017 6:28 pm
#elif defined TARGET_GENERIC_F103_PC13

#define LED_BANK GPIOC
#define LED_PIN 13
#define LED_ON_STATE 0

// Button (if you have one)

#define BUTTON_BANK GPIOC
#define BUTTON_PIN 14
#define BUTTON_PRESSED_STATE 1


ag123
Sun Oct 29, 2017 11:21 am
for the blue pill u’d need to do a stunt
– have the command line ready e.g. dfu-util -a 2 -D sketch.bin, just short of hitting enter
– press reset (on blue pill – not your pc)
– hit enter (you have 6 fast blinks of time to do that, miss that repeat all over)

Leave a Reply

Your email address will not be published. Required fields are marked *