Cluso's RetroBlade2 - Your board(s) have arrived, so what to do next
Cluso99
Posts: 18,069
This thread is for discussion about how to use your RetroBlade2.
For specs, features, or ordering, please see/use this thread
forums.parallax.com/discussion/172262/clusos-retroblade2-single-chip-computer-first-orders-paid-and-shipped-taking-new-orders-payment/p1
Currently there are two build variants of my board - one has a Flash chip fitted/soldered and the other doesn't. They both use the same pcb. You choose whether or not to fit the VGA connector.
Power Supply
You will need to provide 5V regulated (and GND) to the board. The board has regulators fitted to reduce this to the 3V3 and 1V8 supplies required. This is limited to somewhere over 500mA. Do not expect to be able to highly overclock or push the P2 to its' absolute limits with this board design. Expected normal use should be fine. The regulators and the P2 chip can get quite hot so ensure adequate ventilation around the board.
The board can be powered from one of the following connections, but be careful to only provide one source as they are all wired in parallel - USB header J4, header J1 (with P00-15), header J3 (with P32-47), microUSB J5, and microUSB J6. I power my board from my PC over USB header J4 without problems. You can use a phone power supply as long as it can provide 500mA or more, depending on you use.
microSD
You can boot directly from the microSD card. It (preferably) requires a later SDHC or SDXC microSD card formatted with FAT32. Just copy a P2 binary file to the microSD and name it "_BOOT_P2.BIX" (upper case matters). Then when powering up your board it will load and run this file. Older SD or SDHC cards 4GB and smaller typically use the old byte addressing mode and generally will not be compatible with software drivers for the P2. Newer SDXC cards are often formatted with XFAT and again generally are not compatible with software drivers for the P2, so you will need to reformat these to FAT32.
Flash
You can boot directly from Flash (if fitted). To do so will require a pullup on the CS line. A pullup is provided on the board, together with a link. You will need to solder the provided 1x2 0.050" header pins to the board, and use the provided 0.050" jumper to enable the pullup resistor to boot from Flash.
USB-Serial
The 1x6 pin header (J4) is arranged to be compatible with the cheap fleabay USB-TTL 6pin CP2102 board. See the post below for how I connect my board. (see post #47 for max 921_600 baud)
VGA
The VGA connection is optional. If the optional VGA is supplied mounted to your board, it is not soldered. You can remove it easily by slightly squeezing the mounting lugs with slight pressure removing the VGA connector and it will pop off without damage. Dry fitting the VGA connector makes it for safer posting.
Under the VGA connector is provision for mounting a 1x16 0.1" header for access to P16-31.
For specs, features, or ordering, please see/use this thread
forums.parallax.com/discussion/172262/clusos-retroblade2-single-chip-computer-first-orders-paid-and-shipped-taking-new-orders-payment/p1
Currently there are two build variants of my board - one has a Flash chip fitted/soldered and the other doesn't. They both use the same pcb. You choose whether or not to fit the VGA connector.
Power Supply
You will need to provide 5V regulated (and GND) to the board. The board has regulators fitted to reduce this to the 3V3 and 1V8 supplies required. This is limited to somewhere over 500mA. Do not expect to be able to highly overclock or push the P2 to its' absolute limits with this board design. Expected normal use should be fine. The regulators and the P2 chip can get quite hot so ensure adequate ventilation around the board.
The board can be powered from one of the following connections, but be careful to only provide one source as they are all wired in parallel - USB header J4, header J1 (with P00-15), header J3 (with P32-47), microUSB J5, and microUSB J6. I power my board from my PC over USB header J4 without problems. You can use a phone power supply as long as it can provide 500mA or more, depending on you use.
microSD
You can boot directly from the microSD card. It (preferably) requires a later SDHC or SDXC microSD card formatted with FAT32. Just copy a P2 binary file to the microSD and name it "_BOOT_P2.BIX" (upper case matters). Then when powering up your board it will load and run this file. Older SD or SDHC cards 4GB and smaller typically use the old byte addressing mode and generally will not be compatible with software drivers for the P2. Newer SDXC cards are often formatted with XFAT and again generally are not compatible with software drivers for the P2, so you will need to reformat these to FAT32.
Flash
You can boot directly from Flash (if fitted). To do so will require a pullup on the CS line. A pullup is provided on the board, together with a link. You will need to solder the provided 1x2 0.050" header pins to the board, and use the provided 0.050" jumper to enable the pullup resistor to boot from Flash.
USB-Serial
The 1x6 pin header (J4) is arranged to be compatible with the cheap fleabay USB-TTL 6pin CP2102 board. See the post below for how I connect my board. (see post #47 for max 921_600 baud)
VGA
The VGA connection is optional. If the optional VGA is supplied mounted to your board, it is not soldered. You can remove it easily by slightly squeezing the mounting lugs with slight pressure removing the VGA connector and it will pop off without damage. Dry fitting the VGA connector makes it for safer posting.
Under the VGA connector is provision for mounting a 1x16 0.1" header for access to P16-31.
Comments
These are the jumpers that may be required to make your board work.
Red = jumper to enable booting from Flash (if fitted)
Green = jumper to enable the onboard transistor reset circuit
Blue = jumper to bypass the the onboard transistor reset circuit (eg when using a PropPlug)
USB-Serial
This is my suggestion for connecting to your PC using the USB-Serial 6pin CP2102 (USB-A full size) converter...
USB-serial board
https://ebay.com/itm/6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC-Replace-Ft232-Module/401092508083?hash=item5d62f9f9b3:g:2aQAAOSw0kNXhzR7
* Remove the 6pin male header by removing one pin at a time. ie heat a pin and remove with pliers. The heated pin will slide out of the plastic surrounds.
* Using my provided 1x6 pin female header with extended male pins
o Remove the plastic spacer under the female plastic - easy as it slides off (keep this for later)
* now solder the female header onto the USB-serial board with female on the top. Careful when soldering to only solder right at the pcb as you do not want solder wicking up the pins.
* now slip the spacer over the pins (saved above) half way up the pins. This provides support for the pins, although not absolutely necessary.
RetroBlade2
* fit the transistor reset enable link (wire) on your RetroBlade2 (shown in green)
* solder the provided 1x6 female header (normal short pins) to your RetroBlade2
Here is my P2 OS in its' current state of development. Its' definately not ready for prime time but you can give it a go. Don't bother reporting bugs as it's nowhere near this stage yet.
See top post for link to latest working version.
Compile and download with
f2 os228c
DIR, VER, HELP and a few others.
Cluso's Z80/CPM emulation
27 Nov 2021 update - new thread with latest code (15Jan2021)
https://forums.parallax.com/discussion/174087/clusos-z80-emulation-for-retroblade2-p2/p1
Now uses 8*8MB HDD emulated CPM files.
Again. not ready for prime time. Unzip and copy the files from the cpm-2020-12-15.zip to the microSD card (formatted as FAT32).
Then download the compiled binary with
L2 Z055D
MBASIC is on E: so do this after downloading (use caps lock on your keyboard)
Cluso's Propeller OS (v2.43) - includes SD Driver and FAT32 Object plus Serial Driver
forums.parallax.com/discussion/173395/clusos-propeller-os-v2-38-includes-sd-driver-and-fat32-object-plus-serial-driver
Using the ROM Monitor and TAQOZ for proof of life
forums.parallax.com/discussion/comment/1509202/#Comment_1509202
1.44in 128x128 color LCD - clock face
forums.parallax.com/discussion/comment/1509348/#Comment_1509348
4.0in TFT SPI 480x320 LCD ST7796 Driver
forums.parallax.com/discussion/172370/4-0in-tft-spi-480x320-lcd-st7796-driver#latest
P2 Hosted USB Keyboard/Mouse using GarryJ's object
https://forums.parallax.com/discussion/comment/1509532/#Comment_1509532
VGA
forums.parallax.com/discussion/comment/1509501/#Comment_1509501
Testing the RetroBlade2
forums.parallax.com/discussion/comment/1511156/#Comment_1511156
Testing the Flash (using TAQOZ)
forums.parallax.com/discussion/comment/1510208/#Comment_1510208
Discovered this morning that pnut35b is not finding and/or properly downloading/running to the RetroBlade with USB-Serial CP2102 and transistor reset enabled. It's under investigation. Flexprop/loadp2 v5.0.2 is working just fine.
I finally got my serial2USB boards in on the slow boat from China, but I can't seem to get either to work.
I used to be able to talk to it with just SO SI 5V and GND from anther usb2serial adapter, and didn't provide any connection to RST. I used minicom -D /dev/ttyUSB0 and just did ">"<space><esc> sequence to get it to autobaud and go into TAQOZ. Is there something I have to do different now that I have the correct adapter?
Doesn’t seem to happen using flexprop and loadp2 using the cheapie CP2102 USB with the transistor reset enabled.
I haven't had a problem with having to reboot my laptop (I run a variant of debian), but I have had to pull the usb and plug it in again. It works pretty good all the way up to 4m baud on the current board I use, which shows up as:
Bus 003 Device 041: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Note, I provide power through this adapter as well, which works well as it is. Though I haven't played with SPI flash or microSD yet. I'm learning TAQOZ and the monitor, so powering the board through the serial module works pretty good. This might be my problem with the cp2102 boards you suggested. Maybe they don't provide enough power.
STEP 1) Solder 1x6 (0.1") female header for CP2102 USB<>TTL converter
COMMENT: This header seems lower height than common ones. The CP2102 seems to move once plugged in.
STEP 2) Press fit 1x2 (0.05") male pin header with jumper on 'Q' position
COMMENT: I was wondering why was not a 1x3 male pin header included instead. And later found that PCB footprint is different. It doesn't fit. So instead of soldering jumper I did mechanical press fit.
STEP 3) Connect USB<>TTL converter and open terminal (minicom -D /dev/ttyUSB0)
STEP 4) Press the following keys: '>', then (space), and then (ESC)
!!! GREAT, THANK YOU ALL !!!
STEP 5) WORDS, reset, help (ok, no help)
STEP 6) Take a MicroSD card and extract 'OS228c-2020-12-15A.zip' into it. Then plug SD card and see what happens:
Uh! Nothing happened.
STEP 7) OK. lets see what TAQOZ says about SD:
Doesn't seems good.
STEP 8) OK. lets format with FAT32, and try again.
NO BOOT, again.
What TAQOZ says:
STEP 9) OK. Lets try again a format with Windows10 in FAT32, and check again: NO BOOT.
What TAQOZ says?
********************
FAT32 (from Win 10)
********************
What TAQOZ says about SD Card:
What does my PC says?
No. The 2x1 0.050" header plus shunt is for the Flash enable. When I originally designed the pcb I did not have space for the transistor reset jumpers to be 1x3 at 0.050" pitch. It was meant to be a permanent link because users are not likely to switch between a PropPlug and a CP2102 USB dongle. Later I widened the board but I didn't think to make the header suit 0.050".
There is a TAQOZ thread for using TAQOZ.
You need to format (if not already formatted) the SD Card as FAT32 with 32KB clusters before copying any files. Peter says there is a problem with windoze formatting the cards correctly but I have not seen a problem. However, your card must use sector addressing which means that it should be at least 4GB (not a guarantee tho), BUT, if your card is more than 16GB it is likely formatted as exFAT and this does not work so you will have to reformat it as FAT32 and 32KB clusters.
However, from the TAQOZ dumps below, you haven't either...
1. Compiled and downloaded the code to your RetroBlade2 to run it.
2. Copied the binary to the SD as "_BOOT_P2.BIX". If you don't have this file (or "_BOOT_P2.BIY") in the root directory, nothing is going to run! These are the only two files that the P2 ROM will boot from. See the P2 ROM thread for more details.
forums.parallax.com/discussion/170637/p2-sd-boot-code-rev-2-silicon
About your P2 OS:
Why everybody needs to compile the code?
I guess that 'f2 os228c' will not work as expected if my system is running a system that is not Windows, right?
Isn't it easier that you just provide the '_BOOT_P2.BIX' binary file inside the .ZIP file?
When I look inside F2.bat I have this feeling that it just removes the os228c.binary file (that is already included!) and compiles it again. Can I just rename 'os228c.binary' to '_BOOT_P2.BIX' ?
(Card is a MicroSDHC Kingston Canvas Select Plus 16GB [Google: "SDCS2/16GB"] that was already factory formatted as FAT32, but with 8Kb cluster size)
If I do an update to the pcb (not expected any time soon tho) then I will change the header to 0.050" pitch and include 1x3 header and shunt.
I do not intend to hand solder any pins or connectors - that is up to the user. I could do it as a special for a price.
Some users may choose not to solder the 1x6 header, or even solder a male instead.
BTW I check the board by holding the CP2102 in the holes in the RetroBlade2 with one hand while typing etc with the other hand. It works for fully testing all I/O header pins around the pcb amongst other checks.
No. You take whatever binary you want and copy it, rename the copy "_BOOT_P2.BIX" and copy to the SD. You can use the OS, or the Z80 or anything else. it is totally up to you. That is why I provided the binaries.
Yes. That is the intention. My F2.bat deliberately deletes the binay before compilation. This way, if there is an error in compilation there will not be a binary present.
[/quote]
Many of us prefer to use SanDisk SD cards as they have proven reliable compared to a lot of other cards. Having said that, I haven't actually found a card that didn't work. It is preferable to have the card formatted with a cluster size of (at least) 32KB. Unless the card becomes fragmented then it doesn't really matter what the cluster size is. But some programs (including the boot ROM) take the view that the binary it is going to load is contiguous (ie not fragmented) and no checks are performed.
The software formatted the card to 32Kb cluster size (GUI did not allowed me to change the cluster size, maybe there is some option on the CLI. Didn't read the manual).
Finally found that the error was that I used "BOOT_P2.BIX" instead of "_BOOT_P2.BIX" (as written on forums.parallax.com/discussion/170637/p2-sd-boot-code-rev-2-silicon)
Pleased you have it sorted
I am thinking about something similar to MS-DOS debug.
I need a quick tutorial (reference, or cheatsheet). Something like this -> https://montcs.bloomu.edu/Information/LowLevel/DOS-Debug.html
I have found a way to be able to boot multiple files without the need to rename them to '_BOOT_P2.BIX'.
STEP 1) I load first into TAQOZ and show current directory:
Press '>', then (space), then (esc)
STEP 2) Jump to P2-Monitor (Load file and Run)
(on TAQOZ#) Press Ctrl-D.
NOTE: for some unknown reason I am not able to LOAD file 'BOOT_P2.BIX' but I can load 'OS228C~1.BIN'
Summary of used commands:
More info about P2-MONITOR commands here : http://forums.parallax.com/discussion/170638/p2-rom-monitor-debugger-rev-1-rev-2-silicon#latest
NOTE 1: I wonder if there is any way to easily transfer files from HOST computer to TAQOZ or P2-MONITOR (I am thinking about something similar to Kermit, ZMODEM, XMODEM, YMODEM, ...)
NOTE 2: Cluso OS228 'reboot' command is not working, and retroblade2 doesn't have reset button so It forces me to unplug USB cable and reconnect again.
Is there any other way to reset/reboot?
You can go straight to the monitor rather than via TAQOZ with “>” <space> Ctl-D.
You’re missing the first underscore in “R_BOOT_P2.BIX”
Once I get the OS working properly there will be a method to send a file from the pc to (and from) the sd in the P2. I still have many problems with the OS because the compilers cannot place code in hub at specific addresses when using spin2.
I believe that FlexProp has SD drivers that might be able to transfer files but I haven’t had time to look into it.
You can connect a reset switch across the reset line. I’ll look at it in the next day or so.
No. REBOOT is not implemented yet. Until I can get the compilers to work with letting parts stay resident in cog and hub a lot of commands are not working.
It is better to use file names with 8+3 characters rather than use the shortened 8+3 file name for long file names (the ones with “~” in the file name.
I didn't missed the underscore. If you look again, you will see that before Run command, the Load command (with underscore) failed (!). No big issue as the long name file can load and run.
Yes, I know some functions are already not implemented. I can wait. I will follow progress. It seems a nice OS.
Also, I have found a new TAQOZ file on the other thread (http://forums.parallax.com/discussion/comment/1509204/#Comment_1509204) and this one allowed me to see the SD Card .DISK information. It has many WORDS added into it, so maybe it could even have some way to transfer files already. (but It's a pity that the embedded P2 TAQOZ ROM doesn't work.)
You can reset the RetroBlade2 from the terminal program on the pc by toggling DTR. I use PST (Parallax Serial Terminal) and toggle DTR to reset the board.
You can also connect a reset switch (momentary) between GND and JP2-1 (pin 1 square pad of the 3pin reset connection = the bypass transistor side = transistor collector = P2 RST pin).
Running either PropellerTool 2.5.1 or PNut v35g, on RetroBlade2 versus a P2EV Rev C, DEBUG does not work on the RetroBlade2. Shouldn't the result be the same?
Here are examples of executing DEBUG_PLOT_HubRAM.spin2 (from the PNut samples):
P2EV:
RetroBlade2:
dgately
@dgately
Your results should be the same.
Looks like the serial speed (baud) is incorrect. Wonder if it is related to reset timing in pnut/PropTool ???
I've noted for some time that pnut (and probably PropTool) has incorrect timing often resulting in pnut not finding my board. I've asked Chip to change it but he hasn't. Not sure this part is related tho.
The one thing that is different on my RetroBlade2 is that I don't use a real propplug and I use the transistor reset on my board. The P2EVAL does not invert the DTR reset using the transistor circuit. Are you using a real propplug or the cheapie CP2102? If CP2102 I wonder if the baud Chip uses is too high and needs to be lowered?
I'm using a CP2102:
Same as I use. I haven't tried Chips debugger. I'll get to it shortly and see if I can find out why this doesn't work.
I'm having the same issue with my CP2102.
I can only run up to 921600 baud and then things get flaky.
IIRC debug runs at 2M baud so we fall short of that target speed.
It's not a cable issue either because the same cable runs fine at 3M
on my FTDI boards.
I had to modify the timing of one of my loaders to get CP2102 to work as their
seems to be a delay in the receive buffer handling, but reset timing remains unchanged.
A few years back I had issues using CP2102 with P1 which limited reliable loading
to 16K.