Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread发布
使用httpd发生错误web_server
发布于 2012-04-11 21:27:48 浏览:6688
订阅该版
想利用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
这家伙很懒,什么也没写!
>MDK选择使用软件模拟器仿真运行。 >然后调出反汇编窗口,在其中右击,选择 show xx address. 然后就会弹出一个对话框,你把线程崩溃时的LR的值,即0x0801b765,填入,就可以看到在哪里崩溃的了。 >然后仔细检查吧。 --- 我看了下: ``` 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] ```
撰写答案
登录
注册新账号
关注者
0
被浏览
6.7k
关于作者
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
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
添加spi flash,支持sfud
2
rt-thread 如何使用多块sram
3
【国民技术N32】串口引脚复用配置
4
【本周六-北京】RT-Thread工业以太网应用技术研讨会
5
程序员中后期,靠什么和其他人拉开差距
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
UART
ESP8266
cubemx
WIZnet_W5500
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
编译报错
socket
中断
Debug
rt_mq_消息队列_msg_queue
keil_MDK
ulog
SFUD
msh
C++_cpp
MicroPython
本月问答贡献
RTT_逍遥
10
个答案
3
次被采纳
xiaorui
3
个答案
3
次被采纳
踩姑娘的小蘑菇
6
个答案
2
次被采纳
winfeng
2
个答案
2
次被采纳
三世执戟
11
个答案
1
次被采纳
本月文章贡献
catcatbing
3
篇文章
5
次点赞
lizimu
2
篇文章
9
次点赞
jinchanchan
2
篇文章
2
次点赞
alight
1
篇文章
5
次点赞
swet123
1
篇文章
4
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部