From: B.Gustafsson Date: 21 Oct 1997 VLT-SW-NOV97 - RELEASE NOTES FOR VXWORKS (TORNADO) ================================================== From this release LCC is based on Tornado 1.01 instead of VxWorks 5.2. For the LCU software there are almost no change. Only the new compiler does some more checking and produces more warning. To remove them see below. The major change is on the workstation tools. They are based on the target server which can be started with the 'launch' command. The VxWorks 5.2 debugger 'vxgdb' is no longer existing. Now start the debugger CrossWind from the launcher. Instead of the init file '.vxgdbinit' it uses '.gdbinit'. For more information see the Tornado User Guide. Warnings using Tornado GNU compiler =================================== The following note describes some of the more common warnings using the Tornado C compiler. - Old definition of use_rcsId must be updated: Eg: WARNING: left-hand operand of comma expression has no effect... SOLUTION: &use_rcsId Replace with ===> (void)&use_rcsId Note: A good way to do it very fast is running the following: tooReplace "\&use_rcsId" "(void)\&use_rcsId" *.c - Functions that return no void must have return statement - If the warning implicit declarations for knowns functions appears, you can avoid warnings including related libraries: Eg: WARNING: implicit declaration of function `fabs' SOLUTION: Add head line: #include "math.h" - Assignment in conditional statement must be enclosed by parentheses around it: Eg: WARNING: suggest parentheses around assignment used as truth value... SOLUTION: i) if (mot = dev->nameHw) ... Replace with ==> if ((mot = dev->nameHw)) ... ii) if (a|b|c == 0) ... Replace with ==> if ((a|b|c) == 0) ... - When using stdio formatting functions in some cases it is necesary to force data types. Eg: WARNING: int format, long int arg (arg 3)... SOLUTION: in lines like this: sprintf(anything,"....%d...",...,time->tv_sec..) ==> sprintf(anything,"....%d...",...,(int)time->tv_sec..) - Data type force in expression that works with bits Eg: WARNING: overflow in implicit constant conversion SOLUTION: vltLOGICAL anyValue; anyValue = (dev->State & anyConstant) Replace with ==> anyValue = (vltLOGICAL)(dev->State & anyConstant) - When initializing array values the compiler issues warnings because initalizers for non-scalars types are not in between braces. Eg: These are some cases: The following declarations for the examples are used: struct twoints { int a; int b; }; union args { struct twoints s; int a; float b; }; args table[]= { 10 }; i) a scalar expression was not casted to the non-scalar type in the initializer list. In the example you try to pass an integer to the initializer args table[]= { 10 }; --- To Fix --> args table[] = { ((args)10) }; ii) try to initialize a union args table[]= {{10,2}}; -- To Fix --> args table[] = { { {10,2} } }; union initializers can initialize only the first element of the union, since in this case the first element of the union was a struct and struct are initialized surrounded by braces it leads to the double braced expression shown. iii) multi-column arrays not delimimting rows args table [3][2] = { , , { {, }, , , -- To fix --> {, }, , {, } } } iv) Another case is the declarations of string's list Eg: WARNING: missing braces around initializer for `modNames[5]' vltBYTE32 anyList[]={"item1",.."itemN-1",NULL} NULL is not recognized like a string so that get a warning. -- To fix --> vltBYTE32 anyList[]={"item1",.."itemN-1",{NULL}} In the case you have a character array like: char *anyList[]={"item1",.."itemN-1",NULL} -- To fix --> char *anyList[]={"item1",.."itemN-1",(char*)NULL} Tornado host tools ================== Customizing the host tools: The way to do it is creating a .wind directory in your $HOME. In this directory is stored every local configuration for targer servers, launch, debugger and so on. So you need to create a $HOME/.wind/windsh.tcl file in which you can customize the host shell. Eg: --------- windsh.tcl file ------------ # set stdin, stdout, stderr, and logging output # to host shell if { [shParse {tstz = open ("/vio/0",2,0)}] != -1 } { shParse {vf0 = tstz}; shParse {ioGlobalStdSet(0,vf0)}; shParse {ioGlobalStdSet(1,vf0)}; shParse {ioGlobalStdSet(2,vf0)}; shParse {logFdAdd (vf0)}; shParse {printf ("Std I/O set here!\n")}; } else { shParse {printf ("Std I/O unchanged.\n")}; } !!!!WARNING!!!! You should be careful using this. There are problems when you use the rlogin shell simultaneously. Close the host shell before rebooting the LCU otherwise the bootScript might hang. --------------------------------------- * Tornado shell support both C and tcl commands. To switch between them you must type ? -> ? tcl> ? -> * If you want to change the prompt of shell (->) you can use the function shellPromptSet. Eg: -> shellPromptSet "lte32-> " Like windsh.tcl is posible use launch.tcl, crosswind.tcl and so on to customize each tool. Below follws the standard configurations for target servers. - Target name / IP address : name/IP of LCU - Target server name : name assigned for each targer server - All symbols : This option should be ON This option include local and global symbols in the target symbol table. - Verbose : This option should be ON Display target-server status information and error messages. - Target/Host symbol tables synchronisation : This option should be ON Synchronize both symbol tables target and host. The rest of fields should have the default values. To customize CrossWind, you can add to $HOME/.gdbinit file and put gdb commands which are executed when the debbuger start up. Eg: dir /vlt/NOV97/vw/bin/MC68040 dir /diskf/home/mkiekebu/INTROOT tar vxw lte32 * Note: Remember that optimized code cannot be debugged ____oOo_____