Absolutely the specific location is irrelevant (pun intended) but it is the same idea. As you noted, it works a lot better than LED's!
Congrats about getting C running!
I look forward to trying it.
While C is starting to work, it's cumbersome to build a program to run on the P2 since we haven't added options to propeller-elf-gcc to select P2 code generation yet. It is currently necessary to use the gcc "-nostdlib" "-Xassembler -p2" options when compiling and linking and provide all of the support modules like crt0_lmm.s, crtbegin.s, and crtend.s explicitly. This actually has the advantage that you can easily change crt0_lmm.s which contains the LMM kernel and rebuild without having to mess with building a new version of GCC every time. However, it's awkward if you just want to compile and run C programs. I'll work on a better way.
Based on your description it is waaaay to early for me to play with - I'll keep an eye on this thread to monitor your progress, and please let me know when it is less awkward
While C is starting to work, it's cumbersome to build a program to run on the P2 since we haven't added options to propeller-elf-gcc to select P2 code generation yet. It is currently necessary to use the gcc "-nostdlib" "-Xassembler -p2" options when compiling and linking and provide all of the support modules like crt0_lmm.s, crtbegin.s, and crtend.s explicitly. This actually has the advantage that you can easily change crt0_lmm.s which contains the LMM kernel and rebuild without having to mess with building a new version of GCC every time. However, it's awkward if you just want to compile and run C programs. I'll work on a bet
Is there some trick to reprogramming the DE0-Nano? I want to update to Chip's newest configuration file but Quartus doesn't seem to see my DE0-Nano board. I can see "USB Blaster" listed in the Windows device manager and it says it is operating correctly but Quartus doesn't seem to be able to see it. I did this operation successfully when I first programmed the DE0-Nano and I haven't changed my Quartus software since. Is there an additional step needed when reprogramming an already programmed board?
This happened to me too. I tried re installing drivers, changing USB ports. I even tried an actual USB Blaster. Only thing that fixed it was complete reinstall of Quartus 12.1. (or the programmer software)
This happened to me too. I tried re installing drivers, changing USB ports. I even tried an actual USB Blaster. Only thing that fixed it was complete reinstall of Quartus 12.1. (or the programmer software)
I just installed the programmer and now it seems to work. Thanks for the suggestion!
I have made a special version of PropTerminal for Propeller 2 testing. Just copy the Prop2Term.exe into the same directory as PNUT.exe. It is by default configured in the right mode and size for the P2 monitor. You only need to change the COM port (if it is not COM6): menu Options -> COM port. Then save it with File -> Save Settings, to make the COM setting permanent.
If you minimize PropTerminal it gives the COM port free, and you can download code from the PNUT, when you restore PropTerminal, by clicking it on the taskbar, it opens the COM port automatically.
This PropTerminal version has a special upload mode (Menu File -> Upload) which lets you load a *.obj file,
generated by PNUT.EXE, over the Write function inside the Monitor. So if you are in the Monitor, select upload and the OBJ file. The data gets written to hub ram and also the cogstart command is prepared. You only need to press return to start the code.
One of the special features of PropTerminal is the ability to show some simple graphics. I have used that to test some cordic instructions (the one I figured out with the little description we have).
The cordictest1.spin can generate sine, cosine and random data and writes it to the CLUT ram. Then the data in this ram gets drawn as a graph on PropTerminal. You can use this code as a framework for other tests, which profit from a graphical output.
have fun
Andy
Edit: Added version 0.2 of Prop2Terminal, which allows to define the target hubaddress for uploads of .OBJ files.
Have You possibility to made scroll buffer in it that give possibility to scroll back to save entire session -- Not only one screen?
Hello Sapieha
PropTerminal works with a graphic window, which makes it hard to scroll forth and back.
But if it is only for saving a short session the Copy Text, or Save Text in the File menu should work (they have an internal buffer with 32kB). Copy Text writes the session into the Clipboard, Save Text to a file.
PropTerminal works with a graphic window, which makes it hard to scroll forth and back.
But if it is only for saving a short session the Copy Text, or Save Text in the File menu should work (they have an internal buffer with 32kB). Copy Text writes the session into the Clipboard, Save Text to a file.
The readme.txt inside the official PropTerminal ZIPs, contain a description of all the commands. But this textfile is really a mess and should be redone one day.
So here is short extract of the most important commands:
$20..$FF = draw character (Prop1 ROM-font)
0 = clear screen
1 = home
5,md,x,y = graphic command, see later
8 = backspace
9 = tabulator (8 spaces)
10 = LF
12,colr = change color 1..15
13 = CR
Graphic modes:
5,0,x,y = set left top for box,circle,rbox
5,1,x,y = draw pixel at x,y
5,2,x,y = draw line to x,y (from prev point)
5,3,x,y = draw filled box x,y=right bottom
5,4,x,y = draw filled box XOR mode x,y=right bottom
5,5,x,y = clear area x,y=right bottom
5,7,x,y = draw filled circle x - prev.x = radius
5,8,x,y = draw rounded outlined box x,y=right bottom
5,12,x,y = set text cursor position x,y in chars
.
The readme.txt inside the official PropTerminal ZIPs, contain a description of all the commands. But this textfile is really a mess and should be redone one day.
So here is short extract of the most important commands:
$20..$FF = draw character (Prop1 ROM-font)
0 = clear screen
1 = home
5,md,x,y = grahic command, see later
8 = backspace
9 = tabulator (8 spaces)
12,colr = change color 1..15
Grahic modes:
5,0,x,y = set left top for box,circle,rbox
5,1,x,y = draw pixel at x,y
5,2,x,y = draw line to x,y (from prev point)
5,3,x,y = draw filled box x,y=right bottom
5,4,x,y = draw filled box XOR mode x,y=right bottom
5,5,x,y = clear area x,y=right bottom
5,7,x,y = draw filled circle x,y = center
5,8,x,y = draw rounded outlined box x,y=right bottom
5,12,x,y = set text cursor position x,y in chars
I ordered my DE0-Nano today. My son should have it tomorrow and I will get it from him Thursday I had to wait until I cleared the decks (pun intended - see my avatar) because I know this will consume many hours of fun and I needed to get some other things done first!
As a note: D.P. sent me a PM that I somehow missed until today. There is a set of drivers required for using the download as detailed by Peter.
Two DE0-nano-s and one DE2-115 here. Experimenting with yet another FPGA board as a peripheral for the nano. If Chips or Sapieha's I/O boards materialize, I'll go with those, expect these boards to get better driver support than I can make.
- PropPlug: programming & interacting with the monitor
- Parallax Serial Terminal: plays nice with pnut.exe
- SchoolBoard 2: breadboard + switches + lights to play with adding I/O devices
- OpenBench Logic Sniffer: timing analysis
Chip's monitor is fantastic for post-mortem analysis after I have the cog stop itself with the "back to monitor" code Chip posted.
@Bill, isn't it? Was working on P1 a little last night, and I missed having the thing.
Since we are mentioning gear, I'm using a scope to watch pin toggles and such for timing. Waiting for the I/O adapter board to arrive before I do much else.
DE0-Nano
PropPlug
PropGCC under Mac OS X
Windows XP running under Parallels on the Mac
p2load for loading programs larger than can be handled by PNut.exe
Also using p2load as a simple terminal emulator
I'm using this to do an initial port of PropGCC to P2. This mostly involves teaching the GNU assembler (gas) the P2 instruction set. Any GCC backend changes will probably wait for Eric. I've wanted to hook up some LEDs but I've been afraid of blowing up my DE0-Nano board by drawing too much current. All of my debugging so far has been through a serial connection.
I also have a DE2-115 board generously supplied by Parallax but I haven't had time to do much other than load the configuration file so far. I'm on the road now and expect to do more with it over the holiday break.
Comments
While C is starting to work, it's cumbersome to build a program to run on the P2 since we haven't added options to propeller-elf-gcc to select P2 code generation yet. It is currently necessary to use the gcc "-nostdlib" "-Xassembler -p2" options when compiling and linking and provide all of the support modules like crt0_lmm.s, crtbegin.s, and crtend.s explicitly. This actually has the advantage that you can easily change crt0_lmm.s which contains the LMM kernel and rebuild without having to mess with building a new version of GCC every time. However, it's awkward if you just want to compile and run C programs. I'll work on a better way.
If I know You need change it to programming mode (one strap)
Ugh. Yet again I find the answer after posting a dumb question. I needed to flip the "program/run" switch. Duh.
If you minimize PropTerminal it gives the COM port free, and you can download code from the PNUT, when you restore PropTerminal, by clicking it on the taskbar, it opens the COM port automatically.
This PropTerminal version has a special upload mode (Menu File -> Upload) which lets you load a *.obj file,
generated by PNUT.EXE, over the Write function inside the Monitor. So if you are in the Monitor, select upload and the OBJ file. The data gets written to hub ram and also the cogstart command is prepared. You only need to press return to start the code.
One of the special features of PropTerminal is the ability to show some simple graphics. I have used that to test some cordic instructions (the one I figured out with the little description we have).
The cordictest1.spin can generate sine, cosine and random data and writes it to the CLUT ram. Then the data in this ram gets drawn as a graph on PropTerminal. You can use this code as a framework for other tests, which profit from a graphical output.
have fun
Andy
Edit: Added version 0.2 of Prop2Terminal, which allows to define the target hubaddress for uploads of .OBJ files.
Nice
But I have one question?
Have You possibility to made scroll buffer in it that give possibility to scroll back to save entire session -- Not only one screen?
Great. I tried a quick test and it and everything worked for me. :cool:.
Thanks!
Bob
I've not done graphical output on the terminal at all. Thanks for the example.
Hello Sapieha
PropTerminal works with a graphic window, which makes it hard to scroll forth and back.
But if it is only for saving a short session the Copy Text, or Save Text in the File menu should work (they have an internal buffer with 32kB). Copy Text writes the session into the Clipboard, Save Text to a file.
Andy
I found that before You answered -- Still thanks for answer.
But -- What about -- Have one more option in Many ---- Log File --- If active - log all activity to <-> from terminal.
Next question have You in it Cursor control -- and if -- Can You support us with list of commands.
Thanks
Your welcome
Sapieha
The readme.txt inside the official PropTerminal ZIPs, contain a description of all the commands. But this textfile is really a mess and should be redone one day.
So here is short extract of the most important commands:
Andy
Thanks.
Why not place that in HELP menu ?
You need Cyclone IV board. There are two of them: DE0-nano or DE2-115.
As a note: D.P. sent me a PM that I somehow missed until today. There is a set of drivers required for using the download as detailed by Peter.
Do we want to put a count somewhere or maybe if people want a list of who and where?
Maybe a short list of anything you have connected for testing.
I'll start:
DE0-Nano, Ohio
4 LED's and a 7 segment LED + D.P. via 2 74HC04's, Lighted on Logic High.
C.W.
Location - Скалистые горы.
DE0-Nano with:
- PropPlug: programming & interacting with the monitor
- Parallax Serial Terminal: plays nice with pnut.exe
- SchoolBoard 2: breadboard + switches + lights to play with adding I/O devices
- OpenBench Logic Sniffer: timing analysis
Chip's monitor is fantastic for post-mortem analysis after I have the cog stop itself with the "back to monitor" code Chip posted.
- PropPlug: programming & interacting with the monitor
- Andy's terminal
- Papilio Pro , LogicStart, etc
Since we are mentioning gear, I'm using a scope to watch pin toggles and such for timing. Waiting for the I/O adapter board to arrive before I do much else.
BTW, I've written a good chunk of what will be a complete using the monitor reference here: http://forums.parallax.com/entry.php?1446-Using-The-P2-Monitor-Document-Updated It's totally useful now, with another update coming in a few days.
In the US you can get one quickly from here:
http://www.epictinker.com/Open-Workbench-Logic-Sniffer-p/obc101e1p.htm
I'm not affiliated with those guys, I just got really fast friendly service and like to reward that.
I haven't used it yet with the P2 but I have used it to do some SPI watching on the P1.
C.W.
DE0-Nano
PropPlug
PropGCC under Mac OS X
Windows XP running under Parallels on the Mac
p2load for loading programs larger than can be handled by PNut.exe
Also using p2load as a simple terminal emulator
I'm using this to do an initial port of PropGCC to P2. This mostly involves teaching the GNU assembler (gas) the P2 instruction set. Any GCC backend changes will probably wait for Eric. I've wanted to hook up some LEDs but I've been afraid of blowing up my DE0-Nano board by drawing too much current. All of my debugging so far has been through a serial connection.
I also have a DE2-115 board generously supplied by Parallax but I haven't had time to do much other than load the configuration file so far. I'm on the road now and expect to do more with it over the holiday break.