error while compiling KW40Z SDK of HEXIWEAR

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

error while compiling KW40Z SDK of HEXIWEAR

4,949 Views
ganga424
Contributor I

Hi,

Currently i am working on HEXIWEAR. I am trying to compile the Hexiwear_bluetooth IAR project.

I tried as mentioned below.

1. Download KW40Z_Connectivity_Software_1.0.1

2. Download HEXIWEAR-master project from the github

3. Added HEXIWEAR_bluetooth project from the HEXIWEAR-master/SW/KW40 folder to the     KW40Z_Connectivity_Software_1.0.1/ConnSW/examples/bluetooth

4. Copied the SDK folders present in HEXIWEAR-master/SW/KW40/SDK modifications and replaced the same folders           in the KW40Z_Connectivity_Software_1.0.1/ConnSW  path as mentioned in the ReadMe document of each folder of     HEXIWEAR-master/SW/KW40/SDK modifications

5. Open KW40Z_Connectivity_Software_1.0.1/KSDK_1.3.0/lib/ksdk_freertos_lib/iar/KW40Z4/ksdk_freertos_lib.eww with

    IAR work bench and build

6.Open KW40Z_Connectivity_Software_1.0.1/ConnSw/examples/bluetooth/HEXIWEAR_bluetooth/frdmkw40z/FreeRTOS/build/iar/HEXIWEAR_bluetooth.eww and build

The build run delivers the failure.

Building configuration: HEXIWEAR_bluetooth - Debug 
Updating build tree... 
Variable expansion failed. 
  Offending text: "-I$_KSDK_PATH_$\rtos\FreeRTOS\config\KW40Z4\iar\" 
  Partial command line: ""C:\Freescale\KW40Z_Connectivity_Software_1.0.1\KSDK_1.3.0\rtos\FreeRTOS\port\iar\portasm.s" "-O$PROJ_DIR$\debug\obj" "-s+"  
"-M<>" "-w+" "-r" "-DDEBUG" "--cpu" "Cortex-M0+" "--fpu" "None" "-I$_KSDK_PATH_$\rtos\FreeRTOS\config\KW40Z4\iar"\ " 
Error while running Assembler 
Variable expansion failed. 
  Offending text: "-I$_KSDK_PATH_$\rtos\FreeRTOS\config\KW40Z4\iar\" 
  Partial command line: ""C:\Freescale\KW40Z_Connectivity_Software_1.0.1\KSDK_1.3.0\platform\devices\MKW40Z4\startup\iar\startup_MKW40Z4.s"  
"-O$PROJ_DIR$\debug\obj" "-s+" "-M<>" "-w+" "-r" "-DDEBUG" "--cpu" "Cortex-M0+" "--fpu" "None" "-I$_KSDK_PATH_$\rtos\FreeRTOS\config\KW40Z4\iar"\ " 
Error while running Assembler 
Variable expansion failed. 
  Offending text: "$_KSDK_1_3_0_PATH_$/platform/CMSIS/Include\" 
  Partial command line: ""C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\HEXIWEAR_bluetooth\common\Server Services\ 
alert_service.c" "-D" "DEBUG" "-D" "IAR" "-D" "CPU_MKW40Z160VHT4" "-lcN" "$PROJ_DIR$\debug\list" "--diag_suppress"  
"Pa039,Pe068,Pe069,Pa082,Pe177,Pe186,Pe550,Pa050" "-o" "$PROJ_DIR$\debug\obj" "--debug" "--endian=little" "--cpu=Cortex-M0+" "-e" "--fpu=None"  
"--dlib_config" "$TOOLKIT_DIR$\INC\c\DLib_Config_Normal.h" "--preinclude" "$PROJ_DIR$/../../app_preinclude.h" "-I"  
"$_KSDK_1_3_0_PATH_$/platform/CMSIS/Include"\ "-I" "$PROJ_DIR$/../../../../../../../boards/frdmkw40z"\ "-I" "$_KSDK_1_3_0_PATH_$/platform/devices"\ "-I"  
"$_KSDK_1_3_0_PATH_$/platform/devices/MKW40Z4/include"\ "-I" "$_KSDK_1_3_0_PATH_$/platform/devices/MKW40Z4/startup"\ "-I"  
"$_KSDK_1_3_0_PATH_$/platform/system/src/clock/MKW40Z4"\ "-I" "$_KSDK_1_3_0_PATH_$/platform/devices"\ "-I"  
"$_KSDK_1_3_0_PATH_$/platform/devices/MKW40Z4/startup"\ "-I" "$_KSDK_1_3_0_PATH_$/rtos/FreeRTOS/include"\ "-I"  
"$_KSDK_1_3_0_PATH_$/rtos/FreeRTOS/port/iar"\ "-I" "$_KSDK_1_3_0_PATH_$/rtos/FreeRTOS/config/KW40Z4/iar"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/Flash/External/Interface"\ "-I" "$PROJ_DIR$/../../../../../../../framework/Flash/External/Interface/Eeprom_M25P80"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/Flash/Internal"\ "-I" "$PROJ_DIR$/../../../../../../../framework/SerialManager/Source/SPI_Adapter"\ "-I"  
"$_KSDK_1_3_0_PATH_$/platform/drivers/src/flash/C90TFS/drvsrc/include"\ "-I" "$PROJ_DIR$/../../../../../../../framework/GPIOIrq"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/Keyboard/Interface"\ "-I" "$PROJ_DIR$/../../../../../../../framework/LED/Interface"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/Common"\ "-I" "$PROJ_DIR$/../../../../../../../framework/MemManager/Interface"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/Messaging/Interface"\ "-I" "$PROJ_DIR$/../../../../../../../framework/LowPower/Interface/MKW4xZ"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/LowPower/Interface/MKW4xZ"\ "-I" "$PROJ_DIR$/../../../../../../../framework/OSAbstraction/Interface"\ "-I"  
"$_KSDK_1_3_0_PATH_$/platform/osa/inc"\ "-I" "$PROJ_DIR$/../../../../../../../framework/OtaSupport/Interface"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/Panic/Interface"\ "-I" "$PROJ_DIR$/../../../../../../../framework/RNG/Interface"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/SerialManager/Interface"\ "-I" "$PROJ_DIR$/../../../../../../../framework/TimersManager/Interface"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/TimersManager/Source"\ "-I" "$PROJ_DIR$/../../../../../../../framework/FunctionLib"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/Lists"\ "-I" "$PROJ_DIR$/../../../../../../../framework/SecLib"\ "-I" "$PROJ_DIR$/../../../../../../../framework/ModuleInfo"\ "-I"  
"$PROJ_DIR$/../../../../../../../bluetooth/host/interface"\ "-I" "$PROJ_DIR$/../../../../../common"\ "-I" "$PROJ_DIR$/../../../../../common"\ "-I"  
"$PROJ_DIR$/../../../../../../../bluetooth/controller/interface"\ "-I" "$PROJ_DIR$/../../../../../common"\ "-I" "$PROJ_DIR$/../../../../../../../bluetooth/hci_transport/interface"\ "-I"  
"$PROJ_DIR$/../../../../../common/gatt_db"\ "-I" "$PROJ_DIR$/../../../../../common/gatt_db/macros"\ "-I" "$PROJ_DIR$/../../../../../../../bluetooth/profiles/battery"\ "-I"  
"$PROJ_DIR$/../../../../../../../bluetooth/profiles/device_info"\ "-I" "$PROJ_DIR$/../../../../../../../framework/XCVR/MKW40Z4"\ "-I" "$PROJ_DIR$/../../../../common"\ "-I"  
"$PROJ_DIR$/../../../../../../../framework/DCDC/Interface"\ "-I" "$PROJ_DIR$/../../../../common/TSI"\ "-I" "$PROJ_DIR$/../../../../common/Host MCU Interface"\ "-I"  
"$PROJ_DIR$/../../../../common/Client ANCS"\ "-I" "$PROJ_DIR$/../../../../common/Server Services"\ "-I" "$PROJ_DIR$/../../../../common/ft/include"\ "-I"  
"$_KSDK_1_3_0_PATH_$/platform/drivers/inc"\ "-I" "$_KSDK_1_3_0_PATH_$/platform/system/inc"\ "-I" "$_KSDK_1_3_0_PATH_$/platform/hal/inc"\ "-I"  
"$_KSDK_1_3_0_PATH_$/platform/utilities/inc"\ "-I" "C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\framework\SerialManager\Source"\ "-I" "C:\ 
Freescale\KW40Z_Connectivity_Software_1.0.1\KSDK_1.3.0\rtos\FreeRTOS\src"\ "-Ohz" " 
Variable expansion failed. 

Questions:

1. Is my preparation process to use the example code right?

2. What causing the above errors and how to resolve it?

3. If i need to configure argument variables, what variables i need to configure?

Thank you very much for help in advance.

Regards,

Gangadhar

Labels (1)
10 Replies

2,826 Views
jaimezornoza
Contributor I

Hello!

I'm still having some problems with the linker. 

When i Build the project i get the following errors: 

Building configuration: HEXIWEAR_bluetooth – Debug
Updating build tree…
Linking
Error[Li005]: no definition for “__VECTOR_RAM” [referenced from fsl_interrupt_manager.o(libksdk_platform_freertos.a)]
Error[Li005]: no definition for “FREESCALE_PROD_DATA_BASE_ADDR” [referenced from C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\HEXIWEAR_bluetooth\
frdmkw40z\FreeRTOS\build\iar\debug\obj\Flash_Adapter.o]
Error[Li005]: no definition for “NV_STORAGE_END_ADDRESS” [referenced from C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\HEXIWEAR_bluetooth\frdmkw40z\
FreeRTOS\build\iar\debug\obj\ApplMain.o]
Error[Li005]: no definition for “__RAM_VECTOR_TABLE_SIZE” [referenced from C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\HEXIWEAR_bluetooth\frdmkw40z\
FreeRTOS\build\iar\debug\obj\startup.o]
Error[Li005]: no definition for “__VECTOR_TABLE” [referenced from C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\HEXIWEAR_bluetooth\frdmkw40z\FreeRTOS\build\iar\
debug\obj\startup.o]
Error[Lp011]: section placement failed
unable to allocate space for sections/blocks with a total estimated minimum size of 0x5158 bytes (max align 0x8) in <[0x1ffff000-0x1fffffff], [0x20000000-0x20000fff], [0x20001000-0x20003fff]> (total
uncommitted space 0x5000).
Uncommitted:
[0x1ffff000-0x1fffffff]: 0x1000
[0x20000000-0x20000fff]: 0x1000
[0x20001000-0x20003fff]: 0x3000
Error while running Linker

Total number of errors: 6
Total number of warnings: 0

Any idea on how to fix this?

Thanks in advance

Jaime

0 Kudos

2,828 Views
jaimezornoza
Contributor I

Hey man, thanks for all this!

Could you please also post the lines for the linker library path please?

Much appriciated 

Jaime 

0 Kudos

2,828 Views
swathit
Contributor I

Hi Deepak Rana,

I followed the steps as mentioned in "KW40Z compilation_final" but I am getting errors stating:

Error while running C/C++ Compiler
app_config.c
Error while running C/C++ Compiler
ApplMain.c
Error while running C/C++ Compiler
appMode_service.c
Error while running C/C++ Compiler
battery_service.c
Error while running C/C++ Compiler
ble_controller_task.c
Error while running C/C++ Compiler
ble_globals.c
Error while running C/C++ Compiler
ble_host_tasks.c
Error while running C/C++ Compiler
ble_init.c
Error while running C/C++ Compiler
board.c
Error while running C/C++ Compiler
client_ancs.c
Error while running C/C++ Compiler
common_service.c
Error while running C/C++ Compiler
CopyToRam.c
Error while running C/C++ Compiler
croutine.c
Error while running C/C++ Compiler
DCDC.c
Error while running C/C++ Compiler
DEFlashPartition.c

and so on for all the c files. I am just using the trial version of IAR.

 

Is this an issue due to trial version or am I missing any step?

0 Kudos

2,828 Views
varadk
Contributor I

Hi Deepak Rana,

Thanks for getting this all info, great work.

I tried to do same as explained in document "KW40Z compilation_final", but facing some error while making it.

It says, compiler error and assembler error.

I will retry it with fresh new code again....

Mean while, will you please update the path which are used for "LINKER".

and one more doubt, How I can upload .bin file in Heiwear KW40z ?

Is there only way like drag and drop .bin file in DpLINK drive? or any else....., (as I dont have any other hardware except Hexiwear with docking station).

0 Kudos

2,828 Views
BlackNight
NXP Employee
NXP Employee

Hi Varad,

In case this is helpful: here is how I load the .bin files into the Hexiwear using an external probe: Flashing and Restoring the Hexiwear Firmware 

Erich

0 Kudos

2,828 Views
deepakrana
NXP Employee
NXP Employee

Follow the below steps

 

  • Download the connect  KW40Z_Connectivity_Software_1.0.1    and install in the location    C:\Freescale\KW40Z_Connectivity_Software_1.0.1\
  • Download the latest hexiwear code ( I mention this because I did just now )
  • Paste the  hexiwear_bluetooth project under KW40 of github at location C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth

       

 

  • Make the changes in the file of installation KW40Z_Connectivity_Software_1.0.1     as mentioned in the github KW40 folder for the different drivers.

 

  • After that open the project in IAR and in the project option ->c/C++ Compiler screen shot below in preprocessor update the directory paths

             

 

Pasting below for simplicity

 

$_KSDK13_FWK524_PATH_$/platform/CMSIS/Include

$PROJ_DIR$/../../../../../../../boards/frdmkw40z

$_KSDK13_FWK524_PATH_$/platform/devices

$_KSDK13_FWK524_PATH_$/platform/devices/MKW40Z4/include

$_KSDK13_FWK524_PATH_$/platform/devices/MKW40Z4/startup

$_KSDK13_FWK524_PATH_$/platform/system/src/clock/MKW40Z4

$_KSDK13_FWK524_PATH_$/platform/devices

$_KSDK13_FWK524_PATH_$/platform/devices/MKW40Z4/startup

$_KSDK13_FWK524_PATH_$/rtos/FreeRTOS/include

$_KSDK13_FWK524_PATH_$/rtos/FreeRTOS/port/iar

$_KSDK13_FWK524_PATH_$/rtos/FreeRTOS/config/KW40Z4/iar

$PROJ_DIR$/../../../../../../../framework/Flash/External/Interface

$PROJ_DIR$/../../../../../../../framework/Flash/External/Interface/Eeprom_M25P80

$PROJ_DIR$/../../../../../../../framework/Flash/Internal

$PROJ_DIR$/../../../../../../../framework/SerialManager/Source/SPI_Adapter

$_KSDK13_FWK524_PATH_$/platform/drivers/src/flash/C90TFS/drvsrc/include

$PROJ_DIR$/../../../../../../../framework/GPIOIrq

$PROJ_DIR$/../../../../../../../framework/Keyboard/Interface

$PROJ_DIR$/../../../../../../../framework/LED/Interface

$PROJ_DIR$/../../../../../../../framework/Common

$PROJ_DIR$/../../../../../../../framework/MemManager/Interface

$PROJ_DIR$/../../../../../../../framework/Messaging/Interface

$PROJ_DIR$/../../../../../../../framework/LowPower/Interface/MKW4xZ

$PROJ_DIR$/../../../../../../../framework/LowPower/Interface/MKW4xZ

$PROJ_DIR$/../../../../../../../framework/OSAbstraction/Interface

$_KSDK13_FWK524_PATH_$/platform/osa/inc

$PROJ_DIR$/../../../../../../../framework/OtaSupport/Interface

$PROJ_DIR$/../../../../../../../framework/Panic/Interface

$PROJ_DIR$/../../../../../../../framework/RNG/Interface

$PROJ_DIR$/../../../../../../../framework/SerialManager/Interface

$PROJ_DIR$/../../../../../../../framework/TimersManager/Interface

$PROJ_DIR$/../../../../../../../framework/TimersManager/Source

$PROJ_DIR$/../../../../../../../framework/FunctionLib

$PROJ_DIR$/../../../../../../../framework/Lists

$PROJ_DIR$/../../../../../../../framework/SecLib

$PROJ_DIR$/../../../../../../../framework/ModuleInfo

$PROJ_DIR$/../../../../../../../bluetooth/host/interface

$PROJ_DIR$/../../../../../common

$PROJ_DIR$/../../../../../common

$PROJ_DIR$/../../../../../../../bluetooth/controller/interface

$PROJ_DIR$/../../../../../common

$PROJ_DIR$/../../../../../../../bluetooth/hci_transport/interface

$PROJ_DIR$/../../../../../common/gatt_db

$PROJ_DIR$/../../../../../common/gatt_db/macros

$PROJ_DIR$/../../../../../../../bluetooth/profiles/battery

$PROJ_DIR$/../../../../../../../bluetooth/profiles/device_info

$PROJ_DIR$/../../../../../../../framework/XCVR/MKW40Z4

$PROJ_DIR$/../../../../common

$PROJ_DIR$/../../../../../../../framework/DCDC/Interface

$PROJ_DIR$/../../../../common/TSI

$PROJ_DIR$/../../../../common/Host MCU Interface

$PROJ_DIR$/../../../../common/Client ANCS

$PROJ_DIR$/../../../../common/Server Services

$PROJ_DIR$/../../../../common/ft/include

$_KSDK13_FWK524_PATH_$/platform/drivers/inc

$_KSDK13_FWK524_PATH_$/platform/system/inc

$_KSDK13_FWK524_PATH_$/platform/hal/inc

$_KSDK13_FWK524_PATH_$/platform/utilities/inc

 

  • Similar you have to make change in assemebler path

 

         

   The change is   $_KSDK13_FWK524_PATH_$\rtos\FreeRTOS\config\KW40Z4\iar 

Compile the code 

 Attached document with screenshot

2,828 Views
deepakrana
NXP Employee
NXP Employee

attaching the updated document

2,828 Views
deepakrana
NXP Employee
NXP Employee

Final attachment made

0 Kudos

2,828 Views
BlackNight
NXP Employee
NXP Employee

Hi Deepak,

many thanks for pulling this together. It seems to me that this is the only information available how to build the BLE stack on the Hexiwear :-(.

However, I doubt that the code currently available will work at all. When trying it to run, the code created a hard fault because gBDAddress was declared as const and placed in FLASH, but the application tried to write to the FLASH.

In case someone wants to use free-of-charge and unlimited Kinetis Design Studio instead of the IAR tools: I'm currently porting the BLE stack to Eclipse/GNU and Kinetis Design Studio. The current state is available on GitHub (Hexiwear_v2/KDS/Hexiwear_bluetooth at master · ErichStyger/Hexiwear_v2 · GitHub ). I'm still debugging it, so not fully functional yet, but it is coming along....

Thanks,

Erich

0 Kudos

2,828 Views
BlackNight
NXP Employee
NXP Employee

as for an update, I have been able to build the Hexiwear BLE stack using GNU and Kinetis Design Studio, described in Building the NXP BLE Stack with Open Source GNU and Eclipse Tools | MCU on Eclipse 

I hope this helps,

Erich

0 Kudos