Other Parts Discussed in Thread: HALCOGEN
Hello,
I have downloaded the HTTP example from
and I have followed the guidelines from
(I have used a freshly generated RM57/FreeRTOS project as a source of settings to copy) to integrate support for FreeRTOS into this project.
I was able to successfully merge the two worlds, except that only one of them can be active. That is, the HTTP server is operational provided that the FreeRTOS kernel is not started. When the kernel is started, no HTTP operation takes place.
The vTaskStartScheduler() call is added right after invocation of http_init(), as in the following stripped (and actually tested) example:
int main(void)
{
unsigned int ipAddr;
struct in_addr devIPAddress;
char * txtIPAddrItoA;
gioInit();
sciInit();
IntMasterIRQEnable();
_enable_FIQ();
uint8 ip_addr[4] = { 192, 168, 11, 112 };
uint8 netmask[4] = { 255, 255, 255, 0 };
uint8 gateway[4] = { 192, 168, 11, 254 };
ipAddr = lwIPInit(0, emacAddress,
htonl(*((uint32_t *)ip_addr)),
htonl(*((uint32_t *)netmask)),
htonl(*((uint32_t *)gateway)),
IPADDR_USE_STATIC);
devIPAddress.s_addr = ipAddr;
txtIPAddrItoA = (char *)inet_ntoa(devIPAddress);
LocatorConfig(emacAddress, "HDK enet_lwip");
printf("IP address: %s\n", txtIPAddrItoA);
pbuf_init();
httpd_init();
printf("Start\n");
char testChar;
sciReceive(sciREG1, 1, &testChar);
printf("Starting kernel \n");
vTaskStartScheduler();
return 0;
}
The call to sciReceive exists only so that the time of invoking the kernel is controlled by the user. The HTTP server works fine until the kernel is started, after that it is not responsive any longer.
I am able to run regular tasks in this setup, which indicates that the FreeRTOS was integrated properly - except for some detail that I seem to be missing.
What are your suggestions?