How to patch SDK on WIndows 10?

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
14 posts / 0 new
Last post
mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
How to patch SDK on WIndows 10?

Hi. Thought we had this working earlier but failing to patch the latest SDK with the hotfix on 2 different Windows 10 systems.

1)从哪里可以下载patch.exe实用程序来执行此修补程序?相信此工具不是Windows 10的原生。

2) On one Windows 10 system, the PC locks or is waiting on some additional information to proceed. Following the install.txt is not working.

3) On another Windows 10 system, the PC reports that the patch.exe cannot be found.

>patch
'patch' is not recognized as an internal or external command,
operable program or batch file.

Update:

刚刚在“<”管道字符上抓住了我错了。这将修复(我认为)一个PC,但另一个Windows 10框缺少Patch.exe。这是第三方工具吗?

patch -p1</sdk.patch

I think the patch.exe tool is from here:

GnuWin download | SourceForge.net

but why would this detail be left out of the documentation? Or we missed it?

附件:
PM_Dialog
Offline
Last seen:21 hours 25 min ago
工作人员
加入:2018-02-08 11:03
Hi mom2,

Hi mom2,

Either you can download it from the web or use a tool that includes the patch.exe file. For example, GIT includes this one the SS Studio v2.0.12 as well.

After that, just run the command as described in the INSTALL.TXT with the full path of the patch.exe

Thanks, PM_Dialog

mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
Thanks. Please review the

Thanks. Please review the details on our attached screen grab. Still not working for us.

1) Downloaded the patch.exe tool from here:

Patch for Windows (sourceforge.net)

This link should be documented in the related docs on this website.

2) Dropped the above file inside the SDK folder and in following the INSTALL.TXT - there is a new pop-up window that is blank and does nothing for us.

3) This is the 3rd day we are investing into what should have been a 2 minute to fix the bugs inside the SDK. The patch from earlier this year was simple to follow. Not sure why it is a bit of a cloak and dagger approach to the missing documentation. An improvement would have been concise docs with full details on how to apply this patch. Or better yet, why not post a fully patched SDK? That to us, would have been much more friendly. We are borderline in switching to a different vendor over these issues.

PM_Dialog
Offline
Last seen:21 hours 25 min ago
工作人员
加入:2018-02-08 11:03
Hi mom2,

Hi mom2,

Could you please indicate if you are trying to run the patch on the SDK6.0.14 or on the CodeLess ( as your previous forum posts ) ?

Thanks, PM_Dialog

mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
Thanks.

Thanks.

下载SDK_6.0.14.1114.rar并尝试使用sdk_6.0.14.1114_hotfix_001.rar文件修补。

请尝试按照程序操作,并告知我们是否适合您。使用最新的patch.exe工具,我们的win10框在尝试遵循时锁定:

> patch -p1 < /sdk.patch

The INSTALL.TXT lists a patch method and then at the bottom of this txt file, notes to replace sub-folders inside the SDK.

So does this mean that we have a choice of either patch method OR to replace the sub-folders?

Guessing now that we can just replace the sub-folders and have the "patched" SDK?

PM_Dialog
Offline
Last seen:21 hours 25 min ago
工作人员
加入:2018-02-08 11:03
Hi mom2,

Hi mom2,

  1. I have downloaded both the SDK6.0.14 and its hotfix patch from the support website. Both are placed in the same folder (see attached )
  2. Navigate inside the SDK in …\6.0.14.1114 depth. Please try using a short directory without spaces.
  3. Open the CMD or the PowerShell from this directory.
  4. 执行补丁。正如您可以在附加的屏幕截图中看到的那样,我将与install.txt文件中的结果相同,因此修补程序已正确运行。
  5. Follow the last step from the INSTALL.TXT file : “In the extracted SDK folder, replace the following folders with the one provided in the hotfix release”

Thanks, PM_Dialog

附件:
mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
谢谢你。We will try again

谢谢你。我们会很快再试一次。

1) From where exactly did you download the patch.exe tool? We wish to use the same tool.

2) The path details are very important to get this to work. From our researching of countless hours on this patch tool, the -p1 = means that one of the "\" should be skipped. Respectively if -p2 = then 2 * "\" must be skipped. In the end, we still did not get this to work as of last week. The patch.exe tool would just raise an empty pop-up and never return back to the dos prompt.

Confident that the path depth has a relationship to this issue. Will attempt to follow your procedure again but will appreciate the link for the patch.exe tool. We are using one that was compiled in 2007 and it may not be compatible with Windows 10.

Thanks.

mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
Still not working. Is your

Still not working. Is your patch.exe the same filesize of 112,128 bytes?

mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
I think we may be close to

I think we may be close to having a winning lottery ticket here. The root cause is the depth of the SOURCE and TARGET folders. Will download a fresh copy and test again and report the resolution.

At this time of writing, finally observing a bit of progress...

C:\Users\kumar\Downloads\6.0.14.1114>patch -p1 < C:\Users\kumar\Downloads\SDK_6.0.14.1114_hotfix_001\sdk.patch
补丁文件二进制文件/ da14531/prod_test/prod_test_531.hex
断言失败:hunk,file ../patch-2.5.9-src/patch.c,第354行

mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
Please share the full details

Please share the full details of your patch.exe tool. Believe that is the last requirement to get this working. Still facing the above line 354 error.

PM_Dialog
Offline
Last seen:21 hours 25 min ago
工作人员
加入:2018-02-08 11:03
Hi mom2,

Hi mom2,

I am using the patch.exe file which is within the GIT installation. Could you please check this ?

Thanks, PM_Dialog

mon2
Offline
Last seen:4 months 2 weeks ago
加入:2018-09-04 19:16
好的。刚刚工作。The

好的。刚刚工作。该解决方案远非简单,需要认真记录,以便在此“简单”问题上,下一个开发人员不会浪费2周。

Here are the missing steps:

1) Download patch.exe from here:

Patch for Windows (sourceforge.net)

The 2007 datestamped file works fine on Windows 10.

2) The path for the SDK and the path for the hotfix are critical to the operation of the patch.exe tool.

Read over the past 2 weeks of hunting that the value after the -p flag denotes the # of forward slashes that must be skipped during the patch process. So -p1 matches the sub-folder structure of the OP (Dialog) but may not match yours / ours.

In my lab PC:

从一个级别深度提取原始SDK(支持-P1):

C:\Users\kumar\Downloads\6.0.14.1114>

The patch.exe tool should be present inside this one-level deep folder.

Directory of C:\Users\kumar\Downloads\6.0.14.1114

2020-12-01 11:41 AM

.
2020-12-01 11:41 AM ..
2020-11-24 10:42 AM binaries
2020-12-01 11:48 AM config
2020-12-01 12:10 PM doc
2007-05-14 06:19 PM 112,128 patch.exe
2020-11-24 10:42 AM projects
2020-11-24 10:42 AM sdk
2020-12-01 11:48 AM 第三篇
2020-11-24 10:42 AM utilities
1 File(s) 112,128 bytes

Next, the hot-fix folder structure:

C:\Users\kumar\Downloads\SDK_6.0.14.1114_hotfix_001>

2020-12-01 11:44 AM

.
2020-12-01 11:44 AM ..
2020-11-12 11:58 AM binaries
2020-11-12 11:58 AM 699 DISCLAIMER.TXT
2020-11-12 11:58 AM doc
2020-11-12 11:58 AM 2,481 install.txt
2020-11-12 11:58 AM 1,264 LICENSE.TXT
2020-12-01 12:10 PM 352,941 SDK.PATCH
2020-11-12 11:58 AM system_library
2020-11-12 11:58 AM toolbox_resources

接下来,使用管理模式中的命令提示符输入SDK文件夹。右键单击并使用管理权限运行命令模式。

使用DOS CD命令输入SDK文件夹。

Run as follows:

C:\Users\kumar\Downloads\6.0.14.1114>patch -p1 < C:\Users\kumar\Downloads\SDK_6.0.14.1114_hotfix_001\sdk.patch

Results in:

C:\Users\kumar\Downloads\6.0.14.1114>patch -p1 < C:\Users\kumar\Downloads\SDK_6.0.14.1114_hotfix_001\sdk.patch
补丁文件二进制文件/ da14531/prod_test/prod_test_531.hex
断言失败:hunk,file ../patch-2.5.9-src/patch.c,第354行

Using my black-belt in Google-fu, found this excellent thread and resolution here:

使用Git的Patch.exe for Windows - 堆栈溢出时批量文件 - “断言失败”

Many thanks to the poster for the fix -langlauf.io!!

The fix is to download notepad++ -> read in the Dialog sdk.patch source file -> Edit tab -> EOL conversion -> Windows format -> Save this patch file.

Run again:

C:\Users\kumar\Downloads\6.0.14.1114>patch -p1 < C:\Users\kumar\Downloads\SDK_6.0.14.1114_hotfix_001\sdk.patch
补丁文件二进制文件/ da14531/prod_test/prod_test_531.hex
补丁文件二进制文件/ da14531/prod_test/prod_test_531_UART_P00_P01.hex
补丁文件二进制文件/ da14531/prod_test/prod_test_531_UART_P03.hex
补丁文件二进制文件/ da14531/prod_test/prod_test_531_UART_P05.hex
补丁文件二进制文件/ da14585/prod_test/prod_test_585.hex
补丁文件二进制文件/ da14585/prod_test/prod_test_585_UART_P04_P05.hex
补丁文件二进制文件/ da14586/prod_test/prod_test_586.hex
补丁文件二进制文件/ da14586/prod_test/prod_test_586_UART_P04_P05.hex
patching file doc/licensing.txt
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_531.txt
修补文件项目/ target_apps / prod_test / prod_test / keil_5 /未使用_531_uart_p00_p01.txt
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_531_UART_P03.txt
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_531_UART_P05.txt
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_585.txt
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_585_UART_P04_P05.txt
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_586.txt
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_586_UART_P04_P05.txt
patching file sdk/common_project_files/misc/da14531_symbols.lds
patching file sdk/common_project_files/misc/da14531_symbols.txt
patching file sdk/common_project_files/misc/da14585_symbols.lds
patching file sdk/common_project_files/misc/da14585_symbols.txt
patching file sdk/platform/include/sdk_version.h
patching file utilities/flash_programmer/unused_jtag_531.txt
patching file utilities/flash_programmer/unused_jtag_585.txt
patching file utilities/flash_programmer/unused_uart_531.txt
patching file utilities/flash_programmer/unused_uart_585.txt
补丁文件实用程序/ secondary_bootloader / unused_531.txt
补丁文件实用程序/ secondary_bootloader / unused_585.txt
补丁文件实用程序/ secondary_bootloader / unused_586.txt

Done!

Will go and purchase a lottery ticket now...

PM_Dialog
Offline
Last seen:21 hours 25 min ago
工作人员
加入:2018-02-08 11:03
Hi mom2,

Hi mom2,

Glad that you are able to run the patch and thanks for the indication.

Thanks, PM_Dialog

tlrogers
Offline
Last seen:2 months 3 weeks ago
加入:2020-06-26 23:51
After a week for me this

After a week of issues for me this detailed list of instructions worked for me as well and Windows 10. Thanks for putting this together. Seems the hotfix patch.sdk may have issues that need addessing.