Shell环境是Mac OSX和默认bash, SDK是5.0.3(不能从下拉菜单选择!)< / p > < p >============ 我所做的(1):请从“假设行“美元;是shell ===========
$ pwd
/Users/<username>/Downloads/DA1458x_SDK/5.0.3/utilities/uvproj2Makefile
$ chmod +x ./uvproj2Makefile
$ ./uvproj2Makefile -i ../secondary_bootloader/secondary_bootloader. .uvproj
conversion ../secondary_bootloader/secondary_bootloader. .uvproj Makefile。使用Makefile。tmpl模板…
sed: 1: "s!\ @ \ @core_inc_search_p…“:保有的换行符内替代模式< br / > sed: 1:“/ ^ core_inc_search_paths…“:额外的字符在d < br / > sed命令:1:“/ ^ core_inc_search_paths…“:额外字符结束时p < br / > sed命令:1:“/ ^ core_inc_search_paths…“:坏国旗在替代命令:& # 039;}& # 039;< br / >对话:我:没有这样的文件或目录< br / > sed: 1:“/ & lt; FileType> 1 & lt; \ /文件类型…“:额外字符结束时p < br / > sed命令:我:没有这样的文件或目录< br / > sed: 1:“/ ^ core_src_cfiles /,/^$ ...& ”:额外字符结束时p < br / > sed命令:1: "/^core_src_cfiles /,/^$ ...": bad flag in substitute command: '}'
sed: -i: No such file or directory
sed: 1: "/<FileType>3<\/FileType ...": extra characters at the end of p command
sed: -i: No such file or directory
==================
Secondly I copied the script to echo-out actual "core_inc_search_paths" variable which is defined at line 61 of ./uvproj2Makefile .
==========what I did (2)==========
$ sed -n 's/<IncludePath>\(.*\)<\/IncludePath>/\1/ p' ../secondary_bootloader/secondary_bootloader.uvproj
.\includes;..\..\sdk\platform\include;..\..\sdk\platform\driver\spi;..\..\sdk\platform\driver\i2c_eeprom;..\..\sdk\platform\driver\spi_flash;..\..\s
dk\platform\driver\gpio;..\..\sdk\platform\arch;..\..\sdk\platform\arch\compiler\rvds;..\..\sdk\platform\arch\ll\rvds;..\..\sdk\platform\driver\reg
.\includes
=============================
from this we can see that ".\/includes" appearing twice, and it causes "unescaped newline inside substitute pattern" error.
I understand the sed part is picking up include paths from <IncludePath>...</IncludePath> line of the uvproj file.
I checked the uvproj file and found the tag several lines, mostly no value but only 2 of them have ".\includes;...." and ".\includes" values.
My guess is the script assumes <IncludePath> tag with valid value appears only once.
Could you please check those sed line(s) to correctly convert those paths, and make it work.
Thanks in advance,
Kazuki