05-17-2008 12:30 PM
Dear Sir, I am trying to complie some bluwtooh libraries,
my code has
# include<termios.h>
it is located at C:\EDK\gnu\microblaze\nt\microblaze\sys-include and its content is
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/termios.h>
#ifdef __cplusplus
}
#endif
I checked that -- sys directory which is C:\EDK\gnu\microblaze\nt\microblaze\sys-include\sys
but this do not contain any file named termios.h
due to this i am gatting a error in compilation
In file included from lwbt-src/uartif.c:15:
/cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/sys-include/termios.h:4:25: sys/termios.h: No such file or directory
may you help me,
I am also getting a error like
lwbt-src/uartif.c:30: error: storage size of 'oldtio' isn't known
lwbt-src/uartif.c:30: error: storage size of 'newtio' isn't known
bacause my uartif.c file has
struct termios oldtio, newtio;
and it is unable to detect the class termios
Thanks
Narendra Sisodiya
05-18-2008 09:50 PM
Hi,
Since I am during a business trip now, I cannot actually try, but a console and UART could be used by the following ways.
If you are using MicroBlaze, mdm (MicroBlaze Debug Module) should already exist.
There is a feature compatible with UARTLITE in mdm, and it can be used as a console through platform cable IV or USB.
1. Debug - Launch XMD of the EDK menu is chosen and a XMD console is opened.
2. Connect to the MDM uart in the XMD console, by typing in connect mdm -uart
3. Open a TCP terminal tunnel in XMD, by typing in terminal -jtag_uart_server 4321
4. Connect a hyperterminal session via TCP/IP to localhost:4321 (4321 is the TCP terminal port opened by in the previous step). This establishes a connection to the JTAG UART, tunneled via TCP/IP by XMD. Thus there can be two hyperterminal window
open, displaying output from the each UART.
It could output to each UART by the following source codes.
#include "xparameters.h"
#include "xuartlite.h"
XUartLite UartLite0, UartLite1;
main()
{
XUartLite_Initialize(&UartLite0, XPAR_UARTLITE_0_DEVICE_ID);
XUartLite_Initialize(&UartLite1, XPAR_UARTLITE_1_DEVICE_ID);
XUartLite_Send(&UartLite0, "Hello UART0\n", 12);
XUartLite_Send(&UartLite1, "Hello UART1\n", 12);
}
If MDM uart is not used, you have to connect a RS232C line driver like MAX3232 chip to the external pin header of ML402
board separately. Refer to the 12 pages of the ML402 Schematics for the connection way of the MAX3232 line driver IC.
It is because the GPIO pin of FPGA must change RS232 signal by the conversion IC of voltage to +-12v since it is 2.5v-3.3v.
Best Regards,
Yoshio Kashiwagi - Nissin Systems
05-17-2008 09:40 PM
05-17-2008 11:59 PM
Hi,
I did not sure your situation immediately.
You are going to operate lwBT on Xilinx Standard CLibrary+lwIP of EDK.
Xilinx Standard CLibrary is the library of the newlib base, since newlib is not surely had in termios originally,
a termios feature cannot be used. Since uartif.c of lwBT is a wrapper function for UART port input and
output, it needs the correction which makes uartif.c fit an EDK library.
xuartlite library is used if your UART is UARTLITE or xuartns550 library is used if your UART if NS550.
The following detailed documents have a library list.
http://www.xilinx.com/ise/embedded/xilinx_drivers.pdf
Best Regards,
Yoshio Kashiwagi - Nissin Systems
05-18-2008 09:59 AM
Yes -- I exactly want ""You are going to operate lwBT on Xilinx Standard CLibrary+lwIP of EDK."
Thanks for suggesion,, i am reading the files & mannuals to port uartif.c file
one thing i am not getting,,,, I use RS232 port for stdin and stdout,,
not my system will send data (hci packets) over this uart connections,
but suppose i use print ("hello commnad") in my application how i can display on hyperterminal ,
I think i need two uart , one for std in out for messages which will be displayed on PC and another for bluetooth kit conection,
But how i can invoke two serial uat in my design, My base system builder shows one one uart at a time,,,
do i need to copy paste the configuration of 1st uart in mhs file and chaing the Instance name + base address will work??
I have ML402 kit.
05-18-2008 09:50 PM
Hi,
Since I am during a business trip now, I cannot actually try, but a console and UART could be used by the following ways.
If you are using MicroBlaze, mdm (MicroBlaze Debug Module) should already exist.
There is a feature compatible with UARTLITE in mdm, and it can be used as a console through platform cable IV or USB.
1. Debug - Launch XMD of the EDK menu is chosen and a XMD console is opened.
2. Connect to the MDM uart in the XMD console, by typing in connect mdm -uart
3. Open a TCP terminal tunnel in XMD, by typing in terminal -jtag_uart_server 4321
4. Connect a hyperterminal session via TCP/IP to localhost:4321 (4321 is the TCP terminal port opened by in the previous step). This establishes a connection to the JTAG UART, tunneled via TCP/IP by XMD. Thus there can be two hyperterminal window
open, displaying output from the each UART.
It could output to each UART by the following source codes.
#include "xparameters.h"
#include "xuartlite.h"
XUartLite UartLite0, UartLite1;
main()
{
XUartLite_Initialize(&UartLite0, XPAR_UARTLITE_0_DEVICE_ID);
XUartLite_Initialize(&UartLite1, XPAR_UARTLITE_1_DEVICE_ID);
XUartLite_Send(&UartLite0, "Hello UART0\n", 12);
XUartLite_Send(&UartLite1, "Hello UART1\n", 12);
}
If MDM uart is not used, you have to connect a RS232C line driver like MAX3232 chip to the external pin header of ML402
board separately. Refer to the 12 pages of the ML402 Schematics for the connection way of the MAX3232 line driver IC.
It is because the GPIO pin of FPGA must change RS232 signal by the conversion IC of voltage to +-12v since it is 2.5v-3.3v.
Best Regards,
Yoshio Kashiwagi - Nissin Systems
05-19-2008 04:09 AM
Thanks a lot,
I have just tested it and worked fine.
I have followed the apporach to get display of print("asdfsdf") ; commnad on hyperterminal via tcp port 4321
I did this
* download bitstream
* Launch XMD
* apply this commnd
** terminal -jtag_uart_server 4321
* use teraterm to connect "localhost" with tcp/ip port 4321
* Again download the bit steram
still experimenting some more things
Thanks for your help, I am putting my notes here --> http://narendra.scribblewiki.com/Hello_World_on_ML402_with_debug_module
PS: for me connect mdm -uart was not required (i do not know why)