EngineeringSpirit / FreeLwIP-Nios-II

FreeRTOS with LwIP integration in the Nios II EDS
19 stars 28 forks source link

Update port.c #8

Closed oxymoron87 closed 10 years ago

oxymoron87 commented 10 years ago

Cant't find vTaskIncrementTick() function in source code. Probably there is a typo and it should be xTaskIncrementTick()

EngineeringSpirit commented 10 years ago

Updating the project can't hurt, but actually I'm still waiting for LwIP 1.5.0 so we have a dual stack with support for IPv4 and IPv6. However we probably can first upgrade the FreeRTOS version to 7.6.0. I'll see if I can make a test project on the dev board I have at home and see if I can help port this weekend.

oxymoron87 commented 10 years ago

I've strange problem with the 7.6.0 and also with 7.2.0 version. After call to the vTaskStartScheduler() nothing happens and it seems like it is stopped or interrupts are not called or something i don't know. Everything called before vTaskStartScheduler is executed (i am trying to blink LEDs with vParTestSetLED and after that vStartLEDFlashTasks( tskIDLE_PRIORITY+3) is called).

oxymoron87 commented 10 years ago

I've realized that there is no call to alt_ic_isr_register anywhere in the source. After i've added function with the registration of ISR for hw timer and call this function from xPortStartScheduler TaskScheduler started to work as expected. Is it ok that there is no ISR registered for timer interrupt ? Or am i missing something ?

EngineeringSpirit commented 10 years ago

With Altera NIOS IDE 12.1 sp1 and Altera NIOS IDE 13.0 there is in the alt_sys_init.c file a function called alt_sys_init(void) which calls ALTERA_AVALON_TIMER_INIT ( TIMER, timer); this should eventually call alt_ic_isr_register(...) to enable the timer interrupt.

This file is generated by the BSP generator and is called by the Altera NIOS II startup code.

oxymoron87 commented 10 years ago

You are right. Strange that it didn't work for the first and second try. There are small issues when you don't use LWIP feature and also with alt-freertos-lwip-install.sh when used on Linux but it works with wih FreeRTOS 7.6.0 !

oxymoron87 commented 10 years ago

sorry it should be alt-freertos-lwip-do-install.sh