AnsweredAssumed Answered

MQX ITTYC Not installing (name not found) KSDK1.2.0 KDS

Question asked by Dan Hadley on Jul 22, 2015
Latest reply on Jul 27, 2015 by Dan Hadley

Hi all,

 

I'm trying to use a second UART for serial communication on the K64F development board. I'm using the version of MQX supplied with KSDK1.2.0 (which I believe is 4.2), and have a processor expert enabled project. I've successfully got a webserver running, and the debug serial output (tty) works perfectly. The problem comes when I use PEX to add another UART.

 

I've configured it to be UART2, and assigned it pins. I can confirm it works using the KSDK functions to write and read, but I want to use the MQX drivers so I can use fopen. I've placed the following in user_config.h:

 

#define BSPCFG_ENABLE_TTYC 0
#define BSPCFG_ENABLE_ITTYC 1

 

Then I've rebuilt the following projects I have added to the workspace:

Untitled.png

After doing this I build my project, stepping through in the debugger I get to the line where I open the tty:

Int_com =  fopen("ittyc:","w");

This fails when it looks up the name "ittyc:", the only files present in the list are my tfs file for the webserver, tty, and the serial driver for tty. To me it seems like the driver isnt getting installed at all, Ive tried adding the BSPCFG enable lines to the "User settings" section of the mqx_ksdk PEX component and i still encounter the same error.

 

Looking in my project structure, in SDK->rtos->mqx->mqx->source->bsp->init_bsp.c only the debug tty gets initialized. Am I facing a problem where the BSP isnt getting built correctly, maybe I've got the project structure set up wrong. If I go back and look at the MQX 4.1 source files the user_config.h file already has all of the BSPCFG defines populated, in the 4.2 user_config.h there is only:

  
#ifndef __user_config_h__
#define __user_config_h__

/* Define user specific modifications of default configuration*/
#define BSPCFG_HAS_SRAM_POOL           1

/* Include platform-specific configuration */
#include "mqx_cnfg.h"

#endif /* __user_config_h__ */

/*!
** @}
*/
/*
** ###################################################################
**
**     This file was created by Processor Expert 10.5 [05.21]
**     for the Freescale Kinetis series of microcontrollers.
**
** ###################################################################
*/

 

This is the user config generated by processor expert, notice that the two added lines in the main MQX user config don't show up here. The two i added using the "user settings" show up in another file generated by processor expert.

 

Id really appreciate any help or direction people can provide, its been stumping me a while now.

Outcomes