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.
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
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
Hey man, thanks for all this!
Could you please also post the lines for the linker library path please?
Much appriciated
Jaime
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?
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).
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
Follow the below steps
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
The change is $_KSDK13_FWK524_PATH_$\rtos\FreeRTOS\config\KW40Z4\iar
Compile the code
Attached document with screenshot
attaching the updated document
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
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