URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [hello-uart/] [README.txt] - Rev 1769
Go to most recent revision | Compare with Previous | Blame | View Log
README hello-uartThis directory originates from the hello-uart[1].tar.gz that was attached to theopenrisc-forum message 2003/06/00075(http://www.opencores.org/forums/openrisc/2003/06/00075)The reason why I put it on the openrisc repository is because I'm experiencing troublesdownloading the attachment. Also because in the past this program was a verygood starting point for me to start programming the openrisc.ORIGINAL MESSAGE:From: "Damjan Lampret" <lampret@o... >Date: Sat, 14 Jun 2003 22:40:58 -0700Subject: Re: [openrisc] setting the stall bit using GDBMichael,try the following, source files attached (it should run on or1ksim or onyour board assuming your SoC on the board uses addresses in board.h, changeboard.h as needed):First build the demo (see attached tgz). If you have all the tools installedyou can build it using:make clean allFile hello.or32 should be built. Now start jp1-xilinx utility:./jp1-xilinx 9999Instead of 9999, any other port address may be used. Then start GDB with ourexample:or32-rtems-gdb hello.or32Then load the hello.or32 file onto the board, using gdb:(gdb) target jtag jtag://localhost:9999(gdb) loadNow program is loaded and we can start it. Before doing that we must connectserial port cable to our board, start serial port program (e.g. minicom) andset baud rates (default 9600 8N1 in board.h). OR1k has reset vector locatedat 0x100. We will simulate reset using:(gdb) set $pc=0x100(gdb) continueHello World!!! should be printed on terminal. Instead of just continuecommand under gdb we can experiment more with next, step, nexti, stepi,break and others like print:(gdb) set $pc = 0x100(gdb) break uart_putc(gdb) c(gdb) next(gdb) print cInstead of using command line debugging with gdb we can also use DataDisplay Debugger. Start it with:ddd --debugger or32-uclinux-gdb hello.or32 &Same commands as above can be entered in console below. After program isloaded with:(gdb) target jtag jtag://localhost:9999(gdb) load(gdb) set $pc=0x100We can set breakpoint with mouse clicks and step using step/next buttons.Program can be run with continue button. We can set watchpoints, observedata in Data Display Window or simply by moving mouse over the variable.You can play a bit with hello.c file, e. g. by changing case of enteredcharacters.regards,Damjan----- Original Message -----From: <Michael@M... >To: <openrisc@o... >Sent: Tuesday, June 10, 2003 2:45 PMSubject: [openrisc] setting the stall bit using GDB> Can someone spare a minute to give a pointer for using GDB? My setup> includes the OR32 processor running on a Xilinx XCV1000, with some> SRAM and a UART attached to it. The Debug unit is compiled into the> core, and I am using a linux box as the host for GDB. We are using the> XIlinx Parallel-III JTAG cable, and it's attached to the TDI, TDO, TMS,> and TCK lines.>> So my question is, what GDB command do I use to send the stall/un-> stall commend to the TAP?>> Thanks,> Michael McAllister>>hello-uart[1].tar.gz
Go to most recent revision | Compare with Previous | Blame | View Log
