Importing MCU V10.6 projects (sample, using PE and MQX) under KDS

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

Importing MCU V10.6 projects (sample, using PE and MQX) under KDS

Importing MCU V10.6 projects (sample, using PE and MQX) under KDS

Configuration used:

                Hardware :              TWR-K60D100M

                                                P&E Multilink Universal rev B

                Software:                CW for MCU V10.6

                                                KDS V1.1.1

 

Attached you will find 3 docs explaining step by step how to import a MCU V10.6 projects under KDS1.1.1

 

1- Porting sample MCU V10.6 project to KDS V1.1.1

2- Porting sample Processor Expert MCU V10.6 project to KDS V1.1.1

3- Porting sample MQX MCU V10.6 project to KDS V1.1.1

 

If you see problem or mistake, don't hesitate to contact me.

 

 

Another project:

4- Porting Example delivered on MCU V10.6 to KDS V1.1.1 (example_mcu_KDS.zip)

        + How to solve the "Program "gcc" not found in PATH" message

 

 

 

Other problems linked to the vector table moving MCU to KDS 3.0.0I am attempting to port a project from CodeWarrior 10 to KDS 3.0.

 

I was porting from CodeWarrior 10 to KDS 3.0. After fixing all the coding differences I ran into a runtime problem. The code kept restarting.

In comparing the C startup file provided by KDS and CodeWarrior I found that CodeWarrior was turning off the WatchDog and setting the Interrupt Vector Table address, KDS was not doing this.

I copied the relevant CodeWarrior code to the SystemInit() function in the system_MK20D7.c file.

This disabled the WatchDog, but left me with the problem of the code restarting whenever the an interrupt was generated.

I finally figured out that the problem was with the line of code that was attempting to re-locate the Vector table address.

Although the code appears to work for CodeWarrior it is totally bogus fro KDS.

Removing the line solved the problem.

After renaming all my interrupt handlers to the KDS naming convention everything now works as it should.

Labels (1)
Attachments
Comments

Is the import procedure valid also for projects created with previous CodeWarrior versions (e.g. CW 10.4) ?

Yes, especially if you have used the GNU tools in 10.4.

What if I need to convert CW 10.4 + MQX 4.0.2 projects based on ARM Freescale toolchain?

Till now, I never used ARM GCC toolchian in my CW projects...

Hi Alessandro,

To avoid problem it should be better to convert your project for GCC under V10.4.

After to have checked the project is running you can convert it to KDS.

Under the GCC compiler manual there is a chapter explaining: 4.1.1 Change Tool Chain to GCC.

On my MCU V10.6 installation the manual is:

      \CW MCU v10.6\MCU\Help\PDF\MCU_Kinetis_GCC.pdf page 29

            4.1.1 Change Tool Chain to GCC

Pascal

Hello Pascal,

I do refer to your doc convert CW10.6 project to KDS  .(the ample code without mqx and pe)

When I convert the project which create by myslef on CW10.6,  after conret , it work well;

While , when  I conver the demo code under the CW10.6  for example "C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Kinetis_Examples\k60\i2c"  , afert convert on KDS, when i build ,it erros :

"  Program "gcc" not found in PATH"

What should I do to convert the demo under CW10.6 about kinenits k60  !

Thank you

Linda

Hi Linda,

It seems there is similar problem for this example than which one is described in the MQX doc.

I need to work on it.

This will take some times.

Regards

Pascal

Hi Linda,

I performed several tests and at the end I've found the cause of the problem.

Before to explain you the problem we need to know this error will not stop the build.

You should be able to build the project with this error too.

To avoid this type of problem we recommend to:

      -> create a new project under KDS,

      -> copy the source in the new project.

To convert the example "C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Kinetis_Examples\k60\i2c" to KDS you must reproduced the process explained in the 2 videos attached.

As you can see the application is built but the message " Program "gcc" not found in PATH" is always generated.

This error will not impact the project build.

To remove the message you must modify the .cproject file manually as explained in the doc attach and explained in the video too.

I can not add the attachments in this post.

I will update the doc - refer to example_mcu_KDS.zip

Pascal

Hi Pascal,

I have tried to convert the bare-metal project created by CW10.6 to KDS2.0 with a Kinetis device with FPU. And if the compiler setting is using FPU, then build will fail.

Default project created by CW10.6 will pass "-D__VFPV4__" flag to compiler and linker will use "${MCUToolsBaseDir}/ARM_GCC_Support/ewl/lib/armv7e-m/fpu" for library search path.

Any way out of this?

Hao

Hi Hao,

Sorry for the delay.

Please can you provide more info regarding the Kinetis device you're using.

As you can see above, to avoid problem we recommend to use the GCC build tool chian under MCU V10.6 before to convert the project under KDS.

I will perform an example on my side to determine the process to follow.

Pascal

Hi Hao,

Sorry for the delay.

I've performed some tests on my side with MK70 device.

I think there is a problem with the configuration when the project is converted.

I've performed some tests with last versions (CW for MCU v10.6.5  + KDS V3.0.0).

The ARM Family selected by default is cortex-m0plus.

With this version the Float ABI and FPU type can not be touched.

A project for K70 created under KDS V3.0.0 is using cortex-m4

With this, I can define:

     Float ABI -> FP instruction (hard)

     FPU Type -> fpv4-sp-d16

Now I can compile all sources file but there is another problem to build the project: a linker error.

e:/freescale/kds+ksdk/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-exit.o): In function `exit':

exit.c:(.text.exit+0x16): undefined reference to `_exit'

collect2.exe: error: ld returned 1 exit status

make: *** [test_MK70_FPU.elf] Error 1

Unfortunately at this time I was not able to find a solution.

Probably the best way to import the project is to create a new project and to add your source files.

Pascal

No ratings
Version history
Last update:
‎10-17-2014 01:34 AM
Updated by: