WIZnet Developer Forum

WIZ550S2E-master Firmware 수정 컴파일 문의입니다

안녕하세요~
WIZ550S2E 구매하고 LPC11E36FHN33/501E 펌웨어를 수정하려고 합니다.

github.com/Wiznet/WIZ550S2E 에서 설명된 대로 펌웨어를 다운 받고 컴파일러 LPCXpresso IDE [LPCXpresso_7.9.2_493]를 다운 받아
빌드하는 과정에 에러가 발생합니다.

LPCXpresso IDE 는 처음 사용해봐서 컴파일 설정은 기본으로 되어있는 상태입니다.

WIZ550S2E_App or WIZ550S2E_Boot.

에러 내용 1*********WIZ550S2E_App**************
17:20:37 **** Incremental Build of configuration Debug for project WIZ550S2E_App ****
make -r all
Building target: WIZ550S2E_App.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\wiznet_s2e_wiz550s2e_board\Release" -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\lpc_chip_11exx\Release" -Xlinker -Map=“WIZ550S2E_App.map” -Xlinker --gc-sections -Xlinker --allow-multiple-definition -mcpu=cortex-m0 -mthumb -T “WIZ550S2E.ld” -L …/linkscripts -o “WIZ550S2E_App.axf” ./src/netutil/netutil.o ./src/callback/dhcp_cb.o ./src/S2E/S2E.o ./src/PlatformHandler/eepromHandler.o ./src/PlatformHandler/sspHandler.o ./src/PlatformHandler/timerHandler.o ./src/PlatformHandler/uartHandler.o ./src/Internet/DNS/dns.o ./src/Internet/DHCP/dhcp.o ./src/Ethernet/W5500/w5500.o ./src/Ethernet/socket.o ./src/Ethernet/wizchip_conf.o ./src/Configuration/ConfigData.o ./src/Configuration/ConfigMessage.o ./src/ATcmd/library/sockutil.o ./src/ATcmd/library/util.o ./src/ATcmd/atcmd.o ./src/ATcmd/cmdrun.o ./src/aeabi_romdiv_patch.o ./src/cr_startup_lpc11exx.o ./src/crp.o ./src/main.o ./src/sysinit.o -lwiznet_s2e_wiz550s2e_board -llpc_chip_11exx
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: cannot find -lwiznet_s2e_wiz550s2e_board
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: cannot find -llpc_chip_11exx
collect2.exe: error: ld returned 1 exit status
make: *** [WIZ550S2E_App.axf] Error 1

17:20:37 Build Finished (took 240ms)


에러 내용 1*********WIZ550S2E_Boot**************
18:18:23 **** Build of configuration Debug for project WIZ550S2E_Boot ****
make -r all
Building target: WIZ550S2E_Boot.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\wiznet_s2e_wiz550s2e_board\Debug" -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\lpc_chip_11exx\Debug" -Xlinker -Map=“WIZ550S2E_Boot.map” -Xlinker --gc-sections -Xlinker --allow-multiple-definition -mcpu=cortex-m0 -mthumb -T “Bootloader.ld” -L …/linkscripts -o “WIZ550S2E_Boot.axf” ./src/netutil/netutil.o ./src/PlatformHandler/eepromHandler.o ./src/PlatformHandler/flashHandler.o ./src/PlatformHandler/sspHandler.o ./src/PlatformHandler/timerHandler.o ./src/PlatformHandler/uartHandler.o ./src/Internet/TFTP/tftp.o ./src/Ethernet/W5500/w5500.o ./src/Ethernet/socket.o ./src/Ethernet/wizchip_conf.o ./src/Configuration/ConfigData.o ./src/Configuration/ConfigMessage.o ./src/aeabi_romdiv_patch.o ./src/cr_startup_lpc11exx.o ./src/crp.o ./src/main.o ./src/sysinit.o -lwiznet_s2e_wiz550s2e_board -llpc_chip_11exx
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: WIZ550S2E_Boot.axf section .text' will not fit in regionMFlash96’
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: region `MFlash96’ overflowed by 14904 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [WIZ550S2E_Boot.axf] Error 1

18:18:24 Build Finished (took 294ms)


왜 일까요?

또한가지 궁금한 것은 핵사파일이 어느 폴더에 담기는지 궁금합니다.

감사합니다.

안녕하세요~

올려주신 로그 보니깐 Build All을 하신거 같은데요.

https://github.com/Wiznet/WIZ550S2E 을 참고 하셔서 프로젝트별로 컴파일 순서를 지켜 주세요.

그리고 .hex 실행 파일은 해당 프로젝트의 Release폴더에 있습니다.

안녕하세요~
답변 감사합니다.

빌드 순서는 그림에서처럼 lpc_chip_11exx : Build Project -> wiznet_s2e_wiz550s2e_board : Build Project ->
WIZ550S2E_App : Build Project or WIZ550S2E_Boot : Build Project 순서로 하였습니다.

경로문제일까요?

05:16:01 **** Incremental Build of configuration Debug for project WIZ550S2E_App ****
make -r all
Building target: WIZ550S2E_App.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\wiznet_s2e_wiz550s2e_board\Release" -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\lpc_chip_11exx\Release" -Xlinker -Map=“WIZ550S2E_App.map” -Xlinker --gc-sections -Xlinker --allow-multiple-definition -mcpu=cortex-m0 -mthumb -T “WIZ550S2E.ld” -L …/linkscripts -o “WIZ550S2E_App.axf” ./src/netutil/netutil.o ./src/callback/dhcp_cb.o ./src/S2E/S2E.o ./src/PlatformHandler/eepromHandler.o ./src/PlatformHandler/sspHandler.o ./src/PlatformHandler/timerHandler.o ./src/PlatformHandler/uartHandler.o ./src/Internet/DNS/dns.o ./src/Internet/DHCP/dhcp.o ./src/Ethernet/W5500/w5500.o ./src/Ethernet/socket.o ./src/Ethernet/wizchip_conf.o ./src/Configuration/ConfigData.o ./src/Configuration/ConfigMessage.o ./src/ATcmd/library/sockutil.o ./src/ATcmd/library/util.o ./src/ATcmd/atcmd.o ./src/ATcmd/cmdrun.o ./src/aeabi_romdiv_patch.o ./src/cr_startup_lpc11exx.o ./src/crp.o ./src/main.o ./src/sysinit.o -lwiznet_s2e_wiz550s2e_board -llpc_chip_11exx
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: cannot find -lwiznet_s2e_wiz550s2e_board
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: cannot find -llpc_chip_11exx
collect2.exe: error: ld returned 1 exit status
make: *** [WIZ550S2E_App.axf] Error 1

05:16:01 Build Finished (took 236ms)

05:21:15 **** Incremental Build of configuration Debug for project WIZ550S2E_Boot ****
make -r all
Building file: …/src/PlatformHandler/eepromHandler.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DNDEBUG -D__CODE_RED -DCORE_M0 -D__USE_ROMDIVIDE -D__USE_LPCOPEN -D__LPC11EXX__ -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\WIZ550S2E_Boot\src" -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\WIZ550S2E_Boot\src\netutil" -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\WIZ550S2E_Boot\src\Configuration" -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\WIZ550S2E_Boot\src\Ethernet" -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\WIZ550S2E_Boot\src\Internet" -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\WIZ550S2E_Boot\src\PlatformHandler" -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\wiznet_s2e_wiz550s2e_board\inc" -I"D:\WIZnet\Workspace_LPCXpresso_7.5.0_254\lpc_chip_11exx\inc" -Os -g -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -specs=redlib.specs -MMD -MP -MF"src/PlatformHandler/eepromHandler.d" -MT"src/PlatformHandler/eepromHandler.o" -MT"src/PlatformHandler/eepromHandler.d" -o “src/PlatformHandler/eepromHandler.o” “…/src/PlatformHandler/eepromHandler.c”
…/src/PlatformHandler/eepromHandler.c:9:19: fatal error: board.h: No such file or directory
#include “board.h”
^
compilation terminated.
make: *** [src/PlatformHandler/eepromHandler.o] Error 1

05:21:16 Build Finished (took 186ms)

감사합니다.^^

여러번 시도 끝에

Library Paths 가 릴리즈로 되어있던 것을 Debug로 바꾸니까 WIZ550S2E_APP 는 .HEX 와 .BIN 파일이 생성되었습니다.

그런데 WIZ550S2E_Boot 는

Building target: libWIZ550S2E_Boot.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\wiznet_s2e_wiz550s2e_board\Debug" -L"C:\Users\USER\Documents\LPCXpresso_7.9.2_493\workspace\lpc_chip_11exx\Debug" -Xlinker -Map=“libWIZ550S2E_Boot.map” -Xlinker --gc-sections -Xlinker --allow-multiple-definition -shared -mcpu=cortex-m0 -mthumb -T “Bootloader.ld” -L …/linkscripts -o “libWIZ550S2E_Boot.axf” ./src/netutil/netutil.o ./src/PlatformHandler/eepromHandler.o ./src/PlatformHandler/flashHandler.o ./src/PlatformHandler/sspHandler.o ./src/PlatformHandler/timerHandler.o ./src/PlatformHandler/uartHandler.o ./src/Internet/TFTP/tftp.o ./src/Ethernet/W5500/w5500.o ./src/Ethernet/socket.o ./src/Ethernet/wizchip_conf.o ./src/Configuration/ConfigData.o ./src/Configuration/ConfigMessage.o ./src/aeabi_romdiv_patch.o ./src/cr_startup_lpc11exx.o ./src/crp.o ./src/main.o ./src/sysinit.o -lwiznet_s2e_wiz550s2e_board -llpc_chip_11exx
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: libWIZ550S2E_Boot.axf section .text' will not fit in regionMFlash96’
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: region `MFlash96’ overflowed by 39200 bytes
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: error: required section ‘.rel.plt’ not found in the linker script
c:/nxp/lpcxpresso_7.9.2_493/lpcxpresso/tools/bin/…/lib/gcc/arm-none-eabi/4.9.3/…/…/…/…/arm-none-eabi/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
make: *** [libWIZ550S2E_Boot.axf] Error 1

08:23:06 Build Finished (took 235ms)

위 처럼 새로운 에러가 발생합니다.

또한가지 질문은 WIZ550S2E_APP 와 WIZ550S2E_Boot 의 용도입니다.
둘중 하나만 MCU에 구우면 되는 건가요?

안녕하세요.

WIZ550S2E모듈 MCU의 제한된 용량에 맞추기 위해

Github에 공개된 WIZ550S2E 프로젝트는 Release 모드에서 컴파일 하도록 설정 되어있습니다.(Debug 모드에선 실행파일 사이즈가 커짐)

굳이 Debug모드로 컴파일 하신다면, App의 경우 문제가 없지만, Boot의 경우 컴파일 에러가 납니다. :frowning:

그리고,

App, Boot의 용도를 간단하게 설명 드리자면,

Boot은 모듈의 초기화 및 H/W Trig 여부, App 로딩 여부에 따라 App으로 점프, Confiruration Tool Process를 할건지 등을 수행 하며,

App은 WIZ550S2E의 본연의 기능(Serial to Ethernet)을 수행 합니다.

사용자는 자신의 시스템에 맞게 App만 수정하여 적용시켜 사용하시면 될 듯 합니다. :smiley:

마지막으로 계속 컴파일 에러가 나시는데; [color=#BFFFBF]추후 가이드를 만들어 첨부 하도록 할게요.[/color] 아래 문서를 참고해 주세요.

WIZ550S2E_Github_LPCXpresso_Guide.pdf (296 KB)

도움 감사합니다.^^

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.