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