Building KW41 app in Linux machine

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

Building KW41 app in Linux machine

1,594 Views
sensenthuran
Contributor IV

Hi,

how we can build the KW41 applications in Linux machine? I can see the IAR & KDS project files.

Is there any way to compile in Linux machine with make file?

MKW41Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\glucose_sensor\frdmkw41z

Thanks

4 Replies

971 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi,

I am assuming that you are a alpha customer. We can't share that information in the public community.

For more information please contact your FAE.

Best Regards

Mario

0 Kudos

971 Views
sensenthuran
Contributor IV

Hi Mario,

Do you have that information? When i talked to our FAE, he mentioned that it is availabe using KDS or IAR but not linkx make file.

Thanks

0 Kudos

971 Views
carlos_neri
NXP Employee
NXP Employee

NXP doesn't provide makefiles to build KW41 BLE applications on Linux, but, you could use KDS 3.2 on Linux to build and debug. If that of interest for you, here are some instructions I've tested on Ubuntu 16.04 LTS and KDSv3.2:

1.- Copy the KW41 Beta package from Windows to Ubuntu. Usually this is installed on c:\NXP\MKW41Z_Connectivity_Software_1.0.1

2.- Install KDS v3.2:

              www.nxp.com/kds

3.- If you'll use JLink (usually the FRDM-KW41Z comes with the JLink firmware on OpenSDA), download and install the latest drivers from Segger website (J-Link Software and documentation package):

https://www.segger.com/downloads/jlink?page=downloads&action=analyze&url=jlink

4.- Replace the Segger files available on /opt/Freescale/KDS_v3/segger with the ones installed by the Segger package on /opt/SEGGER/JLink_V60f. Here's a screenshot of what was changed (look for the ones modified on Aug 12th):

segger_kds.png

5.- Open KDS and import the project that you want to test, in this case, I used the Heart Rate Sensor. Once you open it, you'll see several warnings of missing paths. These are caused by an environmental variable called KSDK20_FWK531_PATH, which in Windows is created as a system variable. Create the variable on KDS at Project Settings->C/C++ Build ->Environment. Make sure to point it to {KW41 ConnSW 1.0.1}\KSDK_2.0

KSDK20_FWK531_PATH_KDS.png

6.- Since Linux is more picky with file names and paths in lower/upper case, you'll find some issue with it, one of them is on the include paths, where Windows setup "gcc" but in the file system is actually GCC. Make sure to update that path at Project Settings->C/C++ Build ->Settings->Cross ARM C Compiler->Includes:

GCC_Path_change.png

7.- Finally, you can compile and several errors will pop-up, these due to the same lower/upper case, where, there's an include of "panic.h" or "Gpio_Adapter.h" but the actual files on the file system are "Panic.h" or "GPIO_Adapter.h". Is just matter of a few minutes to hunt down those errors and modify them to match the file system.

8.- Once the project compiles, just launch the debugger.

That was pretty much all I did to compile and debug on Ubuntu. Now, if you really want to build your system using makefiles, you could use the auto-generated makefiles by KDS as a start point and also take the JLink GDB server settings from it as well.

971 Views
johncharlton
Contributor I

This helped me to get the debugger working in Ubuntu Linux 14.04.  After installing the segger drivers they were placed in /opt/SEGGER/JLink_V612c.  I renamed the KDS /opt/Freescale/KDS_v3/segger path to segger_kds then replaced it with a symbolic link to the Segger tools: segger -> /opt/SEGGER/JLink_V612c.  I added a symbolic link: JLinkGDBServerCL -> JLinkGDBServer to the Segger tools and everything worked.