Kinetis Design Studio with KW40Z Connectivity Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Kinetis Design Studio with KW40Z Connectivity Software

Jump to solution
1,041 Views
Contributor II

Hi there

We are developing a firmware for the KW40Z controller. Now we want to use the bluetooth-stack from the "connectivity software" package and didn't find any example projects for the Kinetis Design Studio. All the examples we found are for the IAR IDE.

Is there any possibility to use the bluetooth-stack with the Kinetis Design Studio? Do I only need an adapted linker-script to run the Kenetis Design Studio-IAR examples, or do I need more?

Thanks for more information on this topic!

Peter

1 Solution
70 Views
Senior Contributor II

Hello again Peter,

Since the BLE stack comes in a library compiled with IAR, I think that migrate the code and have complete compatibility will be impossible.

The EABI is a standard that defines the mapping between low level concepts in high level languages. The purpose of this EABI is to allow interoperability between objects built in different tools. However, IAR doesn't have a public EABI. Each build tools provider provides its own EABI, allowing interoperability between objects built with the same build tools. Making the mentioned libraries interoperable could be possible only if the EABIs are compatible.

Best regards,

Earl.

View solution in original post

8 Replies
70 Views
Contributor III

Any update on the KDS package? How about the FRDM-KW40Z support in the new MQX 5 version also?

0 Kudos
70 Views
Contributor II

Update: Now i have a project in Kinetis Design Studio and i can compile it. This project is taken form the IAR connectivity examles.

When i start the debugger, the startup code begins (startup.c) and crashes while he copies the initial values form rom to ram (after 1000 steps):

while (n--)

{

    *data_ram++ = *data_rom++;

}

When i check the data_ram and data_rom pointers, i can't see any overflow.

0 Kudos
70 Views
Senior Contributor II

Hello Peter,

I thing that the thread MCR20A source migration from IAR to KDS will be useful for you, could you please take a look into it?

I will be looking forward for your response.

Best regards,

Earl Orlando.

0 Kudos
70 Views
Contributor II

Hello Earl

I read the thread and added the suggested linker flags to my project (that already compile, link and start with debug). But the result ist the same: the processor jumps in the DefaultISR while he initialized the variables with values from the flash.

Edit: I have to turn on the 'Optimize Size' or the 'Optimize for Debug' flag because, the code is to big with none optimization (160k Flash).

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: btTestKw40.elf section `.text' will not fit in region `m_text'

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: section .data loaded at [00027c18,000281cf] overlaps section .text

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: region `m_text' overflowed by 14720 bytes

But when i compile the same project in IAR with none optimization (health_thermometer_demo, with small changes meanwhile) it drops out the following code size.

  114 566 bytes of readonly  code memory

    6 659 bytes of readonly  data memory

   13 875 bytes of readwrite data memory

I know, that the IAR compiler produce smaller code, but the difference ist to big for that reason (>160k with -Os (GCC) vs 120k without optimization (IAR) )

Thanks for your help

Peter

0 Kudos
70 Views
Senior Contributor II

Hello again Peter,

It seems to be a reasonable difference since GCC is not as efficient as IAR.

Could you please share the project that crashes in the start up to debug it by myself? It is very strange that it crashes after 1000 iterations.

Regards,

Earl.

0 Kudos
70 Views
Contributor II

Hello Earl

My project is here downloadable. On my disc, it's located on C:/Users/Username/workspace.kds/ and the Freescale framework is on the standard path (C:\Freescale\KW40Z_Connectivity_Software_1.0.0)

I tried it on our hardware and on de FRDM-KW40Z evalboard and the effect is the same.

Thanks,

Peter

PS: The gcc-compiler throws a lot of warnings like the following:

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: warning: C:/Freescale/KW40Z_Connectivity_Software_1.0.0/ConnSw/bluetooth/controller/lib/ble_controller_lib.a(bt_le_bluetooth.o) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

I think thats why I use the library for IAR and compile it with gcc. Could this cause the error while the variables were initialized?

0 Kudos
71 Views
Senior Contributor II

Hello again Peter,

Since the BLE stack comes in a library compiled with IAR, I think that migrate the code and have complete compatibility will be impossible.

The EABI is a standard that defines the mapping between low level concepts in high level languages. The purpose of this EABI is to allow interoperability between objects built in different tools. However, IAR doesn't have a public EABI. Each build tools provider provides its own EABI, allowing interoperability between objects built with the same build tools. Making the mentioned libraries interoperable could be possible only if the EABIs are compatible.

Best regards,

Earl.

View solution in original post

70 Views
Contributor II

Sounds logical. Then we wait until freescale supports the wireless framework on Kinetis Design Studio and migrate our project to Kinetis Design Studio later...

Thanks

Peter

0 Kudos