共2条
1/1 1 跳转至页
问
都是选择哪种编译器? 用realview,keil的cARM 还是 gnu ? 本来很想用CARM,结果不支持 double,哎!
答 1:
还好有long long
答 2:
float 呢?
答 3:
我觉得奇怪,帮助文档里面明明写了支持double,但我试了试,好象double跟float一样??难道哪里有参数可以设置么???
The CARM C Compiler offers a number of basic data types to use in your C programs. The following table lists these data types along with their size requirements and value ranges.
Note
Other data types, like structures and unions, may contain scalars from this table.
Copyright (c) Keil Software, Inc. and Keil Elektronik GmbH. All rights reserved. 答 4: 选realview比较好! 答 5: float 和 double 差很多啊float 24bit + 8bit = 32bit
double 48bit + 16bit = 64bit 答 6: 圈圈帮我找找,怎么才能让CARM支持double好像要一个caldp.LIB 现在的是calfp.LIB 答 7: 在keil web上找到这个,呜呜!CARM: CALDP.LIB NOT FOUND
--------------------------------------------------------------------------------
Information in this support solution applies to:
CARM All Versions
--------------------------------------------------------------------------------
QUESTION
My project is using double-precision floating arithmetic. When linking my program, the linker does not find CALDP.LIB. This library CANnot be found in \LIB folder. CAN you please provide it?
ANSWER
The CARM compiler toolchain does not support the double-precision (64-bit) floating point data type.
SOLUTION
In MDK-ARM, double-precision floating point support is provided by using the RealView Compiler.
MORE INFORMATION
Refer to Selecting the Toolset in the µVision User's Guide.
答 8: 晕菜了……既然CARM中没有double,怎么跟帮助里不一样呢。看来只好用realView了。 答 9: 晕菜~~~早该用realView了~~~看你再美~~~ 答 10: 晕~~~~~~hotpower大叔这会在旁边幸灾乐祸了…………RealView好象没搞__at这一套? 答 11: RV就是没at,其他都不晕~~~ 答 12: 比较喜欢 __at 哈哈 答 13: Keil 的C就是不支持double我以前实验过,只支持float而已。要想可靠点还是选RV算了。
Data Storage Formats
The CARM C Compiler offers a number of basic data types to use in your C programs. The following table lists these data types along with their size requirements and value ranges.
signed char1 | 8 | 1 | 1 | -128 to +127 |
unsigned char | 8 | 1 | 1 | 0 to 255 |
signed short1 | 16 | 2 | 2 | -32768 to +32767 |
unsigned short | 16 | 2 | 2 | 0 to 65535 |
enum2 | 32 | 4 | 4 | -2147483648 to +2147483647 |
signed int1 | 32 | 4 | 4 | -2147483648 to +2147483647 |
unsigned int | 32 | 4 | 4 | 0 to 4294967295 |
signed long1 | 32 | 4 | 4 | -2147483648 to +2147483647 |
unsigned long | 32 | 4 | 4 | 0 to 4294967295 |
signed long long1 | 64 | 8 | 4 | -263 to +263-1 |
unsigned long long | 64 | 8 | 4 | 0 to 264-1 |
float | 32 | 4 | 4 | ±1.175494E-38 to ±3.402823E+38 |
double | 64 | 8 | 4 | ±1.7-308 to ±1.7E+308 |
pointer | 32 | 4 | 4 | 32-bit Address |
Note
- Signed types are stored in two's complement.
- The enum type is stored using the shortest signed or unsigned integer type required to contain its value.
Other data types, like structures and unions, may contain scalars from this table.
Copyright (c) Keil Software, Inc. and Keil Elektronik GmbH. All rights reserved. 答 4: 选realview比较好! 答 5: float 和 double 差很多啊float 24bit + 8bit = 32bit
double 48bit + 16bit = 64bit 答 6: 圈圈帮我找找,怎么才能让CARM支持double好像要一个caldp.LIB 现在的是calfp.LIB 答 7: 在keil web上找到这个,呜呜!CARM: CALDP.LIB NOT FOUND
--------------------------------------------------------------------------------
Information in this support solution applies to:
CARM All Versions
--------------------------------------------------------------------------------
QUESTION
My project is using double-precision floating arithmetic. When linking my program, the linker does not find CALDP.LIB. This library CANnot be found in \LIB folder. CAN you please provide it?
ANSWER
The CARM compiler toolchain does not support the double-precision (64-bit) floating point data type.
SOLUTION
In MDK-ARM, double-precision floating point support is provided by using the RealView Compiler.
MORE INFORMATION
Refer to Selecting the Toolset in the µVision User's Guide.
答 8: 晕菜了……既然CARM中没有double,怎么跟帮助里不一样呢。看来只好用realView了。 答 9: 晕菜~~~早该用realView了~~~看你再美~~~ 答 10: 晕~~~~~~hotpower大叔这会在旁边幸灾乐祸了…………RealView好象没搞__at这一套? 答 11: RV就是没at,其他都不晕~~~ 答 12: 比较喜欢 __at 哈哈 答 13: Keil 的C就是不支持double我以前实验过,只支持float而已。要想可靠点还是选RV算了。
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
与电子爱好者谈读图四被打赏50分 | |
与电子爱好者谈读图二被打赏50分 | |
【FRDM-MCXN947评测】Core1适配运行FreeRtos被打赏50分 | |
【FRDM-MCXN947评测】双核调试被打赏50分 | |
【CPKCORRA8D1B评测】---移植CoreMark被打赏50分 | |
【CPKCORRA8D1B评测】---打开硬件定时器被打赏50分 | |
【FRDM-MCXA156评测】4、CAN loopback模式测试被打赏50分 | |
【CPKcorRA8D1评测】--搭建初始环境被打赏50分 | |
【FRDM-MCXA156评测】3、使用FlexIO模拟UART被打赏50分 | |
【FRDM-MCXA156评测】2、rt-thread MCXA156 BSP制作被打赏50分 |