Command line tools

« Introduction | Command line tools | C3 »

Command line tools

This section describes the usage of some commandline tools installed with ppci.

ppci-build.py

This command can be used to construct build files (see Build system).

Take for example the stm32f4 led project build file:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<project name="Examples" default="all">
    <import name="ppci.buildtasks" />

    <target name="all" depends="burn2">
    </target>

    <property name="src" value="src" />
    <property name="arch" value="arm"/>

    <target name="burn2">
        <assemble source="startup_stm32f4.asm" target="thumb" 
            output="startup.o" />
        <compile target="thumb"
            sources="burn2.c3;arch.c3;../io.c3"
            includes="stm32f4xx.c3"
            output="burn2.o" />
        <link output="burn2.elf" layout="stm32f4.mmap"
            target="thumb"
            objects="startup.o;burn2.o" />
        <objcopy objectfile="burn2.elf"
            imagename="flash"
            format="hex"
            output="burn2.hex" />
    </target>

</project>

To build this project, run ppci-build.py in the same directory:

$ cd test/data/stm32f4xx
$ ppci-build.py

Or specify the buildfile:

$ ppci-build.py -f test/data/stm32f4xx/build.xml

ppci-c3c.py

Instead of relying on a build system, the C3 compiler can also be activated stand alone.

$ ppci-c3c.py --target arm examples/snake/game.c3

ppci-asm.py

Invoke the assembler.

ppci-hexutil.py

Utility to handle hex files.