From 395f00d44ee259d5db6fd6165c6cd18c8fe40e2f Mon Sep 17 00:00:00 2001 From: Appana Durga Kedareswara rao Date: Tue, 28 Mar 2023 12:54:04 +0530 Subject: [PATCH] lopper: assists: baremetal_xparameters_xlnx: Add support for generating NUMBER_OF_SLRS define Added support for generating the NUMBER_OF_SLRS define if the slrcount variable defined in the root node. Signed-off-by: Appana Durga Kedareswara rao --- lopper/assists/baremetal_xparameters_xlnx.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lopper/assists/baremetal_xparameters_xlnx.py b/lopper/assists/baremetal_xparameters_xlnx.py index ab0d641c..7ad7da45 100644 --- a/lopper/assists/baremetal_xparameters_xlnx.py +++ b/lopper/assists/baremetal_xparameters_xlnx.py @@ -289,6 +289,12 @@ def xlnx_generate_xparams(tgt_node, sdt, options): plat.buf(f"\n#define STDOUT_BASEADDRESS {hex(val)}") plat.buf(f"\n#define STDIN_BASEADDRESS {hex(val)}\n") + #Define for NUMBER_OF_SLRS + if sdt.tree[tgt_node].propval('slrcount') != ['']: + val = sdt.tree[tgt_node].propval('slrcount', list)[0] + plat.buf(f"\n/* Number of SLRs */") + plat.buf(f"\n#define NUMBER_OF_SLRS {hex(val)}\n") + plat.buf('\n#endif /* end of protection macro */') plat.out(''.join(plat.get_buf()))