Skip to content
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

Stores the last offset in the configuration space when generating the XML. #693

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Stores the last offset in the configuration space when generating the…
… XML.

This is helpful in determining how much eeprom space is needed for a given
project. The developer just has to check the cdi.xmlout file.

(note: this is not the byte size of the XML, but the byte size of the config
represented by it.)
balazsracz committed Jan 29, 2023

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
commit 64c6cae2dc46bf0f37f8bf24155250aec5bb00e3
2 changes: 2 additions & 0 deletions src/openlcb/CompileCdiMain.cxx
Original file line number Diff line number Diff line change
@@ -42,6 +42,8 @@ void render_cdi_helper(const CdiType &t, string ns, string name)
printf("extern const size_t %s_SIZE;\n", name.c_str());
printf("const size_t %s_SIZE = sizeof(%s_DATA);\n", name.c_str(),
name.c_str());
printf("const size_t %s_END_OFFSET = %u;\n", name.c_str(),
(unsigned)t.end_offset());
printf("\n} // namespace %s\n\n", ns.c_str());
}
}