MKW41Z_ConnSw_1.0.2 and FRDM-KW41Z - Bluetooth examples on Linux

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

MKW41Z_ConnSw_1.0.2 and FRDM-KW41Z - Bluetooth examples on Linux

1,656 Views
lubomirbogdanov
Contributor II

Hi guys,

If you want to use FRDM-KW41Z and if you try to compile some of the FreeRTOS bluetooth examples from MKW41Z_ConnSw_1.0.2 you might get the following error:

=====================================================================================

Invoking: Cross ARM C Compiler
arm-none-eabi-gcc ...
 
In file included from /home/.../workspaces/kinetis_workspace/MKW41Z_ConnSw_1.0.2/boards/frdmkw41z/wireless_examples/bluetooth/wireless_uart/FreeRTOS/kds/../../../../../../../rtos/freertos_8.2.3/Source/include/FreeRTOS.h:104:0,
 from /home/lbogdanov/workspaces/kinetis_workspace/MKW41Z_ConnSw_1.0.2/rtos/freertos_8.2.3/Source/croutine.c:70:
/home/lbogdanov/workspaces/kinetis_workspace/MKW41Z_ConnSw_1.0.2/boards/frdmkw41z/wireless_examples/bluetooth/wireless_uart/FreeRTOS/kds/../../../../../../../rtos/freertos_8.2.3/Source/include/portable.h:94:24: fatal error: portmacro.h: No such file or directory
  #include "portmacro.h"
                        ^
compilation terminated.
Building file: /home/..../workspaces/kinetis_workspace/MKW41Z_ConnSw_1.0.2/rtos/freertos_8.2.3/Source/portable/MemMang/heap_1.c
make: *** [freertos/croutine.o] Error 1

==================================================================================

 

To solve it, do this:

1. Right click the project -> Properties -> C/C++ Build -> Settings -> Cross ARM C Compiler -> Include paths ->

 

select "${ProjDirPath}/../../../../../../../rtos/freertos_8.2.3/Source/portable/gcc/ARM_CM0"

 

and click edit -> change it to :

 

"${ProjDirPath}/../../../../../../../rtos/freertos_8.2.3/Source/portable/GCC/ARM_CM0"

 

2. Right click the project -> Properties -> Resource -> Linked Resources -> Linked Resources tab -> you will see "Invalid location" section ->

 

select: PROJECT_LOC/../../../../../../../rtos/freertos_8.2.3/Source/portable/gcc/ARM_CM0/port.c
and change it to PROJECT_LOC/../../../../../../../rtos/freertos_8.2.3/Source/portable/GCC/ARM_CM0/port.c

 

select: PROJECT_LOC/../../../../../../../rtos/freertos_8.2.3/Source/portable/gcc/ARM_CM0/portmacro.h
and change it to PROJECT_LOC/../../../../../../../rtos/freertos_8.2.3/Source/portable/GCC/ARM_CM0/portmacro.h

 

Press OK to close the window. Now your project should build correctly.

 

Unfortunately you cannot debug two Freedom Boards KW41Z at the same time in KDS as on Windows yet.

 

OS used: Ubuntu 14.04.4 (64-bit)

Labels (1)
3 Replies

1,061 Views
davidswitzer
Contributor I

There are additional issues with debugging the Bluetooth examples on Linux when using the Rigado R41Z. I don't have the FRDM-KW41Z board to compare with. The R41Z JLink emulation does not identify the device as MKW41Z512xxx4. In fact, it doesn't identify the device at all. The versions of the JLinkExe and JLinkGDBServer that are embedded in Kinetis Design Studio is unable to connect to the JLink over the USB SWD port. To fix the problem, the following procedure is required:

1. Download and install the latest Segger J-Link driver .deb or .rpm from the Segger website: SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace 

2. The Segger installer will install the JLink binaries to /usr/bin. In the Eclipse project, modify the Debug Configuration as follows:

(a) Set the Executable path to /usr/bin/JLinkGDBServer

(b) Modify the jlink_path environment variable  to /usr/bin

0 Kudos

1,061 Views
hungry_horace
Contributor II

lubomirbogdanov This was very helpful, thanks!

1,061 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Lubomir Bogdanov

Thanks for sharing your workaround, I will check and Inform this issue.

Thanks again

Best Regards

Jorge Alcala

0 Kudos