在线时间82 小时
UID1904670
注册时间2014-9-19
NXP金币0
该用户从未签到
金牌会员
 
- 积分
- 1203
- 最后登录
- 2018-6-27
|
所用例程如下
编译例程,出现七个错误,如下:
这里是因为所选芯片的内存不能满足程序需求,编译器才会报错。
当你设备芯片换了,比方由MKL26Z128xxx4改为MKL26Z256xxx4编译就没错了
这里就可见YL的不严谨了,直接将其他型号的板子例程弄过来,连编译都没编译就直接放到光盘里了,不然这么明显的问题也不会没看见了。
其实光盘里还有个问题,不知大家又没注意,光盘里原理图MCU写的是KL25P80M48SF0RM而我们实际芯片型号是MKL26Z128VLH4。这要么是原理图绘制时型号没改,要么这原理图可能都有问题,不是针对这板子的,唉这工作的严谨度!
既然我们板子是MKL26Z128xxx4,那我们就只能改程序了。
按照以前用fat文件系统的经验,应该是由于ff.h中的两个大数组太占空间,移到其他存储设备中就行了。
可惜仔细看程序,还真不是。例程中并没有关于那个用于查找文件名的简体中文的.H文件。
那为啥会如此占空间呢?
由编译产生的map可见
- Removing Unused input sections from the image.
- Removing system_mkl25z4.o(.rev16_text), (4 bytes).
- Removing system_mkl25z4.o(.revsh_text), (4 bytes).
- Removing arm_cm0.o(.rev16_text), (4 bytes).
- Removing arm_cm0.o(.revsh_text), (4 bytes).
- Removing arm_cm0.o(.text), (44 bytes).
- Removing startup_mkl25z4.o(HEAP), (0 bytes).
- Removing main.o(.rev16_text), (4 bytes).
- Removing main.o(.revsh_text), (4 bytes).
- Removing mkl_spi.o(.rev16_text), (4 bytes).
- Removing mkl_spi.o(.revsh_text), (4 bytes).
- Removing mkl_gpio.o(.rev16_text), (4 bytes).
- Removing mkl_gpio.o(.revsh_text), (4 bytes).
- Removing mkl_uart.o(.rev16_text), (4 bytes).
- Removing mkl_uart.o(.revsh_text), (4 bytes).
- Removing retarget_mdk.o(.rev16_text), (4 bytes).
- Removing retarget_mdk.o(.revsh_text), (4 bytes).
- Removing sd_drv.o(.rev16_text), (4 bytes).
- Removing sd_drv.o(.revsh_text), (4 bytes).
- Removing fat.o(.rev16_text), (4 bytes).
- Removing fat.o(.revsh_text), (4 bytes).
- Removing mkl_pit.o(.rev16_text), (4 bytes).
- Removing mkl_pit.o(.revsh_text), (4 bytes).
- Removing mkl_dac.o(.rev16_text), (4 bytes).
- Removing mkl_dac.o(.revsh_text), (4 bytes).
- Removing audiodata.o(.constdata), (63102 bytes).
- Removing mkl_adc.o(.rev16_text), (4 bytes).
- Removing mkl_adc.o(.revsh_text), (4 bytes).
- Removing dadd.o(.text), (356 bytes).
- Removing dmul.o(.text), (208 bytes).
- Removing ddiv.o(.text), (240 bytes).
- Removing dfixul.o(.text), (64 bytes).
- Removing cdrcmple.o(.text), (40 bytes).
- Removing depilogue.o(.text), (190 bytes).
- Removing depilogue.o(i.__ARM_clz), (46 bytes).
复制代码 Removing audiodata.o(.constdata),是占用最多的。
果断的看看程序这个.c的文件
一共占了3946行的数组,难怪占空间啊。
果断的将数组移入spi flash,此处移入sd卡也行,
直接从外部调用,果断编译正常。终于好用了
|
|