Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


Push request: NiosII port and LwIP demo app

Posted by DipSwitch on January 11, 2012
Good morning,

I'm almost done integrating LwIP v1.4.0 in FreeRTOS v7.1.0 in the Nios II IDE. I would like to share the demo app and port update. Would it be possible that this source is included in the repository so it will be released with feature releases?

Updated in the Nios II port:
Fixed bug report:
- Nios II port bug when using -O3 or -Os - ID: 3037968
- It's now possible to keep interrupts enabled while the scheduler has not been started yet. (So now it's possible to print output via USART before the OS is started for example...)
- The FreeRTOS tick handler is called via the timer hook provided by the Nios II HAL library.

Further more I made an install script which installs the FreeRTOS and LwIP packages into the Altera Nios II IDE (tested for version 11.0 and up, although v9.0 and v10.0 are probably also supported) So FreeRTOS can be chosen as Board Support Package (BSP) and LwIP can be chosen as software package when an FreeRTOS BSP is chosen.
There will also be installed a FreeRTOS + LwIP demo package. This demo consists of a default FreeRTOS demo and the LwIP stack running a TCP echo server and an HTTP server which displays the currently running FreeRTOS tasks.

RE: Push request: NiosII port and LwIP demo app

Posted by Richard on January 11, 2012
Sounds great. Please upload your code, with a few words, to the FreeRTOS Interactive site. There is an Altera forum there already. I have included a link below for your convenience:



RE: Push request: NiosII port and LwIP demo app

Posted by DipSwitch on January 12, 2012
Cool create a new topic with the port and the Demo!



RE: Push request: NiosII port and LwIP demo app

Posted by Richard on January 12, 2012
On behalf of the FreeRTOS community - Thank you for your contribution!


RE: Push request: NiosII port and LwIP demo app

Posted by henning larsen on March 7, 2012
Great work! In order to get the installer to work on one of two win7/64 machines however I had to modify the file alt-freertos-lwip-do-install.sh. The problem is related to POSIX file access rights in. When using cp, POSIX rights are copied. They are apparently not set to u+rw in the distribution.

I did two changes. Changed all distribution code to u+rw like this

echo " - Silently setting rw POSIX access on the distribution files to avoid access troubles..";
chmod -Rf u+rw FreeRTOS_src
chmod -Rf u+rw freertos_demo
chmod -Rf u+rw nios2_freertos_port
chmod -Rf u+rw altera_nios2
chmod -Rf u+rw freertos
chmod -Rf u+rw lwip

and where the code is copied to the altera directory I added the -f option (force) to the cp command (4 locations):
# now lets copy our stuff to the altera directory
echo -n " - FreeRTOS..: ";
if cp -rf "${INST_PATH}/freertos" "${COMPONENTS}"; then
echo "Success";
echo "Failed with error code: $?";

I dont know how to attach the suggested file. Teach me if you would like a copy. But again great job on this NIOS port.

RE: Push request: NiosII port and LwIP demo app

Posted by David Beck on September 7, 2012
I'm attempting to create the sof file that this demo relies on.

The Altera TSE Megacore function can be configured (in Qsys or SOPC Builder) for one of several core variations: "10/100Mb Small MAC", "10/100/1000Mb Ethernet MAC", "1000Mb Small MAC", and "10/100/1000Mb Ethernet MAC with 1000BASE-X/SGMII-PCS".

Does it matter which core configuration is used, and if it does, which ones are acceptable?

RE: Push request: NiosII port and LwIP demo app

Posted by DipSwitch on February 8, 2013
@ david-beck, any would suffice I think, I only tested it with the "10/100/1000Mb Ethernet MAC" and the "1000BASE-X/SGMII-PCS"
@helarsen thanks for your feed back. I'll update the install file and push the new version to github. I also updated LwIP to 1.4.1 and applied some bug fixes.

Sorry for the late answer, haven't really worked on the project for quite some time.

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists