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 27 28 29 30 31 32 33 34 35 36
37
38 import xdc.bld.ITarget2;
39
40 /*!
41 * ======== M33F.xdc ========
42 * Embedded Cortex M33F, little endian, bare metal target
43 *
44 * This module defines an embedded bare metal target on Cortex M33F. The target
45 * generates code compatible with the "v8M" architecture.
46 *
47 */
48 metaonly module M33F inherits IM {
49 override readonly config string name = "M33F";
50 override readonly config string suffix = "m33fg";
51 override readonly config string isa = "v8M";
52 override readonly config string rts = "gnu.targets.arm.rtsv8M";
53 override config string platform = "ti.platforms.cortexM:FVP_MPS2";
54
55 override readonly config ITarget2.Command cc = {
56 cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -MD -MF $@.dep",
57 opts: "-march=armv8-m.main -mtune=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mabi=aapcs -g"
58 };
59
60 readonly config ITarget2.Command ccBin = {
61 cmd: "bin/arm-none-eabi-gcc -c -MD -MF $@.dep",
62 opts: "-march=armv8-m.main -mtune=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mabi=aapcs -g"
63 };
64
65 override config ITarget2.Options ccOpts = {
66 prefix: "-Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections ",
67 suffix: "-Dfar= "
68 };
69
70 /*!
71 * ======== ccConfigOpts ========
72 * User configurable compiler options for the generated config C file.
73 */
74 override config ITarget2.Options ccConfigOpts = {
75 prefix: "$(ccOpts.prefix)",
76 suffix: "$(ccOpts.suffix)"
77 };
78
79 override config String includeOpts = "-I$(rootDir)/$(GCCTARG)/include/newlib-nano -I$(rootDir)/$(GCCTARG)/include";
80
81 override readonly config ITarget2.Command asm = {
82 cmd: "$(rootDir)/bin/$(GCCTARG)-gcc -c -x assembler-with-cpp",
83 opts: "-Wa,-march=armv8-m.main -Wa,-mthumb -Wa,-mfloat-abi=hard -Wa,-mfpu=fpv5-sp-d16 "
84 };
85
86 readonly config ITarget2.Command asmBin = {
87 cmd: "bin/arm-none-eabi-gcc -c -x assembler-with-cpp",
88 opts: "-Wa,-march=armv8-m.main -Wa,-mthumb -Wa,-mfloat-abi=hard -Wa,-mfpu=fpv5-sp-d16 "
89 };
90
91 override config ITarget2.Options lnkOpts = {
92 prefix: "-march=armv8-m.main -mtune=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -nostartfiles -Wl,-static -Wl,--gc-sections ",
93 suffix: "-Wl,--start-group -lgcc -lc -lm -Wl,--end-group --specs=nano.specs -Wl,-Map=$(XDCCFGDIR)/$@.map"
94 };
95
96 /*!
97 * ======== bspLib ========
98 * bspLib is assigned the name of the BSP library. The specified library
99 * is included on the link line.
100 *
101 * Possible values for this field are "nosys" and "rdimon" with the default
102 * being "nosys".
103 */
104 override config string bspLib = "nosys";
105 }
106 107 108 109
110