stm8l051F3使用stvd进行仿真调试时提示如下错误:
Running Linker
clnk -l"C:\Program Files (x86)\COSMIC\CXSTM8\Lib" -o Debug\stm8l051_sx1278.sm8 -mDebug\stm8l051_sx1278.map Debug\stm8l051_sx1278.lkf
#error clnk Debug\stm8l051_sx1278.lkf:1 segment .bss size overflow (293)
The command: "clnk -l"C:\Program Files (x86)\COSMIC\CXSTM8\Lib" -o Debug\stm8l051_sx1278.sm8 -mDebug\stm8l051_sx1278.map Debug\stm8l051_sx1278.lkf " has failed, the returned value is: 1
exit code=1.
.bss段溢出,修改stvd选项:
Project->Settings->C Compiler->Category下拉框选择General,Memory Models下拉框选择Long Stack(+modsl)
Project->Settings->C Compiler->Category下拉框选择Optimizations, Optimizations下拉框选择Customize, 勾选Disable for Debugging(-no)和Split Functions in Separate Sections(+spilt)两项
再次编译,任然报上面相同的错误,再次修改stvd选项:
Project->Settings->Linker->Category下拉框选择Input,将Ram选项的To由0x1ff改为0x3ff
![](/attachment/201703/3/20698826_1488505925TnDz.png)
再次编译,成功。
Running Linker
clnk -l"C:\Program Files (x86)\COSMIC\CXSTM8\Lib" -o Debug\stm8l051_sx1278.sm8 -mDebug\stm8l051_sx1278.map Debug\stm8l051_sx1278.lkf
#error clnk Debug\stm8l051_sx1278.lkf:1 segment .bss size overflow (293)
The command: "clnk -l"C:\Program Files (x86)\COSMIC\CXSTM8\Lib" -o Debug\stm8l051_sx1278.sm8 -mDebug\stm8l051_sx1278.map Debug\stm8l051_sx1278.lkf " has failed, the returned value is: 1
exit code=1.
.bss段溢出,修改stvd选项:
Project->Settings->C Compiler->Category下拉框选择General,Memory Models下拉框选择Long Stack(+modsl)
Project->Settings->C Compiler->Category下拉框选择Optimizations, Optimizations下拉框选择Customize, 勾选Disable for Debugging(-no)和Split Functions in Separate Sections(+spilt)两项
再次编译,任然报上面相同的错误,再次修改stvd选项:
Project->Settings->Linker->Category下拉框选择Input,将Ram选项的To由0x1ff改为0x3ff
![](/attachment/201703/3/20698826_1488505925TnDz.png)
再次编译,成功。