AnsweredAssumed Answered

build the example of ble_thread_router_wireless_uart by MCUXpresso  but there were some errors

Question asked by SJ YIN on Aug 3, 2018
Latest reply on Aug 7, 2018 by SJ YIN

the  example were i download from NXP ,but there were errors ,I asked once a few hours ago, but the NXP staff did not seem to answer my question. Has anyone seen this problem, thank you

Below is the console run record

 

 

 

21:03:11 **** Incremental Build of configuration Debug for project usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1 ****
make -r -j2 all
Building file: ../nwk_ip/base/utils/debug_log.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -std=gnu99 -D__REDLIB__ -DCPU_MKW41Z512CAT4_cm0plus -DCPU_MKW41Z512CAT4 -DDEBUG -DCPU_MKW41Z512VHT4 -DFSL_RTOS_FREE_RTOS -DUSB_KW41 -DFREEDOM -DSDK_DEBUGCONSOLE=1 -DCR_INTEGER_PRINTF -DPRINTF_FLOAT_ENABLE=0 -D__MCUXPRESSO -D__USE_CMSIS -I../board -I../source -I../ -I../framework/OSAbstraction/Interface -I../framework/common -I../freertos -I../ieee_802.15.4/mac/source/App -I../ieee_802.15.4/mac/interface -I../ieee_802.15.4/phy/interface -I../framework/GPIO -I../framework/Keyboard/Interface -I../framework/TimersManager/Interface -I../framework/TimersManager/Source -I../framework/LED/Interface -I../framework/SerialManager/Source/SPI_Adapter -I../framework/SerialManager/Source/UART_Adapter -I../framework/SerialManager/Source/I2C_Adapter -I../framework/Flash/Internal -I../framework/FSCI/Interface -I../framework/FSCI/Source -I../framework/SerialManager/Interface -I../framework/MemManager/Interface -I../framework/Lists -I../framework/Messaging/Interface -I../framework/LowPower/Interface/MKW41Z -I../framework/LowPower/Source/MKW41Z -I../framework/Shell/Interface -I../framework/NVM/Interface -I../framework/NVM/Source -I../framework/Panic/Interface -I../framework/RNG/Interface -I../framework/SecLib -I../framework/FunctionLib -I../framework/ModuleInfo -I../bluetooth/host/interface -I../source/common -I../bluetooth/host/config -I../bluetooth/controller/interface -I../bluetooth/hci_transport/interface -I../source/common/gatt_db/macros -I../source/common/gatt_db -I../bluetooth/profiles/battery -I../bluetooth/profiles/device_info -I../bluetooth/profiles/wireless_uart -I../framework/MWSCoexistence/Interface -I../nwk_ip/core/interface -I../nwk_ip/core/interface/modules -I../nwk_ip/core/interface/thread -I../nwk_ip/base/interface -I../nwk_ip/app/config -I../nwk_ip/app/common -I../drivers -I../CMSIS -I../utilities -I../framework/DCDC/Interface -I../framework/XCVR/MKW41Z4 -I../ieee_802.15.4/phy/source/MKW41Z -Os -fno-common -g -Wall -Wno-missing-braces -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -imacros "D:/MCUXpressio_IDE/workplace/usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1/source/config.h" -mcpu=cortex-m0plus -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"nwk_ip/base/utils/debug_log.d" -MT"nwk_ip/base/utils/debug_log.o" -MT"nwk_ip/base/utils/debug_log.d" -o "nwk_ip/base/utils/debug_log.o" "../nwk_ip/base/utils/debug_log.c"
Finished building: ../nwk_ip/base/utils/debug_log.c

Building target: usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1.axf
Invoking: MCU Linker
arm-none-eabi-gcc -L"D:\MCUXpressio_IDE\workplace\usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1\libs" -Xlinker -Map="usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -mcpu=cortex-m0plus -mthumb -T MKW41Z512xxx4_connectivity.ld -L ../source -o "usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1.axf" ./utilities/fsl_debug_console.o ./startup/startup_MKW41Z4.o ./source/common/gatt_db/gatt_database.o ./source/common/ble_conn_manager.o ./source/common/ble_controller_task.o ./source/common/ble_host_tasks.o ./source/common/ble_service_discovery.o ./source/ApplMain.o ./source/app.o ./source/app_config.o ./source/ble_init.o ./source/mtb.o ./source/semihost_hardfault.o ./source/thread_router_bluetooth_wireless_uart_hybrid_app.o ./nwk_ip/base/utils/debug_log.o ./nwk_ip/base/utils/mac_abs_802154.o ./nwk_ip/base/utils/mac_filtering.o ./nwk_ip/base/utils/nv_data.o ./nwk_ip/base/utils/nvm_adapter.o ./nwk_ip/base/thread_config/thread_config.o ./nwk_ip/base/thci/thci.o ./nwk_ip/base/stack_globals/arp_globals.o ./nwk_ip/base/stack_globals/coap_globals.o ./nwk_ip/base/stack_globals/dhcp_globals.o ./nwk_ip/base/stack_globals/dns_globals.o ./nwk_ip/base/stack_globals/dtls_globals.o ./nwk_ip/base/stack_globals/event_manager_globals.o ./nwk_ip/base/stack_globals/icmp_globals.o ./nwk_ip/base/stack_globals/ip_globals.o ./nwk_ip/base/stack_globals/mdns_globals.o ./nwk_ip/base/stack_globals/mle_globals.o ./nwk_ip/base/stack_globals/mpl_globals.o ./nwk_ip/base/stack_globals/nd_globals.o ./nwk_ip/base/stack_globals/sixlowpan_globals.o ./nwk_ip/base/stack_globals/sockets_globals.o ./nwk_ip/base/stack_globals/tcp_globals.o ./nwk_ip/base/stack_globals/thread_globals.o ./nwk_ip/base/stack_globals/trickle_globals.o ./nwk_ip/base/stack_globals/udp_globals.o ./nwk_ip/base/shell/shell_ip.o ./nwk_ip/base/ip_media_if/ip_if_6lo.o ./nwk_ip/base/ip_media_if/ip_if_enet.o ./nwk_ip/base/ip_media_if/ip_if_usbenet.o ./nwk_ip/app/common/app_coap_observe.o ./nwk_ip/app/common/app_echo_udp.o ./nwk_ip/app/common/app_event_monitoring.o ./nwk_ip/app/common/app_init.o ./nwk_ip/app/common/app_led.o ./nwk_ip/app/common/app_observe_demo.o ./nwk_ip/app/common/app_socket_utils.o ./nwk_ip/app/common/app_temp_sensor.o ./nwk_ip/app/common/app_thread_callbacks.o ./nwk_ip/app/common/app_thread_init.o ./ieee_802.15.4/phy/source/MKW41Z/ASP.o ./ieee_802.15.4/phy/source/MKW41Z/MPM.o ./ieee_802.15.4/phy/source/MKW41Z/PhyISR.o ./ieee_802.15.4/phy/source/MKW41Z/PhyPacketProcessor.o ./ieee_802.15.4/phy/source/MKW41Z/PhyPlmeData.o ./ieee_802.15.4/phy/source/MKW41Z/PhyStateMachine.o ./ieee_802.15.4/phy/source/MKW41Z/PhyTime.o ./ieee_802.15.4/mac/source/App/FsciAspCommands.o ./ieee_802.15.4/mac/source/App/FsciMacCommands.o ./ieee_802.15.4/mac/source/App/MacGlobals.o ./freertos/croutine.o ./freertos/event_groups.o ./freertos/fsl_tickless_lptmr.o ./freertos/fsl_tickless_systick.o ./freertos/heap_4.o ./freertos/list.o ./freertos/port.o ./freertos/queue.o ./freertos/tasks.o ./freertos/timers.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_ant_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_ble_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_common_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_gfsk_bt_0p3_h_0p5_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_gfsk_bt_0p5_h_0p32_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_gfsk_bt_0p5_h_0p5_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_gfsk_bt_0p5_h_0p7_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_gfsk_bt_0p5_h_1p0_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_gfsk_bt_0p7_h_0p5_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_mode_datarate_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_msk_config.o ./framework/XCVR/MKW41Z4/cfgs_kw4x_3x_2x/fsl_xcvr_zgbe_config.o ./framework/XCVR/MKW41Z4/dbg_ram_capture.o ./framework/XCVR/MKW41Z4/fsl_xcvr.o ./framework/XCVR/MKW41Z4/fsl_xcvr_trim.o ./framework/XCVR/MKW41Z4/ifr_radio.o ./framework/TimersManager/Source/TMR_Adapter.o ./framework/TimersManager/Source/TimersManager.o ./framework/Shell/Source/shell.o ./framework/Shell/Source/shell_autocomplete.o ./framework/Shell/Source/shell_cmdhelp.o ./framework/Shell/Source/shell_cmdhist.o ./framework/SerialManager/Source/UART_Adapter/UART_Adapter.o ./framework/SerialManager/Source/SPI_Adapter/SPI_Adapter.o ./framework/SerialManager/Source/I2C_Adapter/I2C_Adapter.o ./framework/SerialManager/Source/SerialManager.o ./framework/SecLib/SecLib.o ./framework/Reset/Reset.o ./framework/RNG/Source/RNG.o ./framework/Panic/Source/Panic.o ./framework/OSAbstraction/Source/fsl_os_abstraction_free_rtos.o ./framework/NVM/Source/NV_Flash.o ./framework/NVM/Source/NV_FsciCommands.o ./framework/ModuleInfo/ModuleInfo.o ./framework/Messaging/Source/Messaging.o ./framework/MemManager/Source/MemManager.o ./framework/MWSCoexistence/Source/MWS.o ./framework/LowPower/Source/MKW41Z/PWR.o ./framework/LowPower/Source/MKW41Z/PWRLib.o ./framework/LowPower/Source/MKW41Z/PWR_BLE.o ./framework/Lists/GenericList.o ./framework/LED/Source/LED.o ./framework/Keyboard/Source/Keyboard.o ./framework/GPIO/GPIO_Adapter.o ./framework/FunctionLib/FunctionLib.o ./framework/Flash/Internal/Flash_Adapter.o ./framework/FSCI/Source/FsciCommands.o ./framework/FSCI/Source/FsciCommunication.o ./framework/FSCI/Source/FsciLogging.o ./framework/FSCI/Source/FsciMain.o ./framework/DCDC/Source/DCDC.o ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_dspi.o ./drivers/fsl_dspi_freertos.o ./drivers/fsl_flash.o ./drivers/fsl_gpio.o ./drivers/fsl_i2c.o ./drivers/fsl_i2c_freertos.o ./drivers/fsl_llwu.o ./drivers/fsl_lptmr.o ./drivers/fsl_lpuart.o ./drivers/fsl_lpuart_freertos.o ./drivers/fsl_ltc.o ./drivers/fsl_pmc.o ./drivers/fsl_rtc.o ./drivers/fsl_smc.o ./drivers/fsl_tpm.o ./drivers/fsl_trng.o ./board/board.o ./board/clock_config.o ./board/gpio_pins.o ./board/peripherals.o ./board/pin_mux.o ./bluetooth/profiles/wireless_uart/wireless_uart_service.o ./bluetooth/profiles/device_info/device_info_service.o ./bluetooth/profiles/battery/battery_service.o ./bluetooth/host/config/ble_globals.o ./bluetooth/hci_transport/source/hcit_serial_interface.o ./CMSIS/system_MKW41Z4.o -lm -lc -lgcc -lnosys -l_ble_kw41z_controller -l_ble_4-2_host_cm0p -l_crypto_m0 -l802.15.4_mac_thr_cm0 -l_thread_cm0
Memory region Used Size Region Size %age Used
./nwk_ip/base/utils/debug_log.o: In function `HardFault_Handler':
TEXT_region1: 192 B 1 KB 18.75%
m_flash_config_region: 16 B 16 B 100.00%
TEXT_region2: 432531 B 455662 B 94.92%
NVM_region: 65535 B 65535 B 100.00%
DATA1_region: 0 GB 32 KB 0.00%
DATA2_region: 77848 B 96 KB 79.19%
D:\MCUXpressio_IDE\workplace\usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1\Debug/../nwk_ip/base/utils/debug_log.c:515: multiple definition of `HardFault_Handler'
PRODUCT_INFO_region: 0 GB 2047 B 0.00%
./source/semihost_hardfault.o:D:\MCUXpressio_IDE\workplace\usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1\Debug/../source/semihost_hardfault.c:72: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1.axf] Error 1

21:03:12 Build Finished (took 1s.246ms)

 

 

 

here were errors

 


first defined here semihost_hardfault.c /usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1/source 第 72 行 C/C++ Problem
make: *** [usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1.axf] Error 1 usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1 C/C++ Problem
multiple definition of `HardFault_Handler' debug_log.c /usbkw41z_kw41z_wireless_examples_hybrid_ble_thread_router_wireless_uart_freertos_usbkw41z_kw41z_1/nwk_ip/base/utils 第 515 行 C/C++ Problem

Outcomes