Skip to content

Accessing a file loaded by the host via EMBED_FILELIST #585

Answered by KM-AL
KM-AL asked this question in Q&A
Discussion options

You must be logged in to vote

After a lot of digging and trying to understand the cmake and source code and how it all interacts - I figured out the answer.

Strangely, this is not documented anywhere I could find, so here are the steps I took to make this work:

1- You need to add the file first in "sample_defs" folder, prefix it with "cpu1_". In this example it'll be "cpu1_mytestfile.txt"

2- In "targets.cmake" add the line "SET(cpu1_EMBED_FILELIST mytestfile,mytestfile.txt)"

3- You will then need to modify two files, "target_config.h" and "target_config.c", both can be found under "cFS/cfe/cmake/target/"

4- In "target_config.h", you will need to add a new struct similar to this and extern it:

typedef const struct
{
	c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KM-AL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant