CN101859244A - Multi-toolchain engineering construction method and system - Google Patents
Multi-toolchain engineering construction method and system Download PDFInfo
- Publication number
- CN101859244A CN101859244A CN200910081791A CN200910081791A CN101859244A CN 101859244 A CN101859244 A CN 101859244A CN 200910081791 A CN200910081791 A CN 200910081791A CN 200910081791 A CN200910081791 A CN 200910081791A CN 101859244 A CN101859244 A CN 101859244A
- Authority
- CN
- China
- Prior art keywords
- compiling
- toolchain
- chain
- instrument
- instrument chain
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention provides a multi-toolchain engineering construction method which comprises the following steps of: creating a batch file and a main makefile containing same compiling environment part in more than one toolchain; creating more than one sub makefile which respectively corresponds to different toolchains; selectively invoking corresponding toolchains by the main makefile according to input toolchain invoking parameters in the batch file, and compiling and outputting an executable file. The invention also provides a multi-toolchain engineering construction system which comprises an inlet module, a compiling engine module and a compiling module. The method and the system can realize the united construction of a plurality of compiling environments and reduce the workload of software developers at the same time of greatly lightening the maintenance difficulty.
Description
Technical field
The present invention relates to software development technique, relate in particular to a kind of multi-toolchain engineering construction method and system.
Background technology
At present, in the software program development field, the make instrument of GNU provides the support that makes up engineering, the main function of make instrument is exactly to describe the mutual relationship between the source program and safeguard compiling work automatically by the makefile file, but needs to use the software developer of make instrument to write the makefile file voluntarily.For example, for the cell phone software development platform, the cell phone software developer need use different compilation tool chains to realize native compile and cross compile under a plurality of translation and compiling environments, also just need write, safeguard a plurality of different makefile files.For instance,,, need set up two different engineerings respectively, in an engineering, carry out native compile, generate local binary file, in simulated environment, move at same set of program code for simulated environment and mobile phone environment etc.; In another engineering, carry out cross compile, generate target binary file, in mobile phone environment, move.
Each translation and compiling environment all provides different makefile files, and the cell phone software developer also just must safeguard the makefile file of all corresponding translation and compiling environments so, and it is extremely loaded down with trivial details to work.If the translation and compiling environment that need to use increases, need the quantity of the makefile file safeguarded to increase at double so, maintainable poor, and also duplication of labour amount is big.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of multi-toolchain engineering construction method and system, can realize that the unified of a plurality of translation and compiling environments makes up.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of multi-toolchain engineering construction method, comprising:
The main makefile file of creating autoexec and comprising identical translation and compiling environment part in the above instrument chain;
Create the sub-makefile file of the corresponding different instrument chains of difference more than;
Main makefile file selects to call corresponding instrument chain according to the instrument chain call parameters of importing in autoexec, compiling, output executable file.
In the technique scheme, described autoexec is set with the path and the variable of instrument chain.
Described identical translation and compiling environment partly comprises the source file information of needs compiling.
Described sub-makefile file comprises the definition and the compiling rule of instrument chain.
Described instrument chain is GCC instrument chain, RVCT instrument chain and/or ADS compilation tool chain.
The present invention also provides a kind of multi-toolchain engineering constructing system, comprises inlet module, compiler engine module and collector; Concrete:
Inlet module is used to create autoexec, and the instrument chain call parameters of importing is sent to the compiler engine module;
The compiler engine module is used for creating the main makefile file that comprises an identical translation and compiling environment part of above instrument chain, according to the instrument chain call parameters that inlet module is sent, sends corresponding translation and compiling environment load instructions to collector;
Collector is used to create the sub-makefile file of each instrument chain of correspondence respectively, according to the instruction that the compiler engine module is sent, calls corresponding instrument chain, compiling, output executable file.
In the technique scheme, described autoexec comprises the path and the variable of instrument chain.
Described identical translation and compiling environment partly comprises the source file information of needs compiling.
Described sub-makefile file comprises the definition and the compiling rule of instrument chain.
Described instrument chain is GCC instrument chain, RVCT instrument chain and/or ADS compilation tool chain.
Multi-toolchain engineering construction method of the present invention and system, comprise the main makefile file of identical translation and compiling environment part in the different instrument chains and be used for defining tool chain and regular sub-makefile file by establishment, the a plurality of translation and compiling environment engineerings of unified structure, rely on compiler engine to manage then, make engineering unified structure in different translation and compiling environments, can manage, switch translation and compiling environment easily.Switching the instrument chain call parameters that different instrument chains only need change autoexec input gets final product, increase or safeguard that the sub-makefile file that different compilation tool chains only need change defining tool chain and rule gets final product, when having alleviated the difficulty of safeguarding greatly, reduced software developer's workload.
Description of drawings
Fig. 1 is a multi-toolchain engineering constructing system structural representation of the present invention;
Fig. 2 is a multi-toolchain engineering construction method schematic flow sheet of the present invention;
Fig. 3 is an embodiment of the invention multi-toolchain engineering construction method schematic flow sheet.
Embodiment
Basic thought of the present invention is: in the computer system that an above instrument chain is installed, and identical translation and compiling environment main makefile file and the sub-makefile file corresponding more than partly in creating autoexec and comprising different instrument chains with different instrument chains; Select to call the instrument chain of corresponding sub-makefile file correspondence then according to the instrument chain call parameters of importing in the autoexec, compile, export corresponding executable file.Thereby in an engineering, be implemented under the different translation and compiling environments, use corresponding compilation tool chain to compile out required different executable file.
Wherein, the identical translation and compiling environment of different instrument chains partly comprises: the source file information of the basic environmental information of engineering and needs compiling, the difference of instrument chain is embodied in two aspects: the definition of instrument chain and compiling rule.
Fig. 1 is a multi-toolchain engineering constructing system structural representation of the present invention, and as shown in Figure 1, this system comprises inlet module 100, compiler engine module 110 and collector 120; Concrete:
Inlet module 100 is used to create autoexec, and the instrument chain call parameters of importing is sent to compiler engine module 110;
Compiler engine module 110 is used for creating the main makefile file that comprises an identical translation and compiling environment part of above instrument chain, according to the instrument chain call parameters that inlet module 100 is sent, sends corresponding translation and compiling environment load instructions to collector 120;
Collector 120 is used to create the sub-makefile file of each instrument chain of correspondence respectively, according to the instruction that compiler engine module 110 is sent, calls corresponding instrument chain, compiling, output executable file.
Here, described autoexec has three effects:
1) is responsible for the setting that definition compiles preceding translation and compiling environment, such as path that is set with the instrument chain and variable;
2) be responsible for receiving the instrument chain call parameters of importing;
3) call main makefile file and carry out the engineering structure.
Described main makefile file has two effects:
1) in main makefile program, defines identical translation and compiling environment part in the different instrument chains described above, for example, need the source file of compiling;
2) the sub-makefile file of management, promptly the variable according to the Start.bat definition comprises corresponding sub-makefile file.
The name of described sub-makefile file need have certain rule, could correctly comprise in main makefile like this and quote.
Simultaneously, the present invention also provides a kind of multi-toolchain engineering construction method, and Fig. 2 is a multi-toolchain engineering construction method schematic flow sheet of the present invention, and as shown in Figure 2, the inventive method comprises:
Step 1, in the computer system that an above instrument chain is installed, create autoexec, and create the main makefile file that comprises identical translation and compiling environment part in the above instrument chain;
Here, described instrument chain comprises GCC instrument chain, RVCT instrument chain and/or ADS compilation tool chain.
The sub-makefile file of step 2, establishment respectively corresponding each instrument chain more than;
The instrument chain call parameters that step 3, basis are imported in autoexec, main makefile file selects to call the instrument chain of corresponding translation and compiling environment;
Step 4, the instrument chain compiling of in selected translation and compiling environment, using correspondence, output executable file.
Below in conjunction with specific embodiments and the drawings multi-toolchain engineering construction method of the present invention is described further.
Embodiment
Present embodiment is developed as example with cell phone software, when making up simulated environment and mobile phone environment in the cell phone software exploitation, generally will use two instrument chains of GCC and RVCT.
Fig. 3 is an embodiment of the invention multi-toolchain engineering construction method schematic flow sheet, and as shown in Figure 3, the inventive method comprises:
Step 11, in the computer system that GCC instrument chain and RVCT instrument chain are installed, create autoexec Start.bat;
The sub-makefile file of step 13, the establishment corresponding GCC instrument chain of difference and RVCT instrument chain;
The instrument chain call parameters that step 14, basis are imported in autoexec Start.bat, main makefile file selects to call the instrument chain of corresponding translation and compiling environment;
In the step 11, create autoexec Start.bat, this autoexec has three effects:
1) is responsible for the setting that definition compiles preceding translation and compiling environment, for example, is set with the path and the variable of GCC instrument chain and RVCT instrument chain;
2) be responsible for receiving the instrument chain call parameters of input, if import SDK_COMPILER=GCC, then expression selects to call GCC instrument chain;
3) call main makefile file and carry out the engineering structure.
In the step 12, create main makefile file makefile-engine.mk, this document has two effects:
1) in main makefile program, define identical translation and compiling environment part in the different instrument chain described above, for example, need the source file of compiling;
2) the sub-makefile file of management, promptly the variable according to the Start.bat definition comprises corresponding sub-makefile file.For example, in main makefile, write:
include?makedefs_$(SDK_COMPILER).mk。
include?makerules_$(SDK_COMPILER).mk。
If SDK_COMPILER=GCC illustrates and selects to call GCC instrument chain that so main makefile file comprises makedefs_gcc.mk and makerules_gcc.mk.These two files promptly are the sub-makefile of definition GCC instrument chain translation and compiling environment.
In the step 13, create sub-makefile file makedefs_$ (SDK_COMPILER) .mk and makerules_$ (SDK_COMPILER) .mk.The name that it should be noted that sub-makefile file need have certain rule, could correctly comprise in main makefile like this and quote.
In the present embodiment, the distinctive translation and compiling environment of definition GCC instrument chain in makedefs_gcc.mk and makerules_gcc.mk, the distinctive translation and compiling environment of definition RVCT instrument chain in makedefs_rvct.mk and makerules_rvct.mk.
Switching to GCC instrument chain and RVCT instrument chain only needs the different instrument chain call parameters of input in autoexec Start.bat, for example, input Start.bat GCC, then calling GCC instrument chain according to makefile-engine.mk, makedefs_gcc.mk and makerules_gcc.mk file compiles engineering, compile, export the EXE file at last, on computers the analogue mobile phone program; And input Start.bat RVCT, then calling RVCT instrument chain according to makefile-engine.mk, makedefs_rvct.mk and makerules_rvct.mk file compiles engineering, compile, export the ELF file at last, can upload to directly operation in the chip for cell phone.Like this, simulated environment and the mobile phone environment in the cell phone software exploitation can make up on this framework.By that analogy, can also increase other translation and compiling environments, as ADS compilation tool chain, only need be, and the sub-makefile file that increases this ADS compilation tool correspondence get final product at this translation and compiling environment of compiler engine module the inside registration, revise and the code of increase all significantly reduces.
Multi-toolchain engineering construction method of the present invention and system only need safeguard that to the maintenance of engineering management corresponding sub-makefile gets final product, and greatly reduce the complexity that engineering makes up, manages, and help to improve integrated level and the reusability that engineering makes up.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.
Claims (10)
1. a multi-toolchain engineering construction method is characterized in that, this method comprises:
The main makefile file of creating autoexec and comprising identical translation and compiling environment part in the above instrument chain;
Create the sub-makefile file of the corresponding different instrument chains of difference more than;
Main makefile file selects to call corresponding instrument chain according to the instrument chain call parameters of importing in autoexec, compiling, output executable file.
2. multi-toolchain engineering construction method according to claim 1 is characterized in that, described autoexec is set with the path and the variable of instrument chain.
3. multi-toolchain engineering construction method according to claim 2 is characterized in that, described identical translation and compiling environment partly comprises the source file information of needs compiling.
4. multi-toolchain engineering construction method according to claim 3 is characterized in that, described sub-makefile file comprises the definition and the compiling rule of instrument chain.
5. according to each described multi-toolchain engineering construction method of claim 1 to 4, it is characterized in that described instrument chain is GCC instrument chain, RVCT instrument chain and/or ADS compilation tool chain.
6. a multi-toolchain engineering constructing system is characterized in that, described system comprises inlet module, compiler engine module and collector; Concrete:
Inlet module is used to create autoexec, and the instrument chain call parameters of importing is sent to the compiler engine module;
The compiler engine module is used for creating the main makefile file that comprises an identical translation and compiling environment part of above instrument chain, according to the instrument chain call parameters that inlet module is sent, sends corresponding translation and compiling environment load instructions to collector;
Collector is used to create the sub-makefile file of each instrument chain of correspondence respectively, according to the instruction that the compiler engine module is sent, calls corresponding instrument chain, compiling, output executable file.
7. multi-toolchain engineering constructing system according to claim 6 is characterized in that, described autoexec comprises the path and the variable of instrument chain.
8. multi-toolchain engineering constructing system according to claim 7 is characterized in that, described identical translation and compiling environment partly comprises the source file information of needs compiling.
9. multi-toolchain engineering constructing system according to claim 8 is characterized in that, described sub-makefile file comprises the definition and the compiling rule of instrument chain.
10. according to each described multi-toolchain engineering constructing system of claim 6 to 9, it is characterized in that described instrument chain is GCC instrument chain, RVCT instrument chain and/or ADS compilation tool chain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910081791A CN101859244A (en) | 2009-04-10 | 2009-04-10 | Multi-toolchain engineering construction method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910081791A CN101859244A (en) | 2009-04-10 | 2009-04-10 | Multi-toolchain engineering construction method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101859244A true CN101859244A (en) | 2010-10-13 |
Family
ID=42945170
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910081791A Pending CN101859244A (en) | 2009-04-10 | 2009-04-10 | Multi-toolchain engineering construction method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101859244A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799437A (en) * | 2012-07-18 | 2012-11-28 | 清华大学 | Automatic generating method and device of compiling script |
CN102830981A (en) * | 2012-09-12 | 2012-12-19 | 上海斐讯数据通信技术有限公司 | Implementation method used for embedded system software development tool |
CN103729227A (en) * | 2014-01-27 | 2014-04-16 | 南车株洲电力机车研究所有限公司 | Out file loading method, device and system |
CN104572231A (en) * | 2013-10-23 | 2015-04-29 | 航天信息股份有限公司 | Device and method for project migration among different operating platforms |
CN105893105A (en) * | 2016-03-29 | 2016-08-24 | 乐视控股(北京)有限公司 | Compiling system and method for multiple compiling platforms |
CN106843991A (en) * | 2016-12-13 | 2017-06-13 | 北京元心科技有限公司 | Program compiling method and system |
CN107291436A (en) * | 2016-04-13 | 2017-10-24 | 上海思立微电子科技有限公司 | SDK contracts for fixed output quotas generation method, device and terminal |
CN107390111A (en) * | 2017-06-22 | 2017-11-24 | 芯海科技(深圳)股份有限公司 | A kind of ICNewProject automated testing methods |
CN109491661A (en) * | 2018-10-24 | 2019-03-19 | 武汉思普崚技术有限公司 | Universal cross Compilation Method and equipment |
CN111796831A (en) * | 2020-06-24 | 2020-10-20 | 苏州大学 | Compiling method and device for multi-chip compatibility |
CN111984263A (en) * | 2020-07-21 | 2020-11-24 | 百富计算机技术(深圳)有限公司 | Method, device, equipment and medium for running second system application on first system |
CN112506518A (en) * | 2020-12-01 | 2021-03-16 | 东软睿驰汽车技术(沈阳)有限公司 | Compiling method and device based on configuration file |
CN116521272A (en) * | 2023-06-30 | 2023-08-01 | 睿思芯科(深圳)技术有限公司 | Online integrated development configuration system of custom chip |
-
2009
- 2009-04-10 CN CN200910081791A patent/CN101859244A/en active Pending
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799437B (en) * | 2012-07-18 | 2015-07-29 | 清华大学 | A kind of compilation script automatic generation method and automatically generating device |
CN102799437A (en) * | 2012-07-18 | 2012-11-28 | 清华大学 | Automatic generating method and device of compiling script |
CN102830981A (en) * | 2012-09-12 | 2012-12-19 | 上海斐讯数据通信技术有限公司 | Implementation method used for embedded system software development tool |
CN102830981B (en) * | 2012-09-12 | 2015-10-07 | 上海斐讯数据通信技术有限公司 | A kind of implementation method for embedded systemic software development instrument |
CN104572231B (en) * | 2013-10-23 | 2018-09-18 | 航天信息股份有限公司 | Engineering transplantation method between different operation platform and device |
CN104572231A (en) * | 2013-10-23 | 2015-04-29 | 航天信息股份有限公司 | Device and method for project migration among different operating platforms |
CN103729227A (en) * | 2014-01-27 | 2014-04-16 | 南车株洲电力机车研究所有限公司 | Out file loading method, device and system |
CN103729227B (en) * | 2014-01-27 | 2017-05-24 | 南车株洲电力机车研究所有限公司 | Out file loading method, device and system |
CN105893105A (en) * | 2016-03-29 | 2016-08-24 | 乐视控股(北京)有限公司 | Compiling system and method for multiple compiling platforms |
WO2017166529A1 (en) * | 2016-03-29 | 2017-10-05 | 乐视控股(北京)有限公司 | Compiling system and method for multiple compiling platforms |
CN107291436A (en) * | 2016-04-13 | 2017-10-24 | 上海思立微电子科技有限公司 | SDK contracts for fixed output quotas generation method, device and terminal |
CN107291436B (en) * | 2016-04-13 | 2020-11-27 | 上海思立微电子科技有限公司 | SDK packet generation method, device and terminal |
CN106843991A (en) * | 2016-12-13 | 2017-06-13 | 北京元心科技有限公司 | Program compiling method and system |
CN107390111A (en) * | 2017-06-22 | 2017-11-24 | 芯海科技(深圳)股份有限公司 | A kind of ICNewProject automated testing methods |
CN109491661A (en) * | 2018-10-24 | 2019-03-19 | 武汉思普崚技术有限公司 | Universal cross Compilation Method and equipment |
CN109491661B (en) * | 2018-10-24 | 2022-06-24 | 武汉思普崚技术有限公司 | Universal cross-compiling method and device |
CN111796831A (en) * | 2020-06-24 | 2020-10-20 | 苏州大学 | Compiling method and device for multi-chip compatibility |
CN111796831B (en) * | 2020-06-24 | 2023-02-28 | 苏州大学 | Compiling method and device for multi-chip compatibility |
CN111984263B (en) * | 2020-07-21 | 2024-03-19 | 百富计算机技术(深圳)有限公司 | Method, device, equipment and medium for running second system application on first system |
CN111984263A (en) * | 2020-07-21 | 2020-11-24 | 百富计算机技术(深圳)有限公司 | Method, device, equipment and medium for running second system application on first system |
WO2022017242A1 (en) * | 2020-07-21 | 2022-01-27 | 百富计算机技术(深圳)有限公司 | Method and apparatus for running second system application in first system, device, and medium |
CN112506518A (en) * | 2020-12-01 | 2021-03-16 | 东软睿驰汽车技术(沈阳)有限公司 | Compiling method and device based on configuration file |
CN112506518B (en) * | 2020-12-01 | 2023-07-14 | 东软睿驰汽车技术(沈阳)有限公司 | Compiling method and device based on configuration file |
CN116521272A (en) * | 2023-06-30 | 2023-08-01 | 睿思芯科(深圳)技术有限公司 | Online integrated development configuration system of custom chip |
CN116521272B (en) * | 2023-06-30 | 2024-01-12 | 睿思芯科(深圳)技术有限公司 | Online integrated development configuration system of custom chip |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101859244A (en) | Multi-toolchain engineering construction method and system | |
CN110870249A (en) | System and method for compiling high-level language code into scripts executable on a blockchain platform | |
CN102830981B (en) | A kind of implementation method for embedded systemic software development instrument | |
CN101667134B (en) | Method for constructing compiling system and compiling system constructing device | |
Perchat et al. | Component based framework to create mobile cross-platform applications | |
CN103197942B (en) | A kind of generation method of patch, the method for patch installing and device | |
CN109976760A (en) | A kind of the cross compile method and cross-compiler of graphic language | |
CN111309292B (en) | MATLAB/Simulink-based full-model executable program construction method | |
CN103729184A (en) | Software component combining and constructing method | |
CN102591777A (en) | Unit test code generation method and device | |
CN111984245A (en) | Block chain intelligent contract online integrated development environment system and implementation method | |
CN105468428A (en) | Android source code compiling method and system | |
CN103645888A (en) | System and method for automatically building operation system | |
CN102750177B (en) | Script realization method using compiler | |
CN110781126A (en) | FPGA heterogeneous acceleration realization method, system, terminal and storage medium of TensorFlow | |
CN111435312A (en) | Application program management method and device and electronic equipment | |
CN103631585A (en) | Method and system for developing application program | |
Li et al. | CPSiCGF: A code generation framework for CPS integration modeling | |
CN102622213A (en) | One-click upgrade tool generation system and manufacturing method thereof | |
Zhang et al. | Compiler Technologies in Deep Learning Co-Design: A Survey | |
Kim et al. | Terra: Imperative-symbolic co-execution of imperative deep learning programs | |
Luder et al. | Formal models for the verification of IEC 61499 function block based control applications | |
CN111596923B (en) | Haxe static link library construction method and device and electronic equipment | |
Shu et al. | From models to code: automatic development process for embedded control system | |
CN101794229A (en) | Method for managing Linux compiling authority |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20101013 |