Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading on Linux Fails #180

Closed
mhmayyan opened this issue Oct 15, 2021 · 11 comments
Closed

Uploading on Linux Fails #180

mhmayyan opened this issue Oct 15, 2021 · 11 comments
Assignees
Labels

Comments

@mhmayyan
Copy link

Hi,

Every time I upload on Linux I get the following:-

Program file:   /tmp/arduino_build_120438/CatenaSketch.ino.dfu
Board VID:PID:  0x040E:0x0091
Base address:   0x08005000
Bootloader:     /home/user/.arduino15/packages/mcci/hardware/stm32/3.0.3/bootloaders/McciBootloader_46xx.bin
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
dfu-util: Non-valid multiplier 'g', interpreted as type identifier instead
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08000000, size = 10768
Download	[=========================] 100%        10768 bytes
Download done.
File downloaded successfully
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Match vendor ID from file: 040e
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
the selected serial port Setting Alternate Setting #0 ...
 does not exist or your board is not connected
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
main upload failed
dfu-util: Error: File ID 040e:0091 does not match device (040e:df11 or 0483:df11)
@terrillmoore
Copy link
Member

@mhmayyan sorry you're having troubles.

Your device is dropping out of DFU mode after the first download. That's odd; it could be due to a number of different issues. We'll try to reproduce here.

But the good news is that the first step (bootloader download) is working. You really only have to do that once. If you choose "DFU without bootloader" in the UI, it will only download the app, which should work. That is:

image

@mhmayyan
Copy link
Author

I tried to do that but I still have the same problem.

/home/user/.arduino15/packages/mcci/hardware/stm32/3.0.3/tools/linux/stm32l0-upload -vx 0x040E 0x0091 /tmp/arduino_build_120438/CatenaSketch.ino.dfu 0x08005000 
Program file:   /tmp/arduino_build_120438/CatenaSketch.ino.dfu
Board VID:PID:  0x040E:0x0091
Base address:   0x08005000
Bootloader:     using existing bootloader
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Match vendor ID from file: 040e
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
dfu-util: Error: File ID 040e:0091 does not match device (040e:df11 or 0483:df11)
dfu-util: Error: File ID 040e:0091 does not match device (040e:df11 or 0483:df11)

Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
main upload failed

@terrillmoore
Copy link
Member

Device ID dfu-util: Error: File ID 040e:0091 does not match device (040e:df11 or 0483:df11)

The device ID 040e:0091 says it's not in DFU mode, it's still in application mode.

@mhmayyan
Copy link
Author

I tried flashing multiple Catena 4612 boards on two Ubuntu machines but I kept having the same problem either with or without the trusted bootloader. I don't see this problem on Windows 10.

@terrillmoore
Copy link
Member

Sorry you're having problems; we'll try to duplicate here.

@dhineshkumarmcci
Copy link
Member

We were able to reproduce the issue with BSP versions post v2.8.0. We are working on fixing the issue and come up with solution.

@terrillmoore
Copy link
Member

This got auto-closed by the pull request which was just merged. You should be able to patch your release by downloading the file (https://raw.githubusercontent.com/mcci-catena/Arduino_Core_STM32/main/tools/linux/stm32l0-upload), and putting into tools/linux in your BSP copy. Or you may have to wait for a little while, as we'll have to prepare a release.

@terrillmoore
Copy link
Member

Release has been tagged. Now we have to update the arduino-boards repo. mcci-catena/arduino-boards#29.

@terrillmoore
Copy link
Member

@mhmayyan please update your BSP to v3.0.4 and try. We believe this is now fixed. (Very small chance of an error in json file for the BSP as I don't have a proper test setup.)

@mhmayyan
Copy link
Author

I tested the new BSP (V3.0.4). It works now on Linux (Ubuntu) and Windows 10. Thank you.

@terrillmoore
Copy link
Member

@mhmayyan thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants