1 2 3 4
5
6 7 8 9 10 11 12 13 14 15
16 import xdc.bld.ITarget2;
17
18 /*!
19 * ======== M3.xdc ========
20 * Embedded little endian Cortex M3 bare metal target
21 *
22 * This module defines an embedded bare metal target on Cortex M3. The target
23 * generates code compatible with the "v7M" architecture.
24 *
25 */
26 metaonly module M3 inherits IM {
27 override readonly config string name = "M3";
28 override readonly config string suffix = "m3g";
29 override readonly config string isa = "v7M";
30
31 override config string platform = "ti.platforms.tiva:TM4C1294NCPDT";
32
33 override readonly config ITarget2.Command cc = {
34 cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -MD -MF $@.dep",
35 opts: "-mcpu=cortex-m3 -mthumb -mabi=aapcs -g"
36 };
37
38 readonly config ITarget2.Command ccBin = {
39 cmd: "bin/arm-none-eabi-gcc -c -MD -MF $@.dep",
40 opts: "-mcpu=cortex-m3 -mthumb -mabi=aapcs -g"
41 };
42
43 override readonly config ITarget2.Command asm = {
44 cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -x assembler-with-cpp",
45 opts: "-Wa,-mcpu=cortex-m3 -Wa,-mthumb"
46 };
47
48 readonly config ITarget2.Command asmBin = {
49 cmd: "bin/arm-none-eabi-gcc -c -x assembler-with-cpp",
50 opts: "-Wa,-mcpu=cortex-m3 -Wa,-mthumb"
51 };
52
53 override config ITarget2.Options lnkOpts = {
54 prefix: "-mthumb -march=armv7-m -nostartfiles -Wl,-static -Wl,--gc-sections",
55 suffix: "-L$(packageBase)/libs/install-native/$(GCCTARG)/lib/thumb/v7-m -Wl,--start-group -lgcc -lc -lm -Wl,--end-group --specs=nano.specs -Wl,-Map=$(XDCCFGDIR)/$@.map"
56 };
57
58 /*!
59 * ======== includeOpts ========
60 * Additional user configurable target-specific include path options
61 *
62 * This target uses newlib-nano run-time.
63 */
64 override config string includeOpts = "-I$(packageBase)/libs/install-native/$(GCCTARG)/include/newlib-nano -I$(packageBase)/libs/install-native/$(GCCTARG)/include";
65 }
66 67 68 69
70