T-VEC User's Group Forums

Question: Test Execution Detailed Steps

Question: Test Execution Detailed Steps

Posted: Tue Jul 29, 2008 1:16 pm

by USA_Aggie

Good Afternoon,

This post is somewhat of a follow up to my previous post - in that I am attempting to modify the makefile created myself since I cannot get the batch files to work. Basically, I am following the steps in Appendix C of the Simulink Tester User's Guide.

For Step 2 I have the following Questions:

A.

i.I only modified the first instances of the MATLAB_ROOT and MATLAB_BIN (which are in the "Tokens expanded by make_rtw" section of the file) - is this correct? There is another instance of both of these variables in the "Model and reference models" section. The User's Guide references the section as "Default Directories".

ii. What is the release 13 it is referring to (for the # MATLAB_INCLUDES) line.

B. In the "list of required sources" section (in the file called "Source Files"), one of the references it says to remove was not there to start with (grt_main.c). Could this indicate a problem with the system?

D.

i. The instruction say to find the line beginning with ..\$(MODEL).exe in the Rules section of the makefile. I found the Rules section but ..\$(MODEL).exe is at the end of one of the lines:

ii. Finally, it says to change the output message this rule emits from. This line is supposed to look like this before modification: @echo ### Created executable $(MODEL).exe - however it does not appear to exist in the file.

Hopefully, someone can answer my questions. Thank you very much for your time.

USA_Aggie

Re: Question: Test Execution Detailed Steps

Posted: Tue Jul 29, 2008 2:25 pm

by busser

Hi USA_Aggie

i.I only modified the first instances of the MATLAB_ROOT and MATLAB_BIN (which are in the "Tokens expanded by make_rtw" section of the file) - is this correct? There is another instance of both of these variables in the "Model and reference models" section. The User's Guide references the section as "Default Directories".

There really is only one location to modify. The instance of these variables in the "Model and reference models" section

is part of the make file logic that suggests that if there is an alternate matlab root folder, then use it. Now, this make file is produced by Matlab's RTW and I'm not aware of the actual usage of the $(ALT_MATLAB_ROOT) variable and when it might come into play. But since this variable is defined in the same location in the makefile as $(MATLAB_ROOT)"

you can probably alleviate any inconsistencies in their definitions by making sure that both instances (ALT and non_ALT) of each of the two variables point to the same location.

ii. What is the release 13 it is referring to (for the # MATLAB_INCLUDES) line.

I assume that you are asking about this line from the User's Guide.

These steps assume Matlab 13.1 is installed with the Microsoft Visual C++ compiler. Slight variations might be necessary if using a different version of Matlab or a different compiler.

Before Mathworks started using the 2007a, 2007b, 2008a version numbering, their version numbers were in the form of R13, R14 (Release 13, Release 14).

matlab_about_image.png (61.99 KiB) Viewed 3968 times

These Users Guide notes were added around the time of R13. So, the material is simply saying that the guidance is specific to Matlab R13 version of the Simulink RTW code generator. Unfortunately, Mathworks makes many changes to the files produced by the RTW and so it is hard to create User's Guide information specific to every Matlab version.

B. In the "list of required sources" section (in the file called "Source Files"), one of the references it says to remove was not there to start with (grt_main.c). Could this indicate a problem with the system?

No there is no problem with the system, I believe that the RTW/grt coder no longer generates this file by default, it could be optional now - not sure. The actual meaning of this statement is that you don't want to try and build any .c files that are not important with respect to the test driver "main()" program that is the target of this test driver build and execute process. If the RTW-generated .mk file includes a reference to grt_main.c then the code generator was set to create a main program for the model. But since the test driver is now expected to be the "main" program, you should remove this file from the .mk file if you are configuring it by hand ( this is normally done automatically by the hack_sl_makefile.bat script).

i. The instruction say to find the line beginning with ..\$(MODEL).exe in the Rules section of the makefile. I found the Rules section but ..\$(MODEL).exe is at the end of one of the lines:

It looks like the makefile that is now being generated by RTW has evolved a bit. There is now a MACRO call PRODUCT that is at the beginning of the line in the Rules section which includes the $(MODEL).exe file reference in its own definition.

makefile.png (26.79 KiB) Viewed 3971 times

You can probably just edit the definition of PRODUCT accordingly.

ii. Finally, it says to change the output message this rule emits from. This line is supposed to look like this before modification: @echo ### Created executable $(MODEL).exe - however it does not appear to exist in the file.

The user's guide statement is just suggesting that you change the message being generated so that it indicates the building of the test driver executable file rather than the $(model).exe file.

It is probably referring to this line

@cmd /C "echo $(BUILD_SUCCESS) executable $(MODEL).exe"

change it to something like

@cmd /C "echo $(BUILD_SUCCESS) sl2tvec_<subsystem>.exe"

Hopefully, someone can answer my questions. Thank you very much for your time.

Please forgive me if I am incorrect. But from your questions I have wonder if you are not very familiar with make file language and execution. Perhaps you can find someone local that is more familiar with make files who can provide some local assistance with making these changes.