The newest YAGARTO GNU ARM toolchain is with GCC-4.6,and the GCC-4.6 should support cortex-m4 using the option "-mcpu=cortex-m4"(refer to http://gcc.gnu.org/gcc-4.6/changes.html). But when I using the option "-mcpu=cortex-m4",it show Error: unknown cpu `cortex-m4' Error: unrecognized option -mcpu=cortex-m4 So why it can not support the option?
Hello ???
>So why it can not support the option?
This is correct, this version of YAGARTO is not build for Cortex-M4.
Regards,
mifi
Hello, perhaps the next version will support M4. Regards, mifi
Michael Fischer wrote: > Hello, > > perhaps the next version will support M4. > > Regards, > mifi Thanks for reply,It can support the cortex-m4 in the newest version. But I can't use floating point arithmetic in my C program. ======= main.o: In function `main': D:\cygwin\home\houxn\main\m3/main.c:6: undefined reference to `__aeabi_fmul' D:\cygwin\home\houxn\main\m3/main.c:6: undefined reference to `__aeabi_fmul' ====== I think it may lack soft-float library,but I don't know how to solve it. Moreover,I want to use FPU in cortex-m4,it can not generate FPU code like "VMUL.F32 s3,s1,s0"
Hello, >Thanks for reply,It can support the cortex-m4 in the newest version. >But I can't use floating point arithmetic in my C program. Soft floating point is working, take a look in the K40 example here: http://www.yagarto.de/download/yagarto/K40Test.zip >I think it may lack soft-float library,but I don't know how to solve it. >Moreover,I want to use FPU in cortex-m4,it can not generate FPU code >like "VMUL.F32 s3,s1,s0" Use the option "-mfloat-abi=hard". I think this should produce code for a FPU unit. Btw, which CPU you are using? Regards, mifi
Michael Fischer wrote: > Hello, > >>Thanks for reply,It can support the cortex-m4 in the newest version. >>But I can't use floating point arithmetic in my C program. > Soft floating point is working, take a look in the K40 > example here: > http://www.yagarto.de/download/yagarto/K40Test.zip > >>I think it may lack soft-float library,but I don't know how to solve it. >>Moreover,I want to use FPU in cortex-m4,it can not generate FPU code >>like "VMUL.F32 s3,s1,s0" > Use the option "-mfloat-abi=hard". I think this should produce > code for a FPU unit. Thanks a lot! I just make it successfully by using the option "-mfloat-abi=hard". My CPU is K60,a product of Freescale.32-bit ARM Cortex-M4 core with DSP support MPU. I thought that the free GNU tools would not support so new CPU but only Keil etc..But I was wrong. Another question is that if I use cortex-m3 (without DSP unit),how can I do if I want it generates soft-float code ? I just use "-mfloat-abi=soft",but it was wrong: ---- undefined reference to `__aeabi_fmul' undefined reference to `__aeabi_fmul' ---- How can I do ? Where can I find the support information such as use "-mfloat-abi=hard" or what files should I refer to ? Thanks!
cortex m4 wrote: > Where can I find the support information such as use "-mfloat-abi=hard" > or what files should I refer to ?
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 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | |
48 | |
49 | |
50 | |
51 | |
52 | |
53 | |
54 | |
55 | |
56 | |
57 | |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | |
64 | |
65 | |
66 | |
67 | |
68 | |
69 | |
70 | |
71 | |
72 | |
73 | |
74 | |
75 | |
76 | |
77 | |
78 | |
79 | |
80 | |
81 | |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | |
104 | |
105 | |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | |
112 | |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | |
125 | |
126 | |
127 | |
128 | |
129 | |
130 | |
131 | |
132 | |
133 | |
134 | |
135 | |
136 | |
137 | |
138 | |
139 | |
140 | |
141 | |
142 | |
143 | |
144 | |
145 | |
146 | |
>Another question is that if I use cortex-m3 (without DSP unit),how can I >do if I want it generates soft-float code ? >I just use "-mfloat-abi=soft",but it was wrong: >---- >undefined reference to `__aeabi_fmul' >undefined reference to `__aeabi_fmul' >---- >How can I do ? Take a look here at my examples page: http://www.yagarto.de/examples/index.html Take one example, DO NOT change the makefile, and add a multiplication. It will work, have make a fast test with the LPC1343.
Michael Fischer wrote: > Take a look here at my examples page: > http://www.yagarto.de/examples/index.html > > Take one example, DO NOT change the makefile, and > add a multiplication. It will work, have make a > fast test with the LPC1343. Thanks,I have solved my problem. When linking,I used "arm-none-eabi-ld" but the example above use "arm-none-eabi-gcc",and the latter is work. I have built my own toolchain in fedora refer to your build-scripts-20110429. Before that I have built "arm-elf-*" toolchain,but it have some problems(and I can't explain why). Now the "arm-none-eabi-*" toolchain works well,and I find it appears more efficient than windows version.But the windows version is more convenience,because I have to run VMware if I want to use linux version.
cortex m4 wrote: > Michael Fischer wrote: >> Hello, >> >>>Thanks for reply,It can support the cortex-m4 in the newest version. >>>But I can't use floating point arithmetic in my C program. >> Soft floating point is working, take a look in the K40 >> example here: >> http://www.yagarto.de/download/yagarto/K40Test.zip >> >>>I think it may lack soft-float library,but I don't know how to solve it. >>>Moreover,I want to use FPU in cortex-m4,it can not generate FPU code >>>like "VMUL.F32 s3,s1,s0" >> Use the option "-mfloat-abi=hard". I think this should produce >> code for a FPU unit. > > Thanks a lot! I just make it successfully by using the option > "-mfloat-abi=hard". > > My CPU is K60,a product of Freescale.32-bit ARM Cortex-M4 core with DSP > support MPU. Hi Has your K60 an FPU? I have got TWR-K60N512-KIT but it has no FPU. Ilija
Hello Ilija, I have only a K40 but if you compare the both picture from: K40: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K40 K60: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K60 It looks that the K60 had a floating point unit. Best regards, Michael
Hi Michael Michael Fischer wrote: > Hello Ilija, > > I have only a K40 but if you compare the both picture from: > > K40: > http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K40 > > K60: > http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K60 > > It looks that the K60 had a floating point unit. FPU is an option for K60, but I don't know if there are ones with FPU available yet. Mine is without. I have built (just-enough) GCC 4.6.0 only to discover that FPU is missing. Regards Ilija
Hello Ilija, what is the full product number of your device? Compared to the "Product Brief" of the K60 you will find the information in section "4.3 Part Numbers and Packaging". Here specially the "Key attribute". Do you have a K60D or K60F? Regards, Michael
Michael Fischer wrote: > Hello Ilija, > > what is the full product number of your device? > Compared to the "Product Brief" of the K60 you will > find the information in section "4.3 Part Numbers and > Packaging". Here specially the "Key attribute". > > Do you have a K60D or K60F? D and F are new markings introduced a week ago. Old markings (check older Product brief release if you have on) do not contain D/F designation. FYI present TWR modules have chip with designation K60N512VMD100 Ilija
Reply
Please log in before posting.