@@ -789,8 +789,16 @@ def compile_command(self, source, object, includes):
789
789
790
790
@abstractmethod
791
791
def parse_dependencies (self , dep_path ):
792
- """Take in a dependency file generated by the compiler and build a list of
793
- all files that the dep_path depends on.
792
+ """Parse the dependency information generated by the compiler.
793
+
794
+ Positional arguments:
795
+ dep_path -- the path to a file generated by a previous run of the compiler
796
+
797
+ Return value:
798
+ A list of all source files that the dependency file indicated were dependencies
799
+
800
+ Side effects:
801
+ None
794
802
"""
795
803
raise NotImplemented
796
804
@@ -799,7 +807,16 @@ def is_not_supported_error(self, output):
799
807
800
808
@abstractmethod
801
809
def parse_output (self , output ):
802
- """Take in compiler output and extract sinlge line warnings and errors from it
810
+ """Take in compiler output and extract sinlge line warnings and errors from it.
811
+
812
+ Positional arguments:
813
+ output -- a string of all the messages emitted by a run of the compiler
814
+
815
+ Return value:
816
+ None
817
+
818
+ Side effects:
819
+ call self.cc_info or self.notify with a description of the event generated by the compiler
803
820
"""
804
821
raise NotImplemented
805
822
@@ -978,56 +995,142 @@ def get_config_header(self):
978
995
def get_config_option (self , config_header ):
979
996
"""Generate the compiler option that forces the inclusion of the configuration
980
997
header file.
998
+
999
+ Positional arguments:
1000
+ config_header -- The configuration header that will be included within all source files
1001
+
1002
+ Return value:
1003
+ A list of the command line arguments that will force the inclusion the specified header
1004
+
1005
+ Side effects:
1006
+ None
981
1007
"""
982
1008
raise NotImplemented
983
1009
984
1010
@abstractmethod
985
1011
def assemble (self , source , object , includes ):
986
- """Generate the command line that:
987
- - Assembles the given assembly *source* file.
988
- - Puts the results into the file named *object*.
989
- - Has an include search path that includes everything in *includes*
1012
+ """Generate the command line that assembles.
1013
+
1014
+ Positional arguments:
1015
+ source -- a file path that is the file to assemble
1016
+ object -- a file path that is the destination object
1017
+ includes -- a list of all directories where header files may be found
1018
+
1019
+ Return value:
1020
+ The complete command line, as a list, that would invoke the assembler
1021
+ on the source file, include all the include paths, and generate
1022
+ the specified object file.
1023
+
1024
+ Side effects:
1025
+ None
1026
+
1027
+ Note:
1028
+ This method should be decorated with @hook_tool.
990
1029
"""
991
1030
raise NotImplemented
992
1031
993
1032
@abstractmethod
994
1033
def compile_c (self , source , object , includes ):
995
- """Generate the command line that:
996
- - Compiles the given C *source* file.
997
- - Puts the results into the file named *object*.
998
- - Has an include search path that includes everything in *includes*
1034
+ """Generate the command line that compiles a C source file.
1035
+
1036
+ Positional arguments:
1037
+ source -- the C source file to compile
1038
+ object -- the destination object file
1039
+ includes -- a list of all the directories where header files may be found
1040
+
1041
+ Return value:
1042
+ The complete command line, as a list, that would invoke the C compiler
1043
+ on the source file, include all the include paths, and generate the
1044
+ specified object file.
1045
+
1046
+ Side effects:
1047
+ None
1048
+
1049
+ Note:
1050
+ This method should be decorated with @hook_tool.
999
1051
"""
1000
1052
raise NotImplemented
1001
1053
1002
1054
@abstractmethod
1003
1055
def compile_cpp (self , source , object , includes ):
1004
- """Generate the command line that:
1005
- - Compiles the given C++ *source* file.
1006
- - Puts the results into the file named *object*.
1007
- - Has an include search path that includes everything in *includes*
1056
+ """Generate the command line that compiles a C++ source file.
1057
+
1058
+ Positional arguments:
1059
+ source -- the C++ source file to compile
1060
+ object -- the destination object file
1061
+ includes -- a list of all the directories where header files may be found
1062
+
1063
+ Return value:
1064
+ The complete command line, as a list, that would invoke the C++ compiler
1065
+ on the source file, include all the include paths, and generate the
1066
+ specified object file.
1067
+
1068
+ Side effects:
1069
+ None
1070
+
1071
+ Note:
1072
+ This method should be decorated with @hook_tool.
1008
1073
"""
1009
1074
raise NotImplemented
1010
1075
1011
1076
@abstractmethod
1012
1077
def link (self , output , objects , libraries , lib_dirs , mem_map ):
1013
- """Run the link command that will:
1014
- - Emit a file named *output*
1015
- - Includes all *objects* and *libraries*
1016
- - Searches for libraries in *lib_dirs*
1017
- - Generates a memory map file in the file *mem_map*
1078
+ """Run the linker to create an executable and memory map.
1079
+
1080
+ Positional arguments:
1081
+ output -- the file name to place the executable in
1082
+ objects -- all of the object files to link
1083
+ libraries -- all of the required libraries
1084
+ lib_dirs -- where the required libraries are located
1085
+ mem_map -- the location where the memory map file should be stored
1086
+
1087
+ Return value:
1088
+ None
1089
+
1090
+ Side effect:
1091
+ Runs the linker to produce the executable.
1092
+
1093
+ Note:
1094
+ This method should be decorated with @hook_tool.
1018
1095
"""
1019
1096
raise NotImplemented
1020
1097
1021
1098
@abstractmethod
1022
1099
def archive (self , objects , lib_path ):
1023
- """Run the command line that creates an archive containing *objects*, and named *lib_path*
1100
+ """Run the command line that creates an archive.
1101
+
1102
+ Positional arguhments:
1103
+ objects -- a list of all the object files that should be archived
1104
+ lib_path -- the file name of the resulting library file
1105
+
1106
+ Return value:
1107
+ None
1108
+
1109
+ Side effect:
1110
+ Runs the archiving tool to produce the library file.
1111
+
1112
+ Note:
1113
+ This method should be decorated with @hook_tool.
1024
1114
"""
1025
1115
raise NotImplemented
1026
1116
1027
1117
@abstractmethod
1028
1118
def binary (self , resources , elf , bin ):
1029
- """Run the command line that will Extract a binary named *bin* from an
1030
- elf file named *elf*.
1119
+ """Run the command line that will Extract a simplified binary file.
1120
+
1121
+ Positional arguments:
1122
+ resources -- A resources object (Is not used in any of the toolchains)
1123
+ elf -- the executable file that is to be converted
1124
+ bin -- the file name of the to be created simplified binary file
1125
+
1126
+ Return value:
1127
+ None
1128
+
1129
+ Side effect:
1130
+ Runs the elf2bin tool to produce the simplified binary file.
1131
+
1132
+ Note:
1133
+ This method should be decorated with @hook_tool.
1031
1134
"""
1032
1135
raise NotImplemented
1033
1136
0 commit comments