*** EFM32 branch ***
1. Solve the problem mentioned in revision 1623 (runtime error) - Cause: In the EFM32 demo application, some TCP/IP functions are called in non-task context (e.g. "tcp_new()"). And after revision 1621, those functions will trigger the scheduler ("rt_schedule()") which seems to be triggered only in task context. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1624 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
2156e22b3c
commit
30d072eee8
|
@ -114,12 +114,16 @@ void rt_demo_thread_entry(void* parameter)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(EFM32_USING_ETHERNET)
|
#if defined(EFM32_USING_ETHERNET)
|
||||||
|
extern void httpd_init(void);
|
||||||
|
|
||||||
rt_device_t eth = RT_NULL;
|
rt_device_t eth = RT_NULL;
|
||||||
|
|
||||||
eth = rt_device_find(ETH_DEVICE_NAME);
|
eth = rt_device_find(ETH_DEVICE_NAME);
|
||||||
if (eth != RT_NULL)
|
if (eth != RT_NULL)
|
||||||
{
|
{
|
||||||
eth->init(eth);
|
eth->init(eth);
|
||||||
|
httpd_init();
|
||||||
|
rt_kprintf("Http service init OK!\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -187,7 +191,6 @@ int rt_application_init()
|
||||||
#if defined(RT_USING_LWIP)
|
#if defined(RT_USING_LWIP)
|
||||||
{
|
{
|
||||||
extern void lwip_sys_init(void);
|
extern void lwip_sys_init(void);
|
||||||
extern void httpd_init(void);
|
|
||||||
|
|
||||||
/* Create Ethernet Threads */
|
/* Create Ethernet Threads */
|
||||||
if (eth_system_device_init() != RT_EOK)
|
if (eth_system_device_init() != RT_EOK)
|
||||||
|
@ -204,7 +207,6 @@ int rt_application_init()
|
||||||
#endif
|
#endif
|
||||||
/* init lwip system */
|
/* init lwip system */
|
||||||
lwip_sys_init();
|
lwip_sys_init();
|
||||||
httpd_init();
|
|
||||||
rt_kprintf("TCP/IP stack init OK!\n");
|
rt_kprintf("TCP/IP stack init OK!\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
/* SECTION: RT_DEBUG */
|
/* SECTION: RT_DEBUG */
|
||||||
#define RT_DEBUG
|
#define RT_DEBUG
|
||||||
//#define RT_MEM_DEBUG (1)
|
//#define RT_DEBUG_MEM (1)
|
||||||
//#define RT_DEBUG_SCHEDULER (1)
|
//#define RT_DEBUG_SCHEDULER (1)
|
||||||
//#define THREAD_DEBUG
|
//#define THREAD_DEBUG
|
||||||
//#define IRQ_DEBUG
|
//#define IRQ_DEBUG
|
||||||
|
|
Loading…
Reference in New Issue