nasa / SIL

Tools for generating CFS ECI-compatible code from Simulink models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table File Load Command and File Not Found

JimKaidyNASA opened this issue · comments

I have been able to send commands with the python GroundSystem. Specificially attempted to upload table files that exist in the directory structure (created in the build). So for instance I tried to load the ~/build/cpu1/exe/cntl_de_gn.tbl using Table Load Command:

image

The cFS output shows the command went through but could not find the file (table).

image

@JimKaidyNASA Can you post the output of the CFS startup process? Are there any entries about failing to load a table? If so, it might be a problem with the table definition. If not, it might be a problem with your command.

Regardless of which problem it is, we'll likely need the following information to troubleshoot:

  • arguments to the ECI_TBL_FILEDEF macro for this table (located in the table's source file)
  • value you're using for PARAM_TBL_PATH_PREFIX (which can be found in eci_app_cfg.h)
  • version of CFE you're using

image

image

Arguments:
image

PARAM_TBL_PATH_PREFIX commented out?
image

cFE version is 6.5.0.0

@JimKaidyNASA If at all possible, please post using github code blocks for code/output. Makes it much easier to read and copy/paste.

Sorry, could use a bit more info. Can you also post your table definition structure (ie, the ECI_ParamTable variable) from eci_interface.h?

Can you confirm that you posted the definition for the proper table? The log says that its looking for a table in the file cntl_acs_gn.tbl however your table definition is specifying that table will reside in a file called cntl_de_gn.tbl.

I am cutting and pasting from my VM because with VPN, I cannot send the code over the Firefox github with code highlights due to an unknown block in network visibility. Only when I turn off the VPN can I send the code over github. If this is a problem, I will have to turn the VPN on/off send it, then VPN off/on each time I send this way.
Here is the definition of ECI_ParamTable in eci_interface.h:
image
image

Here is the correct table file def:

image

The definition of ECI_Tbl_t (the type of ECI_ParamTable) can be found here. As you can see, the name is the second element. In the definition you've provided its ctnl_acs_gn_Tbl.

In the macro ECI_TBL_FILEDEF, defined here, the table name is the 3rd argument. In the definition you've provided, that's CNT.cntl_acs_gn_Tbl.

So there seems to be a mismatch there which I need to look into.

The log message says that's it's failing to load CNT_APP.cntl_acs_gn_Tbl, but I don't know where that name is defined. Is your app named CNT? If so, then do you know where CNT_APP came from? As far as I'm aware, ECI never prepends the name of the app to the table name. Did you define that somewhere?

I was thinking it might be something to do with _ versus . delimiter between gn and Tbl.

But as far as CNT naming that is the new name of the model instead of Controller. It was built with the name CNT. Now as to the CNT_APP, that was the naming convention (working with Tawanda here), that was given to the cfe_es_startup.scr:

CFE_APP, /cf/apps/cnt.so, cnt_AppMain, CNT_APP, 60, 16384, 0x0, 0;

Could the CNT_APP here be the culprit? The others have a similar syntax. Such as CI_LAB_APP, TO_LAB_APP, SCH_LAB_APP.

I suspect that's your issue then. You can see here, that ES uses the 4th entry as the name of the app (in this case CNT_APP), however, in your eci_interface.h you likely have some defines like

#define ECI_APP_NAME_UPPER             "CNT"
#define ECI_APP_NAME_LOWER             "cnt"

where you're defining your app's name as CNT. When SIL generates the table name, its using the ECI name. Something in table services must be using the ES name. Can you try making those consistent?

Looks like changing CNT_APP to CNT might have fixed it.

image

So with the above have I still got a related issue? CNT seems to be correct for upper and cnt for lower. The above log does indicate that the App Does Not Register State Table. Is this related?

I'm unsure how to answer your question. It seems to me that #17 has been resolved... the error messages about being unable to load a table are no longer present in the output you're showing. If you agree then go ahead and close #17.

If you're no longer observing the problem that prompted this issue (commands not loading tables), then you can go ahead and close this one as as well.

The setting to control the generation of a state table is in your model config, shown below:

image

If you did not select that option, then you would expect that message.

Ok thanks. That part of the is closed. Since we consolidated #16 and #17, I am still working on the loading of the table from the ASIST command ground system. I am unclear on whether I need the full path or the just the file name and is the file the one with the .tbl (should be). These are located in the cfs/build/cpu1/exe and exe/cf.

@JimKaidyNASA Unfortunately how table services interprets commands sent to it are beyond the scope of the SIL. I suspect you'd need to specify the full path, but I don't know the answer to your questions.

Ok thanks for helping to track down the issue in the cfe_es_startup.scr.