关于ARM裸机ADS中implicit cast of…
来源:互联网 发布:淘宝少女大便 编辑:程序博客网 时间:2024/05/21 19:23
ARM编程:ADS中有关const的错误报警ARM编程:ADS中有关const的错误报警implicitcast of pointer loses 'const' qualifier
现象:
用const定义const unsigned char str1[9600]={.....}
用函数suc(unsigned char *puts)调用str1字符串的时候
ADS会报错implicit cast of pointer loses 'const' qualifier
去掉数组的const就没有问题,为什么?
不想直接把数据存在ram内.
用const定义的数组用memcpy访问就没有问题
只是读取啊,不操作里面的数据
用函数suc(unsigned
ADS会报错implicit
去掉数组的const就没有问题,为什么?
不想直接把数据存在ram内.
用const定义的数组用memcpy访问就没有问题
只是读取啊,不操作里面的数据
解决方案:
- 应该是指针的定义问题
可能指针只能指向RAM区。所以定义指针时也要加上
const。如下
suc(constunsigned char *puts) - C51根本不存在这种问题
0 0
- 关于ARM裸机ADS中implicit cast of…
- RMAN-03014: implicit resync of r…
- Can not cast from List…
- 【转载】cannot be cast…
- 关于alter system switch lo…
- resource is out of sync with t…
- identifier of an …
- failure of the “Grid Installatio…
- Solution of Enable extension for…
- Filtering of Hierarchical Data i…
- Journal of Machine Learning Rese…
- ARM Linux (S3C6410架构…
- ARM Linux (S3C6410架构…
- ARM Linux (S3C6410架构…
- ARM Linux (S3C6410架构…
- ARM (三) arm中C/C++及汇编语言的…
- To add a multiplexed copy of the…
- ZOJ 1504(POJ 1244) Slots of Fun…
- boolan web ex 第四
- 电子工程师在珠江三角洲的求职功略
- S3C2440和S3C6410性能比较
- ARM7-LPC2132驱动LCM的接口说明
- PCB布线要点及布局
- 关于ARM裸机ADS中implicit cast of…
- 20170218 pm
- 健美猪,拱开了行业最大黑洞
- 《linux设备驱动开发详解》第二版
- 无厘头对联
- (转载)明星QQ,可以进空间
- 16个经典面试问题回答思路
- LPC21xx系列 外部中断寄存器EXTINT…
- ajax xml返回