MQX-3.7 with itty no output

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

MQX-3.7 with itty no output

跳至解决方案
1,029 次查看
bugs
Contributor III

Hi,

my program works fine when I use "ttye:" as default console, but after I recompiled the psp and bsp to use "ittye:", there is no output on the default console.

please help with any clue. Thanks.

 

user_config.h

#define BSPCFG_ENABLE_TTYE       0
#define BSPCFG_ENABLE_ITTYE      1

 


twrk60n512.h

    #if BSPCFG_ENABLE_ITTYE
        #define BSP_DEFAULT_IO_CHANNEL                        "ittye:"

        #define BSP_DEFAULT_IO_CHANNEL_DEFINED          
 #else
        #define BSP_DEFAULT_IO_CHANNEL                        NULL
    #endif

#ifndef BSP_DEFAULT_IO_OPEN_MODE
//    #define BSP_DEFAULT_IO_OPEN_MODE                          (pointer) (IO_SERIAL_XON_XOFF | IO_SERIAL_TRANSLATION | IO_SERIAL_ECHO)
    #define BSP_DEFAULT_IO_OPEN_MODE                          (pointer) (IO_SERIAL_RAW_IO /* | IO_SERIAL_NON_BLOCKING*/ )
#endif

 


 

my code

    // read from ittyf and write to ittye(default console)

    fd = fopen ("ittyf:", (pointer) (IO_SERIAL_RAW_IO));
    for (;:smileywink:
    {
        i=fread(&data, 1, 1, fd);
        if :smileyinfo: putchar(data);

    }


 

0 项奖励
1 解答
556 次查看
mohwaqas12
Contributor III

I had the similar problem. Try compiling psp and bsp both debug and release libraries. It should work.

Also UART4 that is TTYE had pinouts at a differnet port as given on schematics. Check out _bsp_serial_io_init function in init_gpio.c file . It should give you some clue where TTYE pinouts are connected.

在原帖中查看解决方案

0 项奖励
2 回复数
557 次查看
mohwaqas12
Contributor III

I had the similar problem. Try compiling psp and bsp both debug and release libraries. It should work.

Also UART4 that is TTYE had pinouts at a differnet port as given on schematics. Check out _bsp_serial_io_init function in init_gpio.c file . It should give you some clue where TTYE pinouts are connected.

0 项奖励
556 次查看
bugs
Contributor III

Thanks for the reply.

It works now after I rebuilt the all the projects

0 项奖励