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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jump to solution
693 Views
1901167646
Contributor II

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

Labels (1)
Tags (1)
0 Kudos
1 Solution
263 Views
ovidiu_usturoi
NXP Employee
NXP Employee

Hi SJ Yin,

I just checked the sdk version KSDK 2.2.0 (2018-04-16) for USB-KW41 and  using the default configuration is no issue (compiler/linker) for the hybrid_ble_thred_router_wireless_uart project. 

Looking on your log seems to be an issue at linker (multiple definition of `HardFault_Handler').

Could you please check that in app_config.h ...you have this define:

#ifndef __SEMIHOST_HARDFAULT_DISABLE
      #define __SEMIHOST_HARDFAULT_DISABLE
#endif

If it is not there, please add and retry to compile the application.

Regards,

Ovidiu

View solution in original post

0 Kudos
6 Replies
263 Views
1901167646
Contributor II

you can use IAR for ARM to solve this problem

0 Kudos
263 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 


Could you please let me know which version of the stack you are using ? I just compiled the project without any issues with the latest SDK 


Regards, 

Estephania 

0 Kudos
263 Views
1901167646
Contributor II

hello

    I am using the MCUXpresso IDE v10.2.1_795. The routine is the official routine. The error message is that there may be compilation errors caused by incompatible third-party software and MCUX. I don't know which software is incompatible with it. You can look at the manual MCUXpresso IDE v10.2 User Guide, section 18.11, which is described above, but it does not solve my problem.

Regards, 

SJ YIN

0 Kudos
264 Views
ovidiu_usturoi
NXP Employee
NXP Employee

Hi SJ Yin,

I just checked the sdk version KSDK 2.2.0 (2018-04-16) for USB-KW41 and  using the default configuration is no issue (compiler/linker) for the hybrid_ble_thred_router_wireless_uart project. 

Looking on your log seems to be an issue at linker (multiple definition of `HardFault_Handler').

Could you please check that in app_config.h ...you have this define:

#ifndef __SEMIHOST_HARDFAULT_DISABLE
      #define __SEMIHOST_HARDFAULT_DISABLE
#endif

If it is not there, please add and retry to compile the application.

Regards,

Ovidiu

View solution in original post

0 Kudos
263 Views
1901167646
Contributor II

hello  Ovidiu Alexandru Usturoi

  App_config.h does not have that piece of code, plus the compiler is no longer reported error, you can download it, thank you very much, but my routine is officially given, why the app_config.h in each routine will be less?

   

Regards,

SJ YIN

0 Kudos
263 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Also, you can check and  follow the steps on the FRDM-KW41Z  under the build and run? 

There is the chance that you have regarding the semi hosting that you can solve with this steps of importing. 

Regards, 

Estephania 

0 Kudos