weideke@qq.com
weideke@qq.com
This guy hasn't written anything yet

注册于 1 year ago

回答
3
文章
0
关注者
0

是的,谢谢,看你以前的回答,把cmb_println(...)改成rt_kprintf就能打印了

studio里编译的系统,单独env环境编译的动态模块能运行吗?windows上单独env编译的动态模块试了一下不能运行,运行就系统崩溃。

如果用IAP程序更新,bin文件这么大怎么处理呢

现在是运行时错误,可能问题是什么?
模块代码:
#include

int main(int argc, char *argv[])
{
printf("this is hello test string\n");

return 0;
}

编译:
$ scons --app=hello
scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\RT-ThreadStudio\workspace\rtthread-apps\tools\ua.py", line 193, in BuildApplication
scons: done reading SConscript files.
scons: Building targets ...
CC hello\main.o
LINK hello\hello.mo
Copy("D:\TFTP_Server\clinet", "hello/hello.mo")
scons: done building targets.

运行时错误如下:
tftp: write request from 192.168.10.163 for 'hello.mo' mode 'octet'
tftp: closing

msh /troot>
msh /troot>
msh /troot>hello
msh /troot>psr: 0x20000000
r00: 0x00000001
r01: 0x24008788
r02: 0x24008788
r03: 0x24007da8
r04: 0x24007f00
r05: 0xdeadbeef
r06: 0xdeadbeef
r07: 0x24008780
r08: 0xdeadbeef
r09: 0xdeadbeef
r10: 0xdeadbeef
r11: 0xdeadbeef
r12: 0x00000000
lr: 0x0800abfb
pc: 0x24007da8
hard fault on thread: hello

thread pri status sp stack size max used left tick error
-------- --- ------- ---------- ---------- ------ ---------- ---
hello 31 running 0x00000048 0x00000800 06% 0x0000000a 000
eth_link 20 suspend 0x00000120 0x00000400 28% 0x0000000a 000
eth_rx 2 suspend 0x000000a8 0x00000800 13% 0x00000004 000
tcpip_th 2 suspend 0x000000f0 0x00000800 59% 0x00000003 000
tshell 20 suspend 0x00000184 0x00001000 34% 0x00000001 000
sys_work 23 suspend 0x00000088 0x00000800 06% 0x0000000a 000
tidle0 31 ready 0x00000088 0x00000100 53% 0x00000020 000
timer 4 suspend 0x0000007c 0x00000200 24% 0x00000009 000
main 10 suspend 0x00000158 0x00000800 57% 0x0000000b 000
usage fault:
SCB_CFSR_UFSR:0x02 INVSTATE

已解决,是rtconfig.py中错误
M_LFLAGS = DEVICE + CXXFLAGS + '-Wl,--gc-sections,-z,max-page-size=0x4' +\
' -shared -fPIC -nostartfiles -nostdlib -static-libgcc'
在-shared前加一个空格解决。

编译动态模块出现找不到cl的错误
$ scons --verbose --app=hello
scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\RT-ThreadStudio\workspace\rtthread-apps-master\tools\ua.py", line 76, in BuildHostApplication

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\RT-ThreadStudio\workspace\rtthread-apps-master\tools\ua.py", line 91, in BuildHostApplication
scons: done reading SConscript files.
scons: Building targets ...
cl /Fohello\main.obj /c hello\main.c /nologo /DHOST_BUILD /Ihello /Itools\host\rtthread
'cl' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [hello\main.obj] Error 1
scons: building terminated because of errors.

这个有解决办法吗?

已解决,是加密软件问题,谢谢

win7系统,一直不能启动,退了杀毒软件也是,可能跟加密软件有点关系

回到
顶部

发布
问题

投诉
建议