Commit d1748212 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

Fixed header guard generator.

parent 98779f0c
......@@ -7,8 +7,9 @@ python3.5 gen_vhdl_package.py --licPath ../LICENSE --xactSpec ../spec/CTU/ip/CAN
# To generate C header files (register map and frame format)
python3.5 gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec ../spec/CTU/ip/CAN_FD_IP_Core/2.1/CAN_FD_IP_Core.2.1.xml --addrMap Regs --fieldMap Regs --wordWidth 32 --outFile ../driver/ctu_can_fd_regs.h --headName CAN_FD_frame_format
py gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec ../spec/CTU/ip/CAN_FD_IP_Core/2.1/CAN_FD_IP_Core.2.1.xml --addrMap Frame_format --fieldMap Frame_format --wordWidth 32 --outFile ../driver/ctu_can_fd_frame.h --headName CAN_FD_frame_format
python3.5 gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec ../spec/CTU/ip/CAN_FD_IP_Core/2.1/CAN_FD_IP_Core.2.1.xml --addrMap Regs --fieldMap Regs --wordWidth 32 --outFile ../driver/ctu_can_fd_regs.h --headName regs
python3.5 gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec ../spec/CTU/ip/CAN_FD_IP_Core/2.1/CAN_FD_IP_Core.2.1.xml --addrMap Frame_format --fieldMap Frame_format --wordWidth 32 --outFile ../driver/ctu_can_fd_frame.h --headName frame
# To generate Lyx docu for register map
......
......@@ -97,6 +97,6 @@ if __name__ == '__main__':
write_license(lic_text, '*', of)
headerGen.prefix = "ctu_can_fd"
headerGen.create_addrMap_package("CTU_CAN_FD")
headerGen.create_addrMap_package(args.packName)
headerGen.commit_to_file()
\ No newline at end of file
headerGen.commit_to_file()
......@@ -144,7 +144,7 @@ class HeaderAddrGenerator(IpXactAddrGenerator):
self.headerGen.write_comment("This file is autogenerated, DO NOT EDIT!",
0, small=True)
self.headerGen.wr_nl()
self.headerGen.create_package(name)
self.headerGen.create_package((self.prefix + "_" + name).upper())
self.headerGen.wr_nl()
if (self.addrMap):
......@@ -165,4 +165,4 @@ class HeaderAddrGenerator(IpXactAddrGenerator):
def write_reg(self):
pass
\ No newline at end of file
pass
......@@ -70,8 +70,8 @@ if __name__ == '__main__':
if (str_arg_to_bool(args.updHeader)):
print("Generating CAN FD memory registers Header file...\n")
os.system("""{} gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec {} --addrMap Regs --fieldMap Regs --wordWidth 32 --outFile ../driver/ctu_can_fd_regs.h --headName CAN_FD_frame_format""".format(pythonAlias, args.xactSpec))
os.system("""{} gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec {} --addrMap Frame_format --fieldMap Frame_format --wordWidth 32 --outFile ../driver/ctu_can_fd_frame.h --headName CAN_FD_frame_format""".format(pythonAlias, args.xactSpec))
os.system("""{} gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec {} --addrMap Regs --fieldMap Regs --wordWidth 32 --outFile ../driver/ctu_can_fd_regs.h --headName regs""".format(pythonAlias, args.xactSpec))
os.system("""{} gen_c_header.py --licPath ../lic/gpl_v2.txt --xactSpec {} --addrMap Frame_format --fieldMap Frame_format --wordWidth 32 --outFile ../driver/ctu_can_fd_frame.h --headName frame""".format(pythonAlias, args.xactSpec))
print("\nDone\n")
if (str_arg_to_bool(args.updDocs)):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment