{"action":"closed","issue":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7336","repository_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7336/labels{/name}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7336/comments","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7336/events","html_url":"https://github.com/zephyrproject-rtos/zephyr/issues/7336","id":320142141,"number":7336,"title":"USB DFU: this area can not be overwritten","user":{"login":"zhaozhongchen","id":16350380,"avatar_url":"https://avatars0.githubusercontent.com/u/16350380?v=4","gravatar_id":"","url":"https://api.github.com/users/zhaozhongchen","html_url":"https://github.com/zhaozhongchen","followers_url":"https://api.github.com/users/zhaozhongchen/followers","following_url":"https://api.github.com/users/zhaozhongchen/following{/other_user}","gists_url":"https://api.github.com/users/zhaozhongchen/gists{/gist_id}","starred_url":"https://api.github.com/users/zhaozhongchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhaozhongchen/subscriptions","organizations_url":"https://api.github.com/users/zhaozhongchen/orgs","repos_url":"https://api.github.com/users/zhaozhongchen/repos","events_url":"https://api.github.com/users/zhaozhongchen/events{/privacy}","received_events_url":"https://api.github.com/users/zhaozhongchen/received_events","type":"User","site_admin":false},"labels":[{"id":700756697,"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/area:%20USB","name":"area: USB","color":"ededed","default":false},{"id":383053976,"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/bug","name":"bug","color":"e99695","default":true},{"id":636351494,"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/priority:%20medium","name":"priority: medium","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"zhaozhongchen","id":16350380,"avatar_url":"https://avatars0.githubusercontent.com/u/16350380?v=4","gravatar_id":"","url":"https://api.github.com/users/zhaozhongchen","html_url":"https://github.com/zhaozhongchen","followers_url":"https://api.github.com/users/zhaozhongchen/followers","following_url":"https://api.github.com/users/zhaozhongchen/following{/other_user}","gists_url":"https://api.github.com/users/zhaozhongchen/gists{/gist_id}","starred_url":"https://api.github.com/users/zhaozhongchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhaozhongchen/subscriptions","organizations_url":"https://api.github.com/users/zhaozhongchen/orgs","repos_url":"https://api.github.com/users/zhaozhongchen/repos","events_url":"https://api.github.com/users/zhaozhongchen/events{/privacy}","received_events_url":"https://api.github.com/users/zhaozhongchen/received_events","type":"User","site_admin":false},"assignees":[{"login":"zhaozhongchen","id":16350380,"avatar_url":"https://avatars0.githubusercontent.com/u/16350380?v=4","gravatar_id":"","url":"https://api.github.com/users/zhaozhongchen","html_url":"https://github.com/zhaozhongchen","followers_url":"https://api.github.com/users/zhaozhongchen/followers","following_url":"https://api.github.com/users/zhaozhongchen/following{/other_user}","gists_url":"https://api.github.com/users/zhaozhongchen/gists{/gist_id}","starred_url":"https://api.github.com/users/zhaozhongchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhaozhongchen/subscriptions","organizations_url":"https://api.github.com/users/zhaozhongchen/orgs","repos_url":"https://api.github.com/users/zhaozhongchen/repos","events_url":"https://api.github.com/users/zhaozhongchen/events{/privacy}","received_events_url":"https://api.github.com/users/zhaozhongchen/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-05-04T03:11:14Z","updated_at":"2018-05-10T23:26:40Z","closed_at":"2018-05-10T23:26:40Z","author_association":"NONE","body":"I am tring download a signed-hello.bin by using DFU:\r\n\r\n```\r\nsudo dfu-util --alt 1 --device 2fe3:0100  --download signed-hello.bin\r\ndfu-util 0.8\r\n\r\nCopyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.\r\nCopyright 2010-2014 Tormod Volden and Stefan Schmidt\r\nThis program is Free Software and has ABSOLUTELY NO WARRANTY\r\nPlease report bugs to dfu-util@lists.gnumonks.org\r\n\r\ndfu-util: Invalid DFU suffix signature\r\ndfu-util: A valid DFU suffix will be required in a future dfu-util release!!!\r\nOpening DFU capable USB device...\r\nID 2fe3:0100\r\nRun-time device DFU version 0110\r\nClaiming USB DFU Runtime Interface...\r\nDetermining device status: state = appIDLE, status = 0\r\nDevice really in Runtime Mode, send DFU detach request...\r\nResetting USB...\r\nOpening DFU USB Device...\r\nClaiming USB DFU Interface...\r\nSetting Alternate Setting #1 ...\r\nDetermining device status: state = dfuIDLE, status = 0\r\ndfuIDLE, continuing\r\nDFU mode device DFU version 0110\r\nDevice returned transfer size 64\r\nCopying data from PC to DFU device\r\nDownload        [                         ]   0%            0 bytes failed!\r\nstate(10) = dfuERROR, status(3) = Device is unable to write memory\r\n```\r\n\r\nnext is the log printed from zephyr's console uart: \r\n\r\n```\r\n***** Booting Zephyr OS v1.11.0-955-g9a265fc *****                                    \r\n[general] [DBG] dfu_status_cb: USB device reset detected, state 0                     \r\n[general] [DBG] dfu_status_cb: USB device supended                                    \r\n[general] [DBG] dfu_status_cb: USB device reset detected, state 0                     \r\n[general] [DBG] dfu_status_cb: USB device reset detected, state 0                     \r\n[general] [DBG] dfu_status_cb: USB device configured                                  \r\n[general] [ERR] dfu_custom_handle_req: DFU alternate setting 0                        \r\n[general] [DBG] dfu_class_handle_req: DFU_GETSTATUS: status 0, state 0                \r\n[general] [DBG] dfu_class_handle_req: DFU_DETACH timeout 1000, state 0                \r\n[general] [DBG] dfu_status_cb: USB device reset detected, state 1                     \r\n[general] [DBG] dfu_status_cb: USB device reset detected, state 2                     \r\n[general] [DBG] dfu_status_cb: USB device reset detected, state 2                     \r\n[general] [DBG] dfu_status_cb: USB device reset detected, state 2                     \r\n[general] [DBG] dfu_status_cb: USB device configured                                  \r\n[general] [ERR] dfu_custom_handle_req: DFU alternate setting 1                        \r\n[general] [DBG] dfu_class_handle_req: DFU_GETSTATUS: status 0, state 2                \r\n[general] [DBG] dfu_class_handle_req: DFU_DNLOAD block 0, len 64, state 2             \r\n[general] [DBG] dfu_class_handle_req: DFU_DNLOAD start                                \r\n[general] [ERR] dfu_class_handle_req: This area can not be overwritten                \r\n[general] [DBG] dfu_class_handle_req: DFU_GETSTATUS: status 3, state 10               \r\n[general] [ERR] dfu_custom_handle_req: DFU alternate setting 0               \r\n```\r\n\r\nseems there forget add CONFIG_FLASH_BASE_ADDRESS  in dfu_data.flash_addr.\r\n\r\n```\r\nswitch (dfu_data.state) {\r\n\t\tcase dfuIDLE:\r\n\t\t\tSYS_LOG_DBG(\"DFU_DNLOAD start\");\r\n\t\t\tdfu_reset_counters();\r\n\t\t\tif (dfu_data.flash_addr != FLASH_AREA_IMAGE_1_OFFSET) {\r\n\t\t\t\tdfu_data.status = errWRITE;\r\n\t\t\t\tdfu_data.state = dfuERROR;\r\n\t\t\t\tSYS_LOG_ERR(\"This area can not be overwritten\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n```\r\n"}}
{"actor":{"display_login":"nashif"}}