@@ -530,14 +530,14 @@ def derive_peripheral(self, pname, pmod):
530530 if ptag is None :
531531 ptag = ET .SubElement (parent , "register" )
532532 ET .SubElement (ptag , "name" ).text = pname
533- ET .SubElement (ptag , "addressOffset" ).text = base_address
533+ ET .SubElement (ptag , "addressOffset" ).text = hex ( base_address )
534534 else :
535535 for value in list (ptag ):
536536 if value .tag in ("name" , "baseAddress" , "interrupt" , "description" ):
537537 continue
538538 ptag .remove (value )
539539 if base_address :
540- ptag .find ("baseAddress" ).text = base_address
540+ ptag .find ("baseAddress" ).text = hex ( base_address )
541541 if description :
542542 ptag .find ("description" ).text = description
543543 for value in ptag :
@@ -862,14 +862,14 @@ def derive_register(self, rname, rmod):
862862 if rtag is None :
863863 rtag = ET .SubElement (parent , "register" )
864864 ET .SubElement (rtag , "name" ).text = rname
865- ET .SubElement (rtag , "addressOffset" ).text = address_offset
865+ ET .SubElement (rtag , "addressOffset" ).text = hex ( address_offset )
866866 else :
867867 for value in list (rtag ):
868868 if value .tag in ("name" , "addressOffset" , "description" ):
869869 continue
870870 rtag .remove (value )
871871 if address_offset :
872- rtag .find ("addressOffset" ).text = address_offset
872+ rtag .find ("addressOffset" ).text = hex ( address_offset )
873873 if description :
874874 rtag .find ("description" ).text = description
875875 for value in rtag :
0 commit comments