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