@@ -69,6 +69,7 @@ class ProjMgrYamlCbuild : public ProjMgrYamlBase {
6969 void SetMiscNode (YAML::Node miscNode, const MiscItem& misc);
7070 void SetMiscNode (YAML::Node miscNode, const vector<MiscItem>& misc);
7171 void SetDefineNode (YAML::Node node, const vector<string>& vec);
72+ void SetBooksNode (YAML::Node node, const std::vector<BookItem>& books, const std::string& dir);
7273 const bool m_ignoreRteFileMissing;
7374};
7475
@@ -464,11 +465,13 @@ void ProjMgrYamlCbuild::SetContextNode(YAML::Node contextNode, const ContextItem
464465 if (context->boardPack != nullptr ) {
465466 SetNodeValue (contextNode[YAML_BOARD_PACK], context->boardPack ->GetID ());
466467 }
468+ SetBooksNode (contextNode[YAML_BOARD_BOOKS], context->boardBooks , context->directories .cbuild );
467469 }
468470 SetNodeValue (contextNode[YAML_DEVICE], context->device );
469471 if (context->devicePack != nullptr ) {
470472 SetNodeValue (contextNode[YAML_DEVICE_PACK], context->devicePack ->GetID ());
471473 }
474+ SetBooksNode (contextNode[YAML_DEVICE_BOOKS], context->deviceBooks , context->directories .cbuild );
472475 SetProcessorNode (contextNode[YAML_PROCESSOR], context->targetAttributes );
473476 SetPacksNode (contextNode[YAML_PACKS], context);
474477 SetControlsNode (contextNode, context, context->controls .processed );
@@ -869,6 +872,16 @@ void ProjMgrYamlCbuild::SetControlsNode(YAML::Node node, const ContextItem* cont
869872 }
870873}
871874
875+ void ProjMgrYamlCbuild::SetBooksNode (YAML::Node node, const std::vector<BookItem>& books, const std::string& dir) {
876+ for (const auto & book : books) {
877+ YAML::Node bookNode;
878+ SetNodeValue (bookNode[YAML_NAME], FormatPath (book.name , dir));
879+ SetNodeValue (bookNode[YAML_TITLE], book.title );
880+ SetNodeValue (bookNode[YAML_CATEGORY], book.category );
881+ node.push_back (bookNode);
882+ }
883+ }
884+
872885void ProjMgrYamlCbuild::SetProcessorNode (YAML::Node node, const map<string, string>& targetAttributes) {
873886 for (const auto & [rteKey, yamlKey]: RteConstants::DeviceAttributesKeys) {
874887 if (targetAttributes.find (rteKey) != targetAttributes.end ()) {
0 commit comments