Hello at present, I'm trying to work with the new develoment tool "Kinetis Design Studio". I want to develop an aplication with MQX in the FRDM-K64F.
I've tried to create a project MQX in KDS for differents ways:
*Create a project in Codewarrior 10.6 and import to KDS.(not compile)
*Create a project in KDS with/without Process Expert and KSDK.
*Create a simple project with Process Expert and KSDK, and include the component MQX and MQX task in my project.
Of the last two forms, I get to compile without errors, but i can't debug. Show the error "Can not read register XX (XX) while CPU is running".
How can i work with KDS and MQX? How can i create a MQX project?
Thanks for the help.
Solved! Go to Solution.
Hello,
With IAR and Keil we don't have any wizard, copy&paste the folder Project use to work. But some paths need to be modified.
For KDS would have to do the same.
Perhaps there is an easier path, but this one works for me.
Best Regards,
Luis
Could it be that the code for FLEXCAN_DRV_IRQHandler is not linked?
That would explain why the breakpoint settings fail.
Can you check in the linker .map file that this function indeed is linked?
Erich
Hi Kevin,
Perhaps is better if you post the project.
Luis
Hi Kevin,
I can debug your code
There are multiple issues (Watch and read the Warnings, they are also important). Basically you have many implicit function calls, aka, it has not been resolved by linker. You need prototypes of functions in header files, for example:
void IniciarCAN(void);
And I have commented out all the ‘printf' as they are also implicit calls.
But the more important issue is that you have a function static void init_hardware(void) that is also included in the MQX BSP. I have not investigated why GCC linker doesn't complain, but removing the function, it works.
Luis
Hi Luis
I also could debug and add breakpoints in the function IniciarCan(), but I don't add a breakpoint in the interrupt or interrup handler.
void CAN0_ORed_Message_buffer_IRQHandler (void)
o
void FLEXCAN_DRV_IRQHandler (uint8_t ejemplo);
I've added your changes, but I can not.
Thank you very much Luis.
Hello,
I think that code isn't linked in the application. You're not installing the CAN interrupts in the MQX application.
Luis
Hi Luis
I added the libraries in the option project.
How can it keep happening? How can I install the CAN interrupt?
Hello,
In MQX (any version) you need to install the interrupts _int_install_isr
Check this: https://community.freescale.com/message/429868#429868
Luis
Hi Luis
I am currently running an issue that i couldnt run CAN as a loopback mode, do you know which settings that i should change to?
Thanks in advance.
Yaran
Hello,
Also, follow this guide: https://community.freescale.com/thread/330061
To integrate KSDK driver in MQX-KSDK code.
Luis
Hi,
your path is "C:\Freescale\Freescale_MQX_4_1_1" not "C:\Freescale\Freescale_MQX_4_1", so change MQX_ROOT_DIR accordinly.
Luis
Hi Luis
Yes , my path is MQX_4_1_1, and so in the .cproject file i already write accordingly like the screenshot below .
And the attachment is the .cproject file.
Thank you !
Alice
oh, sorry luis, the project can work normally now .
Alice
Hi luis,
I put your project on the desktop, and build it use kds 1.1.1 ,while it still have error , i need your help .
Thank you !
Alice
Hi Kevin,
For the debug configuration you can refer to the kds_user_guide(C:\Freescale\KDS_1.1.1\doc\pdf\kds_user_guide.pdf) about "4 debugging an embedded application"
and kinetis SDK k64 User's Guide (C:\Freescale\KSDK_1.0.0\doc) about ( 4.4.3 Run a demo application)
Hope it helps
Alice
Hello kevin,
MQX 4.1 does not have KDS project files included.
Official support of KDS in MQX is planned in MQX 4.2 & MQX 5.0 coming later this year.
At that time MQX plug-ins for KDS (e.g. Task Aware Debug & New Project Wizard) will be available. Also, MQX project files for all libraries and examples will be available for KDS.
In the meantime, I recommend to make a copy of an existing demo or example and edit this project. You can find them in the following paths.
C:\Freescale\MQX_KSDK_1.0.0\demos
C:\Freescale\MQX_KSDK_1.0.0\rtos\mqx\mqx\examples
Compiling MQX Libraries and Demos for the KDS you can refer to Compiling MQX Libraries and Demos for the KDS Toolchain.
Best Regards,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you for your support to us!
-----------------------------------------------------------------------------------------------------------------------
Hi Alice,
MQX 4.1.1 does include support for KDS.
From release notes:
Freescale MQX RTOS was compiled and tested with these development tools:
• Kinetis Design Studio version IDE 1.1.0
• Support available for Kinetis devices
• See build projects in the Kinetis Design Studio
subdirectory
• Makefile build option: TOOL=kds
….
Luis
Hi Luis and Kevin
There are many demo about MQX + KDS under MQX4,1,1, while it seems that in KDS can't creat project like CW(file->new->mqx project), so in my opinion, make use of the demo under the mqx is a good choice. what do you think?
Best Regards
Alice