How can I Use KDS to setup a MQX project

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How can I Use KDS to setup a MQX project

跳至解决方案
3,725 次查看
yifangguo-b4310
NXP Employee
NXP Employee

Hi,

  I want to build a MQX based project,  when use KDS, found there is no a wizzard  to new the MQX project like CodeWarrior10.X,
So, how can i do to new a MQX project in KDS ?

标签 (1)
0 项奖励
回复
1 解答
2,486 次查看
macl
Senior Contributor I

Hi,

As mentioned in the threads that Zhang Jun provided, MQX does not have official support in KDS yet.  We are now planning it with new MQX releases coming around August. 

You can still build existing MQX examples with KDS today using existing GNU tools support already in MQX RTOS.  This worked for me.  I can not guarantee that it will work for you, but you can try. 


Check out section 3 Using MQX Makefiles with Eclipse in the MQX_GNU_Getting_Started.pdf document in the /doc/tools/gnu folder in MQX RTOS files  (e.g. C:\Freescale\Freescale_MQX_4_1\doc\tools\gnu).

This section describes creating a new project in Eclipse and using the existing make files to build MQX libraries and examples.

Thanks,
Mac L

在原帖中查看解决方案

0 项奖励
回复
8 回复数
2,487 次查看
macl
Senior Contributor I

Hi,

As mentioned in the threads that Zhang Jun provided, MQX does not have official support in KDS yet.  We are now planning it with new MQX releases coming around August. 

You can still build existing MQX examples with KDS today using existing GNU tools support already in MQX RTOS.  This worked for me.  I can not guarantee that it will work for you, but you can try. 


Check out section 3 Using MQX Makefiles with Eclipse in the MQX_GNU_Getting_Started.pdf document in the /doc/tools/gnu folder in MQX RTOS files  (e.g. C:\Freescale\Freescale_MQX_4_1\doc\tools\gnu).

This section describes creating a new project in Eclipse and using the existing make files to build MQX libraries and examples.

Thanks,
Mac L

0 项奖励
回复
2,486 次查看
intractablesubt
Contributor III

Hi,

I tried building Freescale_MQX_4_1_LINUX_beta as described in section 3 Using MQX Makefiles with Eclipse in the MQX_GNU_Getting_Started.pdf document in the /doc/tools/gnu folder in MQX RTOS files  (e.g.C:\Freescale\Freescale_MQX_4_1\doc\tools\gnu) as you suggested above. I extracted it so that it resides in /opt/Freescale/Freescale_MQX_4_1_LINUX_beta/ alongside KDS_1.0.1. I edited build/common/make/global.mak and set TOOLCHAIN_ROOTDIR = /opt/Freescale/KDS_1.0.1/toolchain. I then:


cd /opt/Freescale/Freescale_MQX_4_1_LINUX_beta/build/twrk21d50m/make

./build_gcc_arm.sh


I get repeated "No such file or directory" errors associated with stdbool.h included from psptypes.h like so:


make: *** [/opt/Freescale/Freescale_MQX_4_1_LINUX_beta/lib/twrk21d50m.gcc_arm/release/bsp/obj/adc_kadc.o] Error 1

In file included from /opt/Freescale/Freescale_MQX_4_1_LINUX_beta/mqx/source/include/mqx.h:82:0,

                 from /opt/Freescale/Freescale_MQX_4_1_LINUX_beta/mqx/source/io/adc/kadc/adt_kpdb.c:27:

/opt/Freescale/Freescale_MQX_4_1_LINUX_beta/mqx/source/psp/cortex_m/psptypes.h:29:21: fatal error: stdbool.h: No such file or directory

#include <stdbool.h>

                     ^

compilation terminated.

Thanks for any help,

WMK

0 项奖励
回复
2,486 次查看
kalden_srcinc
Contributor IV

You may have resolved this, but I'm leaving this here for anyone else who hits this.  Freescale hard coded the compiler version into the MQX make files.  What this means is that you use any gcc toolchain other than 4.8.3, it will fail to find header files.  Just update the appropriate gcc_arm.mak file with the compiler version you are using.

0 项奖励
回复
2,485 次查看
raels-r
Contributor IV

Hi Mac,

I'm trying to get the "hello2"project to work on a twr60n512 in KDS. I have tried building the libraries according to the MQX_GNU_Getting_Started.pdf guide (editting the mak files to accept gcc_arm v4.8.0 instead of v4.7.4 include paths), then importing these libraries into KDS and building the hello2 source again them, but I'm getting multiple errors.

I used the KDS Toolchain "C:\Freescale\KDS_1.0.1\toolchain" for the builds and ran the .bat scripts provided

I've attached the lib folder I created, I'm not experienced with library building, so if you could check if it looks alright at a glance or maybe post an example KDS-built library it would be very much appreciated.

Few things i've noticed:

1) no linker file in gcc_arm build folder (there was in the cdw folder)

2) gcc_arm bsp.a and psp.a are <1.5mb each, whereas the cdw ones are  66mb and 54mb respectively.

3) i'm getting lots of undefined references to '__zero_table_start__' and '__zero_table_end__' (amongst others) from the psp.a

regards,


Rael S-R

0 项奖励
回复
2,485 次查看
macl
Senior Contributor I

Hi,

MQX uses its own linker files, not linker files included by KDS.  Sounds like the problem might be related to the linker file you have selected.  Coming next month, MQX will officially support KDS, so from then on this will be supported.

Thanks,

Mac

0 项奖励
回复
2,485 次查看
raels-r
Contributor IV

Edit: I've since discovered it was some sort of corruption as the folder '..\mqx\source\bsp\twrk60n512\gcc_arm' was missing, along with 'initflash.ld'.

After copying them from a more complete installation the build was fine and I have since managed to build and debug 'hello2' using the gcc_arm toolchain in KDS.

Hi,

I've tried building the library for the twrk40d100m using the make files and gcc_arm and the linker file was correctly created. Any ideas why the twrk60 linker isn't being made?

I've jumped ship and moved to the twr40 build to try and get this code to atleast build, before trying to sort out issues with the twr60 build.

Had to change a few directories in the make files:

- '/4.7.4/' to '/4.8.0/'

- removed '/armv7e-m/' from directory paths

The build scripts seem a bit happier after this, but I can't locate a 'libnosys.a' in the KDS toolchain, any ideas where it might be lurking?

I realise that MQX support will be coming to MQX at some point in late August, but i'm currently interning at Freescale Aylesbury, where they've asked me to rebuild one of their MQX demos in KDS and I'll have likely finished my internship by the time the support is released.

Regards,

Rael S-R

0 项奖励
回复
2,485 次查看
markschuck
Contributor II

one thing i'd point out is that while you can't yet use the full MQX you can use processor expert to add MQX Lite support and configure it from the UI. seems to work well for me once i figured out that you can expand the MQX lite component in the 'components' window to manage individual tasks (change name, configure FP support, change stack size, rename the task, etc...)

The only problem i've had so far is with tasks in the template list that were not marked as  MQX_AUTO_START_TASK, see mqxlite problem starting template tasks that were not marked as MQX_AUTO_START_TASK

0 项奖励
回复
2,485 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Yifang,

i think below two thread should answer your questions:

https://community.freescale.com/message/400328#400328

https://community.freescale.com/docs/DOC-100440

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

this answer is for you. if it helps, please click on "correct answer" button. thanks!

Best Regards,

Zhang Jun

0 项奖励
回复