查看: 700|回复: 0

【YL-KL26Z试用】解决sd例程错误问题

[复制链接]
  • TA的每日心情
    开心
    2017-7-4 13:51
  • 签到天数: 347 天

    连续签到: 1 天

    [LV.8]以坛为家I

    发表于 2015-8-25 08:50:11 | 显示全部楼层 |阅读模式
    分享到:
    所用例程如下

    编译例程,出现七个错误,如下:

    这里是因为所选芯片的内存不能满足程序需求,编译器才会报错。
    当你设备芯片换了,比方由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卡也行,
    直接从外部调用,果断编译正常。终于好用了
    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条

    手机版|小黑屋|与非网

    GMT+8, 2024-4-27 21:05 , Processed in 0.115973 second(s), 18 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.