
Operating instruction manual Hilscher Waf Build System Building libraries, applications and netX firmware V1.8 Hilscher Gesellschaft für Systemautomation mbH www.hilscher.com DOC170404OI02EN | Revision 2 | English | 2018-01 | Released | Public Introduction 2/60 Table of contents 1 Introduction ............................................................................................................................................. 4 1.1 About this document ...................................................................................................................... 4 1.2 List of revisions............................................................................................................................... 4 1.3 Terms, abbreviations and definitions ............................................................................................. 4 1.4 References to documents .............................................................................................................. 4 1.5 Technical information ..................................................................................................................... 5 1.6 Limitations ...................................................................................................................................... 5 2 Overview about Waf ............................................................................................................................... 6 2.1 Build system structure .................................................................................................................... 6 2.2 Build Process ................................................................................................................................. 7 2.3 Environment objects ....................................................................................................................... 7 2.4 Build definition and organization .................................................................................................... 9 2.5 File system representation ........................................................................................................... 10 3 Usage ..................................................................................................................................................... 11 3.1 Running Waf................................................................................................................................. 11 3.2 Preparing a project for Waf .......................................................................................................... 14 3.3 General wscript rules ................................................................................................................... 17 3.4 Selecting / enabling toolchains..................................................................................................... 17 3.5 Compiling a static library .............................................................................................................. 18 3.6 Link a firmware/executable file ..................................................................................................... 20 3.7 Declaring pre-compiled components ........................................................................................... 21 3.8 Generate a firmware .................................................................................................................... 22 3.8.1 Bootable firmware images for netX10/ netX50/ netX51/ netX52/ netX100/ netX500 ....................... 22 3.8.2 Loadable firmware (nxf) for netX10/ netX50/ netX51/ netX52/ netX100/ netX500 ........................... 23 3.8.3 Loadable module (nxo) for netX100/netX500 .................................................................................. 24 3.8.4 HBoot firmware images for netX90/ netX4000 ................................................................................ 25 3.9 Generate a distribution ................................................................................................................. 26 3.9.1 Make a pre-compiled library distribution .......................................................................................... 26 3.9.2 Make a firmware file distribution ...................................................................................................... 27 3.9.3 Add arbitrary files to distribution ...................................................................................................... 28 3.10 Preparing a version header file .................................................................................................... 28 4 Supported toolchains .......................................................................................................................... 29 4.1 GCC-based toolchains ................................................................................................................. 29 4.1.1 Common definitions and parameters ............................................................................................... 29 4.1.1.1 C / C++ Source files ....................................................................................................... 29 4.1.1.2 Assembler source files.................................................................................................... 30 4.1.2 Hitex toolchain ................................................................................................................................. 31 4.1.3 CodeSourcery toolchain .................................................................................................................. 33 4.1.4 GNU ARM Embedded toolchain ...................................................................................................... 35 4.2 LLVM/Clang-based toolchains ..................................................................................................... 38 4.2.1 Hilscher xPIC toolchain ................................................................................................................... 38 5 Command reference ............................................................................................................................. 39 5.1 Common definitions ..................................................................................................................... 39 5.1.1 bld.<cmd> - build commands .......................................................................................................... 39 5.1.2 bld.get_name_prefix – compute task generator name prefix ........................................................... 45 5.2 Build & project structuring ............................................................................................................ 46 5.2.1 <conf|bld>.path.ant_glob - make list of files using pattern search ................................................... 46 5.2.2 <opt|conf|bld>.autorecurse - recursively process subdirectories ..................................................... 47 5.2.3 <opt|conf|bld>.load - load waf extension modules ........................................................................... 48 5.2.4 <opt|conf|bld>.recurse - load wscript file from subdirectory ............................................................. 49 5.3 Declarations ................................................................................................................................. 50 5.3.1 bld.externalcomponent - declare pre-compiled library ..................................................................... 50 5.3.2 bld.sdkcomponent - declare a SDK ................................................................................................. 51 5.4 Compilation and linking ................................................................................................................ 52 5.4.1 bld.program - link an application / executable ................................................................................. 52 5.4.2 bld.stlib - build a static library .......................................................................................................... 53 5.5 Firmware generation .................................................................................................................... 54 5.5.1 bld.bootimage - generate a netX bootimage .................................................................................... 54 5.5.2 bld.firmware - generate a loadable firmware ................................................................................... 55 Hilscher Waf Build System | Building libraries, applications and netX firmware DOC170404OI02EN | Revision 2 | English | 2018-01 | Released | Public © Hilscher, 2017‑2018 Introduction 3/60 5.5.3 bld.module - generate a loadable module ....................................................................................... 56 5.5.4 bld.generate_hboot_image - generate a hboot image ..................................................................... 57 5.5.5 bld.generate_netx90_intflash2_image - generate a netx90 application image ................................ 58 5.6 Distribution ................................................................................................................................... 59 5.6.1 bld.install_as - copy file to distribution with renaming ...................................................................... 59 5.6.2 bld.install_files - copy multiple files to distribution ..........................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages60 Page
-
File Size-