Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread发布
使用httpd发生错误web_server
发布于 2012-04-11 21:27:48 浏览:6182
订阅该版
想利用lwip里面自带的httpd做个web server,我加的代码: ```void rt_init_thread_web_server_entry(void* parameter) { httpd_init(); while(1) { rt_thread_delay(200); //sleep 2 sec } }``` 作为一个独立的任务。我用的芯片是stm32103fvet6 在PC端的浏览器地址栏输入192.168.0.101后,系统打印出来: ```psr: 0x01000000 pc: 0x0800f076 lr: 0x0801b765 r12: 0x00000000 r03: 0xffffffff r02: 0x0800f051 r01: 0x20008a70 r00: 0x000000a1 hard fault on thread: tcpip thread pri status sp stack size max used left tick error -------- ---- ------- ---------- ---------- ---------- ---------- --- tcpip 0x0c ready 0x000000c8 0x00000400 0x00000220 0x00000014 000 etx 0x0f suspend 0x00000090 0x00000200 0x00000090 0x0000000e 000 erx 0x0f suspend 0x00000090 0x00000200 0x000000d0 0x00000010 000 tidle 0x1f ready 0x00000050 0x00000100 0x00000050 0x0000001c 000 tshell 0x14 suspend 0x00000088 0x00000800 0x00000088 0x0000000a 000 init_4 0x08 suspend 0x00000080 0x00000800 0x00000080 0x00000014 000 init_3 0x08 suspend 0x000000d8 0x00000800 0x000001a0 0x0000000c 000 init_2 0x08 suspend 0x00000088 0x00000800 0x000000a0 0x00000013 000 init_1 0x07 suspend 0x000000f0 0x00000800 0x000000f0 0x00000013 000``` 请帮忙分析下是什么原因。谢谢。
查看更多
3
个回答
默认排序
按发布时间排序
prife
2012-04-12
这家伙很懒,什么也没写!
MDK选择使用软件模拟器仿真运行。 然后调出反汇编窗口,在其中右击,选择 show xx address. 然后就会弹出一个对话框,你把线程崩溃时的LR的值,即0x0801b765,填入,就可以看到在哪里崩溃的了。 然后仔细检查吧。
isupercar
2012-04-15
这家伙很懒,什么也没写!
[quote]MDK选择使用软件模拟器仿真运行。 然后调出反汇编窗口,在其中右击,选择 show xx address. 然后就会弹出一个对话框,你把线程崩溃时的LR的值,即0x0801b765,填入,就可以看到在哪里崩溃的了。 然后仔细检查吧。[/quote] 我看了下: [code] 646: snmp_insert_udpidx_tree(pcb); 647: /* pcb not active yet? */ 648: if (rebind == 0) { 649: /* place the PCB on the active list if not already there */ 650: pcb->next = udp_pcbs; 651: udp_pcbs = pcb; 652: } 653: LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, 654: ("udp_bind: bound to %"U16_F".%"U16_F".%"U16_F".%"U16_F", port %"U16_F" ", 655: (u16_t)((ntohl(pcb->local_ip.addr) >> 24) & 0xff), 656: (u16_t)((ntohl(pcb->local_ip.addr) >> 16) & 0xff), 657: (u16_t)((ntohl(pcb->local_ip.addr) >> 8) & 0xff), 658: (u16_t)(ntohl(pcb->local_ip.addr) & 0xff), pcb->local_port)); 659: return ERR_OK; 0x0801B764 F06F000A MVN r0,#0x0A 660: } 661: /** 662: * Connect an UDP PCB. 663: * 664: * This will associate the UDP PCB with the remote address. 665: * 666: * @param pcb UDP PCB to be connected with remote address ipaddr and port. 667: * @param ipaddr remote IP address to connect with. 668: * @param port remote UDP port to connect with. 669: * 670: * @return lwIP error code 671: * 672: * ipaddr & port are expected to be in the same byte order as in the pcb. 673: * 674: * The udp pcb is bound to a random local port if not already bound. 675: * 676: * @see udp_disconnect() 677: */ 678: err_t 679: udp_connect(struct udp_pcb *pcb, struct ip_addr *ipaddr, u16_t port) 0x0801B768 E8BD81F0 POP {r4-r8,pc} 645: pcb->local_port = port; 646: snmp_insert_udpidx_tree(pcb); 647: /* pcb not active yet? */ 0x0801B76C 8266 STRH r6,[r4,#0x12][/code]
撰写答案
登录
注册新账号
关注者
0
被浏览
6.2k
关于作者
isupercar
这家伙很懒,什么也没写!
提问
2
回答
1
被采纳
0
关注TA
发私信
相关问题
1
RT-Thread单内核v0.2.2正式版
2
[发布] RT-Thread RTOS v0.2.3版本
3
RT-Thread 0.3.0 beta
4
RT-Thread/STM32 0.3.0 RC1发布
5
RT-Thread/LM3S 0.3.0 RC1版发布
6
建议弄个MIPS版本的。龙芯上用。
7
开源实时操作系统RT-Thread 0.3.0正式版发布
8
关于RT-THREAD的UDP讨论
9
这里是BUG回报板块!
10
rt-thread stm32 0.3.0 rc1 网络问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
机器人操作系统 (ROS2) 和 RT-Thread 通信
4
五分钟玩转RT-Thread新社区
5
国产MCU移植系列教程汇总,欢迎查看!
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
Rt-thread 排坑(持续更新)
2
rt-thread与linux运行支持的平台对比
3
RT-Thread nano移植到恩智浦s32k144,S32 Design Studio使用的代码
4
RT-Thread开发GD32F450 添加adc外设
5
RT-Thread Smart qemu-virt64-riscv 用户态 userapps 的编译与运行
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
FinSH
Bootloader
ART-Pi
CAN总线
Hardfault
文件系统
USB
DMA
RT-Thread
线程
SCons
RT-Thread Nano
stm32
MQTT
ota
ESP8266
RTC
UART
rtthread
packages_软件包
freemodbus
rt-smart
I2C
WIZnet_W5500
flash
cubemx
FAL
定时器
BSP
AB32VG1
PWM
ADC
msh
SDIO
socket
keil
Debug
C++_cpp
LVGL
中断
编译报错
SFUD
SMP
MicroPython
本月问答贡献
宇宙码蚁
41
个答案
5
次被采纳
xiaorui
25
个答案
4
次被采纳
Ryan_CW
6
个答案
4
次被采纳
lchnu
12
个答案
3
次被采纳
张世争
4
个答案
3
次被采纳
本月文章贡献
张世争
6
篇文章
13
次点赞
YZRD
5
篇文章
8
次点赞
快乐小鸟
4
篇文章
4
次点赞
RTT_逍遥
3
篇文章
24
次点赞
recan
2
篇文章
17
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部