查看: 3483|回复: 3

[已解决] LPC11U68 编译错误问题出在哪里?

[复制链接]
  • TA的每日心情
    开心
    2018-12-11 19:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]偶尔看看I

    3

    主题

    27

    帖子

    1

    注册会员

    Rank: 2

    积分
    190
    最后登录
    2019-1-25
    发表于 2018-11-29 11:02:00 | 显示全部楼层 |阅读模式


    我在学习论坛活动LPC11U68这块板子,用来点亮中景园0.96的OLED屏,到编译阶段出现如下错误,请教各位坛友这个怎么破?

    自学的入门新手,请大家赐教!

    10:23:31 **** Incremental Build of configuration Debug for project oled_four ****
    make -r -j4 all
    Building file: ../src/oled_four.c
    Invoking: MCU C Compiler
    arm-none-eabi-gcc -DDEBUG -D__CODE_RED -DCORE_M0PLUS -D__MTB_BUFFER_SIZE=256 -D__USE_ROMDIVIDE -D__USE_LPCOPEN -D__LPC11U6X__ -D__REDLIB__ -I"F:\Program\lpc_board_nxp_lpcxpresso_11u68\inc" -I"F:\Program\lpc_chip_11u6x\inc" -O0 -fno-common -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"src/oled_four.d" -MT"src/oled_four.o" -MT"src/oled_four.d" -o "src/oled_four.o" "../src/oled_four.c"
    Finished building: ../src/oled_four.c

    Building target: oled_four.axf
    Invoking: MCU Linker
    arm-none-eabi-gcc -nostdlib -L"F:\Program\lpc_board_nxp_lpcxpresso_11u68\Debug" -L"F:\Program\lpc_chip_11u6x\Debug" -Xlinker -Map="oled_four.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m0 -mthumb -T "oled_four_Debug.ld" -o "oled_four.axf"  ./src/aeabi_romdiv_patch.o ./src/cr_startup_lpc11u6x.o ./src/crp.o ./src/mtb.o ./src/oled.o ./src/oled_four.o ./src/sysinit.o   -llpc_board_nxp_lpcxpresso_11u68 -llpc_chip_11u6x
    Memory region         Used Size  Region Size  %age Used
           MFlash256:       18600 B       256 KB      7.10%
             Ram0_32:         332 B        32 KB      1.01%
              Ram1_2:          0 GB         2 KB      0.00%
    e:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libcr_c.a(fpprintf.o): In function `printf':
    fpprintf.c.text.printf+0x4c): undefined reference to `__Ciob'
    e:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libcr_c.a(_deferredlazyseek.o): In function `__flsbuf':
    _deferredlazyseek.c.text.__flsbuf+0x8c): undefined reference to `__sys_istty'
    e:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libcr_c.a(_writebuf.o): In function `_Cwritebuf':
    _writebuf.c.text._Cwritebuf+0x16): undefined reference to `__sys_flen'
           Ram2USB_2:          0 GB         2 KB      0.00%
    _writebuf.c.text._Cwritebuf+0x26): undefined reference to `__sys_seek'
    e:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libcr_c.a(alloc.o): In function `_Csys_alloc':
    alloc.c.text._Csys_alloc+0x12): undefined reference to `__sys_appexit'
    e:/nxp/mcuxpressoide_10.2.1_795/ide/tools/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v6-m\libcr_c.a(fseek.o): In function `fseek':
    fseek.c.text.fseek+0x1a): undefined reference to `__sys_istty'
    fseek.c.text.fseek+0x86): undefined reference to `__sys_flen'
    collect2.exe: error: ld returned 1 exit status
    make: *** [oled_four.axf] Error 1

    10:23:32 Build Finished (took 1s.186ms)



    我知道答案 目前已有3人回答
    做人,最重要的就是开心啦!
    回复

    使用道具 举报

  • TA的每日心情

    2021-2-4 09:24
  • 签到天数: 190 天

    连续签到: 1 天

    [LV.7]常住居民III

    38

    主题

    591

    帖子

    28

    金牌会员

    Rank: 6Rank: 6

    积分
    2205
    最后登录
    2025-2-22
    发表于 2018-11-29 11:25:11 | 显示全部楼层
    你还是截个图来吧
    哎...今天够累的,签到来了~
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-12-11 19:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]偶尔看看I

    3

    主题

    27

    帖子

    1

    注册会员

    Rank: 2

    积分
    190
    最后登录
    2019-1-25
     楼主| 发表于 2018-11-29 11:39:11 | 显示全部楼层
    mzy2364 发表于 2018-11-29 11:25
    你还是截个图来吧

    刚刚解决了编译的问题,因为使用了redlib库,所以在linker script选项里要选redlib(nohost)。改完编译就通过了。不过加载完程序以后,我的OLED屏幕还是没有点亮。这真是个悲伤的故事!!
    做人,最重要的就是开心啦!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-12-11 19:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]偶尔看看I

    3

    主题

    27

    帖子

    1

    注册会员

    Rank: 2

    积分
    190
    最后登录
    2019-1-25
     楼主| 发表于 2018-11-29 13:48:56 | 显示全部楼层
    因为使用了redlib库,所以需要在linker script选项里要选redlib(nohost)

    评分

    参与人数 1 +1 收起 理由
    NXP管管 + 1 结帖奖励

    查看全部评分

    做人,最重要的就是开心啦!
    回复 支持 反对

    使用道具 举报

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

    本版积分规则

    关闭

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

    Archiver|手机版|小黑屋|恩智浦技术社区

    GMT+8, 2025-7-19 23:18 , Processed in 0.103356 second(s), 25 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

    快速回复 返回顶部 返回列表