初级会员
- 积分
- 64
- 金钱
- 64
- 注册时间
- 2018-3-16
- 在线时间
- 21 小时
|
我在STM32F767上移植RAW LWIP传输图片时,发现死机的现象,后在仿真调试时,发现是进入监听块的时候发生的硬件错误struct tcp_pcb *
tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog)
{
struct tcp_pcb_listen *lpcb;
LWIP_UNUSED_ARG(backlog);
LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, return NULL);
/* already listening? */
if (pcb->state == LISTEN) {
return pcb;
}
#if SO_REUSE
if (ip_get_option(pcb, SOF_REUSEADDR)) {
/* Since SOF_REUSEADDR allows reusing a local address before the pcb's usage
is declared (listen-/connection-pcb), we have to make sure now that
this port is only used once for every local IP. */
for(lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
if (lpcb->local_port == pcb->local_port) {
if (ip_addr_cmp(&lpcb->local_ip, &pcb->local_ip)) {
/* this address/port is already used */
return NULL;
}
}
}
}
#endif /* SO_REUSE */
lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN);在此处分配内存池时,无法分配,进入死循环
...
在这之前我定义了三个数组,怀疑是不是跟这数组有关,但不知道问题出在哪?
u32 *dcmi_line_buf[2]; |
|