Freescale AN3470 describes the ColdFire TCP/IP stack and its integrated simple RTOS, covering features, configuration, and APIs.
This Freescale application note describes the ColdFire TCP/IP stack and the simple operating system integrated with it. The stack supports TCP, UDP, ICMP, ARP, IP, DHCP, DNS, BOOTP, HTTP, TFTP and serial-to-Ethernet, and can run in superloop mode or with the non-preemptive, round-robin RTOS.
The note covers RTOS overview and API, task creation, the menu system and serial driver, stack configuration, MAC and IP address setting, DHCP and DNS clients, stack RAM usage, tested and reduced-RAM parameters, and the TCP/UDP/IP, zero-copy and DHCP/DNS APIs. It also covers the Ethernet PHY, MII interface initialization, and porting the project with CodeWarrior.
| Stack mode configuration | SUPERLOOP 1 or INICHE_TASKS 1 |
|---|---|
| Task stack sizes | NET_STACK_SIZE 4096, APP_STACK_SIZE 4096, CLOCK_STACK_SIZE 2048, IO_STACK_SIZE 2048, PING_STACK_SIZE 2048 |
| Supported protocols | TCP, UDP, ICMP, ARP, IP, DHCP, DNS, BOOTP, HTTP, TFTP |
| RTOS scheduling | Non-preemptive round-robin scheduler |
| RTOS functions | Nine functions, including tk_init, tk_new, tk_block, tk_sleep |
In superloop mode each task is a function call that returns to the main loop, and no RTOS RAM is used. With the RTOS enabled, tasks can be created and destroyed at runtime and each task gets its own stack allocated from the heap.
The RTOS mode is configured in the ipport.h file using the SUPERLOOP and INICHE_TASKS defines. One must be defined and the other undefined, since they cannot be defined at the same time.
The stack supports TCP, UDP, ICMP, ARP and IP, plus DHCP or manual IP configuration, DNS, BOOTP, HTTP, TFTP and serial-to-Ethernet.
No. The RTOS does not support task priorities; the scheduler simply increments to the next TCB in the list and executes the task if it is ready to execute.