LPC804 Build Failed when enable link-time optimization

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC804 Build Failed when enable link-time optimization

1,561 次查看
wangjn-maxeye
Contributor I

The build log:

Building target: application.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"H:\gerrit\WLC_LPC804\v11\Maxeye\source" -Xlinker -Map="application.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m0 -mthumb -T "App_USI141_Debug.ld" -o "application.axf" ./src/WlcDeviceApp.o ./src/WlcDeviceApp_Mcu.o  ./WlcDeviceLibrary/wlc_device/wlc_appproc.o ./WlcDeviceLibrary/wlc_device/wlc_chgproc.o ./WlcDeviceLibrary/wlc_device/wlc_crn120.o ./WlcDeviceLibrary/wlc_device/wlc_crn120cfg.o ./WlcDeviceLibrary/wlc_device/wlc_device.o ./WlcDeviceLibrary/wlc_device/wlc_ndef.o ./WlcDeviceLibrary/wlc_device/wlc_optional.o ./WlcDeviceLibrary/wlc_device/wlc_utility.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca9430-charger.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca9431-vout.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca943x-adc.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca943x-otp.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca943x-rect.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca943x-rxir.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca943x-vpwr.o ./WlcDeviceLibrary/wlc_charge_rx/PCA943x/pca943x.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_adc_pca.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_charger_pca.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_pca.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_rxir_pca.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_vout_pca.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_vpwr_pca.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_vrect_pca.o ./WlcDeviceLibrary/wlc_charge_rx/wlc_chg_rx_vtune_pca.o ./WlcDeviceLibrary/CRN120_1.0.0/HAL_CRN120/CRN120_driver.o ./SDK_2.7.0_LPC804/devices/LPC804/mcuxpresso/startup_lpc804.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_acomp.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_adc.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_capt.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_clock.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_common.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_crc.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_ctimer.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_dac.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_gpio.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_i2c.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_iap.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_mrt.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_pint.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_plu.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_power.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_reset.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_spi.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_swm.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_syscon.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_usart.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_wkt.o ./SDK_2.7.0_LPC804/devices/LPC804/drivers/fsl_wwdt.o ./SDK_2.7.0_LPC804/devices/LPC804/system_LPC804.o ./OSAL/src/LPC804SDK/phOsal_GPIO_LPC804.o ./OSAL/src/LPC804SDK/phOsal_I2C_LPC804.o ./OSAL/src/LPC804SDK/phOsal_IRQ_LPC804.o ./OSAL/src/phOsal_DbgPrintf.o ./OSAL/src/phOsal_Mutex.o ./OSAL/src/phOsal_Timer.o ./Maxeye/source/app_debug.o  
C:\Users\MAXEYE\AppData\Local\Temp\cceiCvFj.s: Assembler messages:
C:\Users\MAXEYE\AppData\Local\Temp\cceiCvFj.s:7286: Error: invalid offset, value too big (0x000017E8)
lto-wrapper.exe: fatal error: arm-none-eabi-gcc returned 1 exit status
compilation terminated.
c:/nxp/mcuxpressoide_11.3.1_5262/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.3.0.202008311133/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:53: application.axf] Error 1
"make -r -j6 all" terminated with exit code 2. Build might be incomplete.

标记 (2)
0 项奖励
回复
2 回复数

1,546 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Wang,

I do not suggest you check the "Link-time Optimization". This is the description for the " Link-time Optimization option" in MCUXpresso tools help.

 

7.5 Support for testing link-time optimizations

Tests for link-time optimizations usually require multiple source files that are compiled separately, perhaps with different sets of options. There are several special-purpose test directives used for these tests.

{ dg-lto-do do-what-keyword }

do-what-keyword specifies how the test is compiled and whether it is executed. It is one of:

assemble

Compile with -c to produce a relocatable object file.

link

Compile, assemble, and link to produce an executable file.

run

Produce and run an executable file, which is expected to return an exit code of 0.

The default is assemble. That can be overridden for a set of tests by redefining dg-do-what-default within the .exp file for those tests.

Unlike dg-do, dg-lto-do does not support an optional ‘target’ or ‘xfail’ list. Use dg-skip-if, dg-xfail-if, or dg-xfail-run-if.

{ dg-lto-options { { options } [{ options }] } [{ target selector }]}

This directive provides a list of one or more sets of compiler options to override LTO_OPTIONS. Each test will be compiled and run with each of these sets of options.

{ dg-extra-ld-options options [{ target selector }]}

This directive adds options to the linker options used.

{ dg-suppress-ld-options options [{ target selector }]}

This directive removes options from the set of linker options used.

xiangjun_rong_0-1641367647127.png

 

BR

XiangJun Rong

0 项奖励
回复

1,543 次查看
wangjn-maxeye
Contributor I

understood, thank you

0 项奖励
回复