AN3350 Application Note
Total Page:16
File Type:pdf, Size:1020Kb
AN3350 Application note eTPU compiler tools Introduction This application note explains how to use eTPU build tools to build programs. The eTPU build tools translate source code into object code and then organize that object code to create a program that is ready to execute. The eTPU build tools run on the host system to generate software that runs on target systems (such as SPC563Mxx and SPC564Axx devices) which feature the eTPU peripheral. The host and target can be the same system, but usually the two are separate. September 2013 Doc ID 018512 Rev 2 1/185 www.st.com Contents AN3350 Contents 1 Overview . 16 1.1 Compiler architecture . 16 1.2 Linker architecture . 17 2 Using build tools . 19 2.1 Configuring command-line tools . 19 2.1.1 Setting environment variables . 19 2.1.2 Setting the PATH environment variable . 20 2.2 Invoking command-line tools . 20 2.3 Getting help . 20 2.3.1 Parameter formats . 21 2.3.2 Option formats . 21 2.3.3 Common terms . 21 2.4 File name extensions . 22 3 Command-line options for standard C conformance . 23 3.1 -ansi . 23 3.2 -stdkeywords . 23 3.3 -strict . 23 4 Command-line options for language translation . 25 4.1 -char . 25 4.2 -defaults . 25 4.3 -encoding . 25 4.4 -flag . 26 4.5 -gccext . 27 4.6 -gcc_extensions . 27 4.7 -M . 27 4.8 -make . 27 4.9 -mapcr . 28 4.10 -MM . 28 4.11 -MD . 28 2/185 Doc ID 018512 Rev 2 AN3350 Contents 4.12 -MMD . 28 4.13 -msext . 29 4.14 -once . 29 4.15 -pragma . 29 4.16 -relax_pointers . 30 4.17 -requireprotos . 30 4.18 -search . 30 4.19 -trigraphs . 30 5 Command-line options for diagnostic messages . 31 5.1 -disassemble . 31 5.2 -help . 31 5.3 -maxerrors . 32 5.4 -maxwarnings . 32 5.5 -msgstyle . 32 5.6 -nofail . 33 5.7 -progress . 33 5.8 -S . 33 5.9 -stderr . 33 5.10 -verbose . 34 5.11 -version . 34 5.12 -timing . 34 5.13 -warnings . 34 5.14 -wraplines . 39 6 Command-line options for preprocessing . 40 6.1 -convertpaths . 40 6.2 -cwd . 40 6.3 -D+ . 41 6.4 -define . 41 6.5 -E . 41 6.6 -EP . 41 6.7 -gccincludes . 42 6.8 -I- . 42 Doc ID 018512 Rev 2 3/185 Contents AN3350 6.9 -I+ . 43 6.10 -include . 43 6.11 -ir . 43 6.12 -P . 43 6.13 -precompile . 44 6.14 -preprocess . 44 6.15 -ppopt . 44 6.16 -prefix . 45 6.17 -noprecompile . ..