DFU update problem Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
twittich
Member++
Posts: 16
Joined: Mon May 06, 2019 9:28 am

DFU update problem

Post by twittich »

Hello
i'm working with windows (later need to update over dfu with linux too) using the dev kit:
"VocalFusion 4-mic mono-AEC circular dev kit" and "xtag3" programmer
Everything is installed.
at the sourcecode i made no modification except entering the line below, i tried also DFU_BCD_DEVICE both with 0x1000 and 0x0112 and 0x112
Added in customdefines.h the line
"#define BCD_DEVICE (0x0112)"

build the firmware:
"app_vf_spk_base" with the config
1i2o2_cir43_48khz.

flashing it with the command (tried also with xTIMEcomposer):
xflash --boot-partition-size 0x30000 --factory app_vf_spk_base_1i2o2_cir43_48khz.xe
tried also
xflash app_vf_spk_base_1i2o2_cir43_48khz.xe

All devices are in the device manager:
Audio device: xmos vocalfusion spk uac1.0
libusb-win32 devices: the xmos xtag3 and xmos dfu (interface 3)

build an update file with this command:
xflash --factory-version 14.0 --upgrade 1 app_vf_spk_base_1i2o2_cir43_48khz.xe -o update.bin


tried to download the update file with a modified xmosdfu.cpp from another thread link, is compiled without errors and runs
command: xmosdfu --download ".\update.bin"
end with error "Couldnt find/open device"

and with the tool dfu-util LINK
"
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Cannot open DFU device 20b1:0011
Opening DFU capable USB device...
ID 20b1:0011
Run-time device DFU version 0110
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
error detaching
Resetting USB...
Lost device after RESET?
"

Can someone help me how to proceed to solve that problem and how to get dfu running, i'm pretty sure i made some mistakes ... :-/

Thanks in advance

twittich


View Solution
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi.

1) try again with the xflash tool but insert the --verbose flag and share your detailed output logs.

2) the dfu-util in your post is NOT for use with XMOS products.
twittich
Member++
Posts: 16
Joined: Mon May 06, 2019 9:28 am

Post by twittich »

Thank you for the quick response.

1) At which point should i test --verbose ?
Thats the output from flashing the device with the xtag3(but this is working?):

Code: Select all

xflash --boot-partition-size 0x30000 --verbose  app_vf_spk_base_1i2o2_cir43_48khz.xe
XFlash_Options::ListDevices : xgdb --batch -q --ex "listdevices" devl-95f9dd45
XFlash_Application found _start :40000 on Node 0
XFlash_Application found _DoSyscall :46c70 on Node 0
XFlash_Application found _DoException :400a4 on Node 0
XFlash_Application found _start :40000 on Node 0
XFlash_Application found _DoSyscall :4a18c on Node 0
XFlash_Application found _DoException :400a4 on Node 0
XFlash_Application : Attempting to Compress Binary Data
libcompressor marker 1=140
libcompressor marker 2=173
libcompressor marker 3=53
libcompressor best marker length 3 2 2
libcompressor best marker length 3 2 3
libcompressor best marker length 3 2 4
libcompressor DoCompression_Compress took : 1163ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-bd637de9" -x xn "target-xn-v0-0d601468" -o decompressor-fb1c9a24
libcompressor validating decompressor decompressor-fb1c9a24
libcompressor launching simulator decompressor-fb1c9a24 --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x40000
libcompressor simulator terminate @0x7ff58
libcompressor decompressor validated
XFlash_Application on Node : 0 compressed from : 81372 bytes to : 59484 bytes (26.9%)
libcompressor marker 1=223
libcompressor marker 2=163
libcompressor marker 3=173
libcompressor best marker length 3 2 2
libcompressor best marker length 3 2 3
libcompressor DoCompression_Compress took : 2524ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-8f28cf11" -x xn "target-xn-v0-0d601468" -o decompressor-07d2438b
libcompressor validating decompressor decompressor-07d2438b
libcompressor launching simulator decompressor-07d2438b --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x40000
libcompressor simulator terminate @0x7ff5a
libcompressor decompressor validated
XFlash_Application on Node : 0 compressed from : 110508 bytes to : 81992 bytes (25.8%)
XFlash::DoXFlash
XFlash::DoImageProgramming
XFlash::GetDeviceInfo
XFlash_DeviceInfo::GetDeviceInfo_Hardware
XFlash_DeviceInfo::GetDeviceInfo_Hardware_IssueCompileCommand : xcc -Xmapper --dontenablesodlinks -Xmapper --wnoXN -x xc "spiinfo-39db3551" -x xn "target-xn-v0-0d601468" -o "spiinfo-e06a7919" -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO
XFlash_Utils::BuildRunCommand : xrun --io spiinfo-e06a7919
Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node 0
XFlash::BuildFlashBinaryFile
XFlash_Builder_S2L::BuildStage2Loaders Factory
xflash: Warning: F03148 --quad-spi-clock not given, using default 15.62MHz
xflash: Warning: F03149 QE_REGISTER and/or QE_BIT locations not found in XN file for this flash device. Using default quad_spi_qe_location_status_reg_0 and quad_spi_qe_bit_6.
Stage2_Loader::Compile : xcc -Wno-bidirectional-buffered-port -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --image-base -Xmapper 0x40080 -Xmapper --image-size -Xmapper 0x3ff80 -Xmapper --wno110 -Xmapper --wno226 -Xmapper --wnoXN -std=c99 -O2 -x xn "target-xn-v0-0d601468" -x xc s2l-n0-f55a9ee9 -lstage2loader -lswitchsetup -lsqiaccess -lquadspi -o s2l-n0-18074e8d
Stage2Loader found _DoSyscall : 0x404c8 on Node 0
Stage2Loader found _DoException : 0x40124 on Node 0
Stage2_Loader : Attempting to Compress Binary Data
libcompressor marker 1=77
libcompressor marker 2=231
libcompressor marker 3=45
libcompressor best marker length 3 2 2
libcompressor best marker length 3 2 3
libcompressor best marker length 3 2 4
libcompressor best marker length 4 2 4
libcompressor best marker length 4 2 5
libcompressor DoCompression_Compress took : 75ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-c0221ec8" -x xn "target-xn-v0-0d601468" -o decompressor-2f4d8049
libcompressor validating decompressor decompressor-2f4d8049
libcompressor launching simulator decompressor-2f4d8049 --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x40000
libcompressor simulator terminate @0x7fed8
libcompressor decompressor validated
Stage2_Loader on Node : 0 compressed from : 4872 bytes to : 3804 bytes (21.92%)
Stage2_SwitchSetup::Compile : xcc -c -march=xs2a -x assembler-with-cpp swstup-n0v0-8cca77aa -o swstup-n0v0-be7ca0f2
Stage2_SwitchSetup::Compile : xcc -nostartfiles -Wno-bidirectional-buffered-port -Xmapper --first -Xmapper swstup-n0v0-be7ca0f2 -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --wno110 -Xmapper --wno226 -Xmapper --wnoXN -std=c99 -O2 -x xn "target-xn-v0-0d601468" -x xc swstup-n0v0-aa36ac43 -lswitchsetup -o swstup-n0v0-4a92b2bb
XFlash_Builder_Image::BuildImages Factory
XFlash_Builder_Image::BuildImageTable
  master node = 0
    node = 0
XFlash_Builder_Image::BuildImageTable num cores for image table = 2
XFlash_Builder_Image::CalculateBufferSize Starting calculation _total_image_size=0
XFlash_Builder_Image::CalculateBufferSize Add Image Header _total_image_size=34
XFlash_Builder_Image::CalculateBufferSize Add Switch Setup header _total_image_size=3c
XFlash_Builder_Image::CalculateBufferSize Add Per Core header _total_image_size=54
XFlash_Builder_Image::CalculateBufferSize_SwitchSetup _total_image_size=7ac
XFlash_Builder_Image::CalculateBufferSize_Application application size = e860 _total_image_size = f00c
XFlash_Builder_Image::CalculateBufferSize_Application application size = 1404c _total_image_size = 23058
XFlash_Builder_Image::BuildImageTable allocated image buffer size = 23058
XFlash_Builder_Image::WriteBuffer_ImageHeader
XFlash_Builder_Image::WriteBuffer_SwitchSetup current switch setup table offset : 34
XFlash_Builder_Image::WriteBuffer_SwitchSetup current application data offset : 54
XFlash_Builder_Image::WriteBuffer_SwitchSetup size : 754
XFlash_Builder_Image::WriteBuffer_SwitchSetup aligned_size : 758
XFlash_Builder_Image::WriteBuffer_SwitchSetup init_vec_shift : 0
XFlash_Builder_Image::WriteBuffer_Application
XFlash_Builder_Image::WriteBuffer_Application for node : 0
XFlash_Builder_Image::WriteBuffer_Application for core : 0
XFlash_Builder_Image::WriteBuffer_Application current core table offset : 3c
XFlash_Builder_Image::WriteBuffer_Application current application data offset : 7ac
XFlash_Builder_Image::WriteBuffer_Application size : e85c
XFlash_Builder_Image::WriteBuffer_Application aligned_size : e860
XFlash_Builder_Image::WriteBuffer_Application init_vec_shift : 0
XFlash_Builder_Image::WriteBuffer_Application chan end : 80020002
XFlash_Builder_Image::WriteBuffer_Application for core : 1
XFlash_Builder_Image::WriteBuffer_Application current core table offset : 48
XFlash_Builder_Image::WriteBuffer_Application current application data offset : f00c
XFlash_Builder_Image::WriteBuffer_Application size : 14048
XFlash_Builder_Image::WriteBuffer_Application aligned_size : 1404c
XFlash_Builder_Image::WriteBuffer_Application init_vec_shift : 0
XFlash_Builder_Image::WriteBuffer_Application chan end : 80030002
XFlash_Builder_Image::WriteBuffer_CRC
XFlash_Builder_Binary::BuildBinary
XFlash_Builder_Binary::CalculateBufferSize_Factory
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (f5c) f60
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)f64
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (23058) 23fbc
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (44) 24000
XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = 24000
XFlash_Builder_Binary::GetSearchLimitPadding : current size (24000) 0
XFlash_Builder_Binary::CalculateBufferSize_Data
XFlash_Builder_Binary::BuildBinary : Allocating buffer - 24000
XFlash_Builder_Binary::GetSearchLimitPadding : current size (24000) 0
XFlash_Builder_Binary::WriteBufferToBinary : flash_bin_node0
XFlash_Programmer_Program::DoProgram
XFlash_Programmer_Program::GenerateSource
XFlash_Programmer_Program::IssueCompileCommand :xcc -w -Xmapper --dontenablesodlinks -O2 -lquadflash -x xc "fp-274480a0" -x xn "target-xn-v0-0d601468" -D VERBOSE=1 -D MONITOR=1 -D ERASE_ALL_FIRST=1 -o "fp-86723602"
XFlash_Utils::BuildRunCommand : xrun --io fp-86723602
Site 0 has finished successfully.
XFlash_Programmer_Program::IssueResetCommand : xgdb --batch-silent --ex "connect" --ex "reset mode-pins nointerrupt" --ex "q"

2) Which tool should i use in windows and linux for dfu ?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. Not an audio developer and do not have your kit so can only provide general comments.

Please review this document on DFU tools and post your results or if you continue to face problems.

https://www.xmos.com/file/dfu-user-guide

Which toolchain version are you using? Is it 14.0 or higher? The reason being that you are passing the value of 14.0 in the following command line:
xflash --factory-version 14.0

There are more current tools available for download:

https://www.xmos.com/software/tools/
twittich
Member++
Posts: 16
Joined: Mon May 06, 2019 9:28 am

Post by twittich »

Thank you.
I'm using already 14.3.3 and 14.4 is only for XVF3510 but i have to change this in the command.
The dfu doc i read already and the thesycon dfu tool is not free, thats why i wanted to use the xmos or dfu-util tool.
And in the software section is only the xTIMEcomposer for different systems and examples but nothing for dfu.
I'll post on further progress or problems.
Post Reply