-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Error, Can't Open ES App Startup file: /cf/cfe_es_startup.scr" when running a sample cpu1 application #482
Comments
Please run |
Also - the POSIX OSAL assumes your cwd is the base of the staged directory tree. To run CFE, you would do something like
(i.e. do not invoke cfe with a relative path such as |
I have spent some time looking into the expectations that CLion has about the structure of the build folder and I think now I understand the issue. CMake and CLion, that follows it closely, distinguish between the build output tree and the install tree. The build tree is the one which is When running CLion, it sets the current working directory for running the The install tree is controlled by I have prepared a patch without opening a PR yet to get your thoughts on whether that change would be seen as a positive one: along with the existing This is the branch and if you think it makes sense I can open the actual Pull Request: This is the log that I am having now on macOS:
|
I would like to add that we use CLion as a default IDE for all developers in our company, this is why some of the issues that I have been opening recently are coming from my attempts to run CFS on CLion, as easy as possible. Additionally, we think that CLion is a very intelligent IDE when it comes to working with CMake projects so it would be great if we could get the first-class CLion support for CFS and from what I see it should be just a few minor PRs that should not affect the non-CLion usage by other developers. Hope this gives a bit more context. |
One more observation about the build trees and install trees that complements my above comment: #482 (comment). Relying on install trees only also brings a disadvantage of having the installed binaries built in the These are the flags that CMake uses now for example:
Not only you get O3 but also the This altogether creates a rather limited debugging experience for me as a C/C++ CLion IDE user. |
The fundamental issue is that CFE isn't the simplest piece of software in this regard, at least in the default config. It isn't a single executable that you can just run and expect it to work. There is an associated script and a number of binaries (i.e. each individual loadable application/library) and they all need to be arranged in a proper directory tree so the CFE can find them at runtime. This does not match the directory structure that that CMake outputs, hence why the "install" step is absolutely needed in order to stage the binaries and scripts into the right arrangement for execution. IMO this is an issue with your CLion config. For instance in Eclipse I just change the build target to be As for the release vs. debug issue, this is also expected. When you build with optimization, debugging is limited. That's why the default build for an IDE, when you anticipate debugging, should probably be Debug, not Release or RelWithDebInfo. If you want to build both, just make separate build trees (i.e. build-debug and build-release) with different build types, and point your debugger at the build-debug one. |
Also note, if you really do want to run CFE directly from the CMake build tree (without install) this is actually possible if you statically link the application and the apps. See the |
I have spent some time with CFS already and I started to appreciate the complexity and the need in the two-tree CMake build process. I have only one comment about the CMake capabilities: having the proper runtime structure is easily possible with CMake and build tree as well. In my patch quoted above I seem to be doing everything just fine from the build tree without relying on the installed parts: https://github.com/nasa/cFE/compare/master...stanislaw:copy-the-files?expand=1. I could have missed certain files to be copied but they can be added in a very similar way.
I will check if it is possible but it looks like running from the build tree is the default way when CLion just works without additional customization.
I understand this very well but thanks for the hint: I need to double-check this again in my settings and maybe I missed something because it is too many moving parts while I am learning about CFS. P.S. Thanks for the hint and instructions how to switch to static linking. It is one of my next things on my list of learning. |
Can we close based on original topic being resolved? Feel free to open a new thread for other topics. |
Is your feature request related to a problem? Please describe.
I apologize in advance if the following issue that I am reporting is caused by my misunderstanding of the cFS/cFE CMake build system.
The issue is that I am getting the following issue when 1) I run the
make
command from the CFS repository and also 2) if I run it from CLion with the changes described in #478.1)
cp cfe/cmake/Makefile.sample Makefile cp -r cfe/cmake/sample_defs sample_defs make && ./build/cpu1/cpu1/core-cpu1
The log:
2
cp cfe/cmake/Makefile.sample Makefile cp -r cfe/cmake/sample_defs sample_defs # Building cpu1-all and then core-cpu1 in CLion
The log:
Looking for a missing file indicates that there is no way a running CFS can find a file because it is neither copied to a predetermined location nor the relative file
./cf/cfe_es_startup.scr
points to a meaningful location.Describe the solution you'd like
Our understanding is that the
cfe_es_startup.scr
is an important file and without loading its contents CFS does not work properly. We would expect some action to exist in the CMake script files that would copy this file and make it available to the running cFS.Describe alternatives you've considered
We assume that there is no other way of having CFS to run properly. There should be a procedure or instructions on how to make the
.scr
file available to CFS.Additional context
None.
Requester Info
Stanislav Pankevich (PTS, private German space company)
The text was updated successfully, but these errors were encountered: