EngineeringSpirit / FreeLwIP-Nios-II

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

Improvements to the installation process under Windows. #2

Closed helarsen closed 10 years ago

helarsen commented 11 years ago

I have with success installed and used it under win7/64 Quartus 12.1 but not without issues during the installation and during compilation. Here are my suggestions as on how this easily can be improved. Thanks for a nice tool - may this be my modest contribution.

A) After installation, the acces rights to the folder 'xx\12.1\nios2eds\components\freertos' in the quartus directory are not properly setup. There are no read acces to the files. I think this is due to some posix enheritance rules. What I did to solve the problem was: Open nios command prompt in 'xx\12.1\nios2eds\components\freertos' and execute the following to add user read and write....

chmod -R u+rw .

This could and should be put into the script file as a last action in the installation. It would also work under linux.

B) The file .\src\tse_ethernet_phys.c reads in the start:

include "altera_avalon_tse.h"

include "altera_avalon_tse_system_info.h"

include "system.h"

ifdef TSE_MY_SYSTEM

This should be changed to ...

ifdef TSE_MY_SYSTEM

include "altera_avalon_tse.h"

include "altera_avalon_tse_system_info.h"

include "system.h"

The reason being that if you dont use the TSE module, you dont have the files "altera_avalon_tse.h and "altera_avalon_tse_system_info.h" and you get compile errors. Moving the #ifdef TSE_MY_SYSTEM removes the dependency when you dont use TSE and it compiles correctly in all cases.

C) Put a warning that the directory from where you install, may not contain any blank's in the path. For instance: File alt-freertos-lwip-install.bat could have a line:

echo "Warning - Script's fails if there are blanks in paths" pause

Or of course more elegant: Check and only report if the batch file finds problems. The issue is that if you have blank's in the path, the error message is very cryptic: "File path does not exist" as it only gets part of the file path up to the first blank. This is problematic for a casual user.

D) In the INSTALL file it says: "2) Unzip the latest FreeRTOS source into FreeRTOS_src directory." This is not precise enough as the exact location is important for the script to work, and simply unzipping and renaming the directory will not work! You must move down the directory to find the proper set of folders. I would suggest something like..

"2) Unzip the latest FreeRTOS source. Move the folder containing the /demo, /source and readme.txt to the directory level which is the same as the install scripts (and this file). Rename this folder to FreeRTOS_src. So you will have this directory structure containing - among other - these entities: YourDistributionFolder/FreeRTOS_src/Demo/.... YourDistributionFolder/FreeRTOS_src/Source/.... YourDistributionFolder/alt-freertos-lwip-install.sh YourDistributionFolder/alt-freertos-lwip-install.bat YourDistributionFolder/alt-freertos-lwip-do-install.sh YourDistributionFolder/INSTALL

DipSwitch commented 11 years ago

I'll fix this in the next commit. Thanks for pointing it out.