I am trying the demo project(uIP Embedded WEB Server Demo)on STR912-SK board, when I download it to flash and start to run, it always occur data_abort exception.
I use debugger to step by step execute, I found when calling list.c, it will cause data_abort execption(calling vListRemove function and executing "pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;").
My ethernet cable is not plugged in. And I didn’t make any changes to the source files.
When executing LCD_init() in the main function, it will occur Data_Abort exeception.
It shouldn’t occur any interrupt here.
The LCD_Init() function is called from prvSetupHardware(), which itself is called from main(). This means LCD_Init() is called before the scheduler is started. LCD_Init() can however attempt to call vTaskDelay() which will cause a crash if called prior to the scheduler being started. I think this must be your problem. Strange I have not seen it myself, must be just down to the interface timing in the initialisation function.
Try moving LCD_Init() out of prvSetupHardware(), and instead call from prvLCDMessageTask(), immediately prior to entering the infinite loop. It will then be called from a task - after the scheduler is started. Let me know if this fixes the problem and I will add a note to the known issues list.
Please note I have added the following ‘known issue’ - although this is not causing a problem on my system it is an error that could be the cause of your problems:
"The STR9 demo calls LCD_Init() from prvSetupHardware(), which itself is called from main(). However, there is a possibility that LCD_Init() will attempt to call vTaskDelay() and must therefore not be called prior to the scheduler being started. It is recommended to move the call to LCD_Init() from prvSetupHardware() to the top of prvLCDTask()."
Note that prvLCDTask() is the correct task to call the init function from.
I remove the lcd_init() , and it works ! The web server can run successful.
I think the problem is the different hardware board. When I use STR910-EVAL board , the LCD works normal , but on STR912-SK board , lcd_init() can’t execute normally . They use different LCD module .
Thats good. I have updated the files in the Subversion copy. The LCD module I have responds fast enough that the delay never gets called - hence I have not seen the problem before.