[ 33%] AS 'src/init.s' removing sdas Assembler V02.00 + NoICE + SDCC mods (STMicroelectronics STM8) Copyright (C) 2012 Alan R. Baldwin This program comes with ABSOLUTELY NO WARRANTY. Usage: [-Options] file Usage: [-Options] outfile file1 [file2 file3 ...] -d Decimal listing -q Octal listing -x Hex listing (default) -g Undefined symbols made global -n Don't resolve global assigned value symbols -a All user symbols made global -b Display .define substitutions in listing -bb and display without .define substitutions -c Disable instruction cycle count in listing -j Enable NoICE Debug Symbols -y Enable SDCC Debug Symbols -l Create list file/outfile[.lst] -o Create object file/outfile[.rel] -s Create symbol file/outfile[.sym] -p Disable automatic listing pagination -u Disable .list/.nlist processing -w Wide listing format for symbol table -z Disable case sensitivity for symbols -f Flag relocatable references by ` in listing file -ff Flag relocatable references by mode in listing file -I Add the named directory to the include file search path. This option may be used more than once. Directories are searched in the order given. ERROR compilation failed at : "d:\Code\code_server\stm8s\stm8s_bootloader\src\init.s", exit code: 3 ERROR build failed !, elapsed time 0:0:0
jack
打开 build 目录,找到 src/init.args.txt 文件,将内容贴上来
admin -plosgffw -Isrc -mstm8 .\build\Release\src\init.rel .\src\init.s
-plosgffw -Isrc -mstm8 .\build\Release\src\init.rel .\src\init.s
刚刚看了下,sdasstm8 这个程序不支持 sdcc 默认的参数:-mstm8, --debug
sdasstm8
-mstm8
--debug
即使去除这两个参数,编译成功也并没有生成 rel,导致链接失败
可能这个程序本身就有问题,暂时无法编译 .s 程序
admin 应该是用 sdasstm8 这个来编译 .s, 我用自己写的makefile 验证通过 sdasstm8 -plosgff $< EIDE能否支持自定义汇编编译工具及参数选择?
.s
makefile
sdasstm8 -plosgff $<
本来就是用的 sdasstm8
sdasstm8 不支持默认的 sdcc -m 参数,所以在你之前的截图上会提示失败
你可以打开 "C:\Users\用户名\.eide\bin\builder\cfg\sdcc.model.json" 这个文件:
"C:\Users\用户名\.eide\bin\builder\cfg\sdcc.model.json"
把第 14 行的 "asm", 删掉,
"asm",
把第 129 行的 "asm", 删掉
保存更改后的文件,然后编译试试会不会报错
admin 好的了解 那我现在是需要等待EIDE新版本,还是有方法我手动将一些参数去掉,来编译.s文件
EIDE
admin
按照这个方法修改可行
我也遇到了同样的问题,我编译的是8051. 直接点编译结果如下:
[ INFO ] start compilation ... [ 50%] CC 'src/main.c' sdcc: Calling preprocessor... sdcc: sdcpp.exe -nostdinc -Wall -std=c99 -I"src" -I"inc" -obj-ext=.rel -MMD .\build\Debug\src\main.d -MT .\build\Debug\src\main.rel -DSDCC_CHAR_UNSIGNED -DSDCC_MODEL_SMALL -DSDCC_OPTIMIZE_SPEED -DSDCC_FLOAT_REENT -DSDCCCALL=0 -DSDCC=4_2_0 -DSDCC_VERSION_MAJOR=4 -DSDCC_VERSION_MINOR=2 -DSDCC_VERSION_PATCH=0 -DSDCC_REVISION=13081 -DSDCC_mcs51 -DSTDC_NO_COMPLEX=1 -DSTDC_NO_THREADS=1 -DSTDC_NO_ATOMICS=1 -DSTDC_NO_VLA=1 -DSTDC_ISO_10646=201409L -DSTDC_UTF_16=1 -DSTDC_UTF_32__=1 -isystem "C:\Users\HDC.eide\tools\sdcc\bin..\include\mcs51" -isystem "C:\Users\HDC.eide\tools\sdcc\bin..\include" ".\src\main.c" sdcc: Generating code... sdcc: Calling assembler... sdcc: sdas8051.exe -plosgffw ".\build\Debug\src\main.rel" ".\build\Debug\src\main".asm [100%] AS 'src/startup.asm' removing sdas Assembler V02.00 + NoICE + SDCC mods (Intel 8051) Copyright (C) 2012 Alan R. Baldwin This program comes with ABSOLUTELY NO WARRANTY. 【命令说明略】 ERROR compilation failed at : "c:\SDCCProject\sdcc_asm_test\src\startup.asm", exit code: 3
[ INFO ] start compilation ...
[ 50%] CC 'src/main.c' sdcc: Calling preprocessor... sdcc: sdcpp.exe -nostdinc -Wall -std=c99 -I"src" -I"inc" -obj-ext=.rel -MMD .\build\Debug\src\main.d -MT .\build\Debug\src\main.rel -DSDCC_CHAR_UNSIGNED -DSDCC_MODEL_SMALL -DSDCC_OPTIMIZE_SPEED -DSDCC_FLOAT_REENT -DSDCCCALL=0 -DSDCC=4_2_0 -DSDCC_VERSION_MAJOR=4 -DSDCC_VERSION_MINOR=2 -DSDCC_VERSION_PATCH=0 -DSDCC_REVISION=13081 -DSDCC_mcs51 -DSTDC_NO_COMPLEX=1 -DSTDC_NO_THREADS=1 -DSTDC_NO_ATOMICS=1 -DSTDC_NO_VLA=1 -DSTDC_ISO_10646=201409L -DSTDC_UTF_16=1 -DSTDC_UTF_32__=1 -isystem "C:\Users\HDC.eide\tools\sdcc\bin..\include\mcs51" -isystem "C:\Users\HDC.eide\tools\sdcc\bin..\include" ".\src\main.c" sdcc: Generating code... sdcc: Calling assembler... sdcc: sdas8051.exe -plosgffw ".\build\Debug\src\main.rel" ".\build\Debug\src\main".asm [100%] AS 'src/startup.asm' removing
sdas Assembler V02.00 + NoICE + SDCC mods (Intel 8051)
Copyright (C) 2012 Alan R. Baldwin This program comes with ABSOLUTELY NO WARRANTY.
【命令说明略】
ERROR compilation failed at : "c:\SDCCProject\sdcc_asm_test\src\startup.asm", exit code: 3
startup.args.txt内容如下
-plosgffw -Isrc -Iinc --iram-size 256 --xram-size 0 --code-size 8192 --verbose .\build\Debug\src\startup.rel .\src\startup.asm
DracheTek
经检查, 删去"全局选项"中限制iram等大小的属性即可编译. 应该把这些选项填入"C编译器附加选项".
参数不兼容的问题,已经在 v3.11.3 中修复