Hi. Thought we had this working earlier but failing to patch the latest SDK with the hotfix on 2 different Windows 10 systems.
1) From where can we download the patch.exe utility to perform this patching? Believe this tool is not native to 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:
Just caught my typo of missing out on the "<" pipe character. This will fix (I think) one of the PC but patch.exe is missing on another Windows 10 box. Is it a 3rd party tool?
patch -p1 < <PATH_TO_HOTFIX_EXTRACT>/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?
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
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.
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
Thanks.
Downloaded SDK_6.0.14.1114.rar and attempting to patch with the SDK_6.0.14.1114_hotfix_001.rar file.
Please attempt to follow the procedure and let us know if it works for you. Using the latest patch.exe tool, our Win10 box just locks up when attempting to follow:
> patch -p1 < <PATH_TO_HOTFIX_EXTRACT>/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?
Hi mom2,
Thanks, PM_Dialog
Thank you. We will try again shortly.
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.
Still not working. Is your patch.exe the same filesize of 112,128 bytes?
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
patching file binaries/da14531/prod_test/prod_test_531.hex
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
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.
Hi mom2,
I am using the patch.exe file which is within the GIT installation. Could you please check this ?
Thanks, PM_Dialog
Ok. Just got it working. The solution is far from simple and needs to be seriously documented so that the next developer does not wast 2+ weeks on this "simple" issue.
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:
Extract the original SDK with only one level deep (to support the -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 <DIR> .
2020-12-01 11:41 AM <DIR> ..
2020-11-24 10:42 AM <DIR> binaries
2020-12-01 11:48 AM <DIR> config
2020-12-01 12:10 PM <DIR> doc
2007-05-14 06:19 PM 112,128 patch.exe
2020-11-24 10:42 AM <DIR> projects
2020-11-24 10:42 AM <DIR> sdk
2020-12-01 11:48 AM <DIR> third_party
2020-11-24 10:42 AM <DIR> 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 <DIR> .
2020-12-01 11:44 AM <DIR> ..
2020-11-12 11:58 AM <DIR> binaries
2020-11-12 11:58 AM 699 DISCLAIMER.TXT
2020-11-12 11:58 AM <DIR> 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 <DIR> system_library
2020-11-12 11:58 AM <DIR> toolbox_resources
Next, enter the SDK folder using the command prompt in ADMIN mode. Right mouse-click and run the command mode with Administrative Rights.
Enter the SDK folder using the dos CD commands.
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
patching file binaries/da14531/prod_test/prod_test_531.hex
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
Using my black-belt in Google-fu, found this excellent thread and resolution here:
batch file - "Assertion failed" when using patch.exe of Git for Windows - Stack Overflow
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
patching file binaries/da14531/prod_test/prod_test_531.hex
patching file binaries/da14531/prod_test/prod_test_531_UART_P00_P01.hex
patching file binaries/da14531/prod_test/prod_test_531_UART_P03.hex
patching file binaries/da14531/prod_test/prod_test_531_UART_P05.hex
patching file binaries/da14585/prod_test/prod_test_585.hex
patching file binaries/da14585/prod_test/prod_test_585_UART_P04_P05.hex
patching file binaries/da14586/prod_test/prod_test_586.hex
patching file binaries/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
patching file projects/target_apps/prod_test/prod_test/Keil_5/unused_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
patching file utilities/secondary_bootloader/unused_531.txt
patching file utilities/secondary_bootloader/unused_585.txt
patching file utilities/secondary_bootloader/unused_586.txt
Done!
Will go and purchase a lottery ticket now...
Hi mom2,
Glad that you are able to run the patch and thanks for the indication.
Thanks, PM_Dialog
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.