I just got my A9 board - my first FPGA - yay! ... Umm, there isn't any instructions with it nor anywhere obvious on the forums.
When I power the board up and wait a while the line of eight dimly lit leds changes to a single brightly lit led at the end nearest the breadboard. This is the default config of a single detected Cog, right?
Loading in the latest A9 Prop2 image, with switch in PGM position, using: px.exe Prop123_A9_Prop2_v6.rbf /1 /P
I get action of tx, rx and conf status leds all flashing away while the progress bar on px.exe progresses, then that completes and a bit later the row of eight red leds changes back to the single bright led again.
Isn't this now meant to be lots (16?) of leds lit or flashing to show that more than the one Cog is available?
Not sure on the A9 as I don't have mine yet, but the DE2-115 and most other FPGA boards I've seen in the past have a program/run switch you need to set it to program then program the fpga then switch back to run. Hope this helps.
I just got my A9 board - my first FPGA - yay! ... Umm, there isn't any instructions with it nor anywhere obvious on the forums.
When I power the board up and wait a while the line of eight dimly lit leds changes to a single brightly lit led at the end nearest the breadboard. This is the default config of a single detected Cog, right?
Loading in the latest A9 Prop2 image, with switch in PGM position, using: px.exe Prop123_A9_Prop2_v6.rbf /1 /P
I get action of tx, rx and conf status leds all flashing away while the progress bar on px.exe progresses, then that completes and a bit later the row of eight red leds changes back to the single bright led again.
Isn't this now meant to be lots (16?) of leds lit or flashing to show that more than the one Cog is available?
That just shows that 1 cog is running. The other lights will turn on as other cogs start up. You need to slide that switch the PGM position and then use PNut.exe to compile and download.
You'll only see a single red LED until you load a program and start more cogs. Load the LED blink program via PNUT and you should see 8 red LEDs lit solid and the green ones should be blinking at different rates
It sounds like you did all the steps correctly so far.
Hehe, I've installed Lazarus and converted the px.exe sources over. There is a comport datatype error, TDCB, to be resolved but it seems to be pretty happy with converting the Delphi sources, which is neat really.
I've had no luck getting pnut to run under old or new Wine. Under new wine, px works and can find the serial port and load an image, CTL-G works from pnut but pnut will not load. BST and Propeller tool have the same problems. I've found no solution yet.
I thought the old P2hot pnut had worked wine, but that could be my fading memory talking.
That's been the only drawback to fpga testing - windows only club.
Pnut.exe Ctrl-G fails with "No hardware found on COM1 through COM9." Wine is generating one exception, which must be getting trapped, per port number but since there is no debug symbols it's all just numbers. At each and every exception the top entry in stack trace is: call_stack_handlers calling handler at 0x40a928 code=eedfade flags=1
Pnut.exe is loaded at 0x400000
PS: px.exe has the same COM1-9 requirement. And well, all comports have to be hand assigned in Wine so I've got COM1 setup pointing at the A9 board as per the successful earlier px.exe programming.
When I dug into it a while back, it seemed like there were two ways to open a com port in windows. My assumption was px does it one way which works and pnut does it the way that doesn't. After a couple days, I gave up and went to a windows system. Life is too short!
Hehe, I've installed Lazarus and converted the px.exe sources over. There is a comport datatype error, TDCB, to be resolved but it seems to be pretty happy with converting the Delphi sources, which is neat really.
Not that I've ever coded pascal before but I can't understand why freepascal would think ShowHelp is untyped.
If I comment out ShowHelp then FlashMode isn't having any issues with being assigned true and false. And if not declared then the error becomes: Identifier not found.
True and False are boolean, that's why the error is says "got boolean".
I've given myself more work ... I found newest stable Lazarus prebuilt for Ubuntu 14.04 and started updating but ran out of volume space! ... Have also learnt that moving the start of boot partition without rerunning the grub configs or something is a bit catastrophic. T'was lucky I got a warning from the resizer when it detected it was the boot volume.
Hehe, I've installed Lazarus and converted the px.exe sources over. There is a comport datatype error, TDCB, to be resolved but it seems to be pretty happy with converting the Delphi sources, which is neat really.
Well, I've resurfaced with a bit more knowledge of booting sequences and grub management and successfully repartitioned the boot/root volume without upset. Man, the live Ubuntu ISO is painfully slow! It might give me incentive to find a good specialised rescue ISO instead.
One thing I did as an insurance, before resizing, was to make a mirror of the root volume on another drive. That had it's own surprises - the linkages to the original volumes are very sticky! It's really weird when booted from the mirror, plug the original drive in while running the mirror and you're suddenly doubling up all the volume spaces. It didn't do any harm but I was then unable to unmount, which I needed to ... I had to keep going back to using the live ISO ...
My first hurdle, though, was the GPT. I managed to choose the hard road by selecting, for the mirror, the only drive with a GPT on it. This turned out to be oddly configured by not having a BIOS_Boot partition, which is a requirement when booting a GPT partitioned drive via BIOS rather than UEFI.
After all that, no improvement with latest Lazarus at all.
I've renamed ShowHelp to Show_Help, that's fixed. Must have been a name clash.
I'm down to just sorting the comms routines now. They simply need rewritten for Freepascal. I've grabbed the latest SynaSer unit stuff, it's meant to be the solution according to Mr google, but I'll pack it in for the night I think.
Lol, the insanity of living with little endian systems ...
The GUIDs in this table are written assuming a little-endian byte order. For example, the GUID for an EFI System partition is written as C12A7328-F81F-11D2-BA4B-00A0C93EC93B here, which corresponds to the 16 byte sequence 28h 73h 2Ah C1h 1Fh F8h D2h 11h BAh 4Bh 00h A0h C9h 3Eh C9h 3Bh – only the first three blocks are byte-swapped.
I've renamed ShowHelp to Show_Help, that's fixed. Must have been a name clash.
Yes, if you right click Show declaration, it finds ShowHelp as an aded procedure, in a Lazarus included unit.
I got this far in Windows Delphi -> Lazarus using the tools to convert.
Tools.Convert Delphi Project to Lazarus Project [1.2.0 FPC 2.6.2 Windows]
Options :
Cross Platform [Off]
Support Delphi [On]
Function Replacements [Disabled] << this seems worse if on (default).
Search-replace: ShowHelp -> ShowHelpL
(Reason: There is a ShowHelp Procedure defined in an added Lazarus unit )
* Converting file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PX.dpr *
Added defines -dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL in custom options
Found all unit files
* Fixing used units for file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PX.dpr *
*** Converting unit files belonging to project/package ***
* Converting file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PXUnit.pas *
* Converting file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PXHelp.pas *
*** Fixing used units and Repairing form files ***
* Repairing form file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PXUnit.lfm *
Removed property "TextHeight".
Removed property "OldCreateOrder".
* Fixing used units for file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PXUnit.pas *
* Repairing form file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PXHelp.lfm *
Removed property "TextHeight".
Removed property "OldCreateOrder".
Changed Top coord of TLabel from "52" to "50" inside TPanel.
Changed Left coord of TLabel from "8" to "6" inside TPanel.
Changed Top coord of TLabel from "32" to "30" inside TPanel.
Changed Left coord of TLabel from "8" to "6" inside TPanel.
Changed Top coord of TLabel from "10" to "8" inside TPanel.
Changed Left coord of TLabel from "8" to "6" inside TPanel.
* Fixing used units for file D:\..\Propeller_123_FPGA_A9\PX - Delphi Source\PXHelp.pas *
Conversion took: 00:00:04
Conversion Ready.
Build:
PXUnit.pas(109,37) Hint: Local variable "AlteraFileName" does not seem to be initialized
PXUnit.pas(111,37) Hint: Local variable "MemoryFileName" does not seem to be initialized
PXUnit.pas(296,42) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
PXUnit.pas(307,56) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
PXUnit.pas(426,66) Hint: Local variable "BytesWritten" does not seem to be initialized
PXUnit.pas(10,12) Hint: Unit "messages" not used in PXUnit
Project "PX" successfully built
This patch fixes the (self imposed) COM1..9 limit in Windows :
if (s[1] = '/') then begin
if s[2] = 'P' then FlashMode := True
else if (s[2] in ['1'..'9']) then CommPort := 'COM' + Copy(s,2,3) //COM1..999, tested on COM6 & COM57
else ErrorAbort('Invalid /? parameter.');
end
Comments
That sounds like a challenge!
BTW the A9 build shows 1024K of HUB (according to Ctrl-G)
I was just keeping it real!
No point in people developing "awesome" that won't run on the real chip!
Please limit your real applications to 512KB!
When I power the board up and wait a while the line of eight dimly lit leds changes to a single brightly lit led at the end nearest the breadboard. This is the default config of a single detected Cog, right?
Loading in the latest A9 Prop2 image, with switch in PGM position, using: px.exe Prop123_A9_Prop2_v6.rbf /1 /P
I get action of tx, rx and conf status leds all flashing away while the progress bar on px.exe progresses, then that completes and a bit later the row of eight red leds changes back to the single bright led again.
Isn't this now meant to be lots (16?) of leds lit or flashing to show that more than the one Cog is available?
That just shows that 1 cog is running. The other lights will turn on as other cogs start up. You need to slide that switch the PGM position and then use PNut.exe to compile and download.
It sounds like you did all the steps correctly so far.
Welcome to the club!!
I thought the old P2hot pnut had worked wine, but that could be my fading memory talking.
That's been the only drawback to fpga testing - windows only club.
Pnut.exe is loaded at 0x400000
PS: px.exe has the same COM1-9 requirement. And well, all comports have to be hand assigned in Wine so I've got COM1 setup pointing at the A9 board as per the successful earlier px.exe programming.
These links may help - older, but sound relevant
http://forum.lazarus.freepascal.org/index.php?topic=4244.0
includes a link to
http://www.turbocontrol.com/simpleserial.htm
the date tags are older, but I see a 2.6.0 release which is more recent.
I also see FPC is now at 3.0.0
http://www.freepascal.org/news.var
Check this out. I get the error "PXUnit.pas(85,15) Error: Incompatible types: got "Boolean" expected "untyped"" from the following line: which has prior unit declaration of:
Not that I've ever coded pascal before but I can't understand why freepascal would think ShowHelp is untyped.
If I comment out ShowHelp then FlashMode isn't having any issues with being assigned true and false. And if not declared then the error becomes: Identifier not found.
usually as not false...
Enjoy!
Mike
I've given myself more work ... I found newest stable Lazarus prebuilt for Ubuntu 14.04 and started updating but ran out of volume space! ... Have also learnt that moving the start of boot partition without rerunning the grub configs or something is a bit catastrophic. T'was lucky I got a warning from the resizer when it detected it was the boot volume.
Where did you find the px.exe sources ?
One thing I did as an insurance, before resizing, was to make a mirror of the root volume on another drive. That had it's own surprises - the linkages to the original volumes are very sticky! It's really weird when booted from the mirror, plug the original drive in while running the mirror and you're suddenly doubling up all the volume spaces. It didn't do any harm but I was then unable to unmount, which I needed to ... I had to keep going back to using the live ISO ...
My first hurdle, though, was the GPT. I managed to choose the hard road by selecting, for the mirror, the only drive with a GPT on it. This turned out to be oddly configured by not having a BIOS_Boot partition, which is a requirement when booting a GPT partitioned drive via BIOS rather than UEFI.
I've renamed ShowHelp to Show_Help, that's fixed. Must have been a name clash.
I'm down to just sorting the comms routines now. They simply need rewritten for Freepascal. I've grabbed the latest SynaSer unit stuff, it's meant to be the solution according to Mr google, but I'll pack it in for the night I think.
Two options to very seriously improve this:
1. On boot, specify the load in RAM option. It's another half minute to minute for it to load, but then you can use it.
2. Boot from a USB flash device. Any of them will trounce optical media, but the faster the better.
Doing either one of these is like night and day in terms of overall usability.
Yes, if you right click Show declaration, it finds ShowHelp as an aded procedure, in a Lazarus included unit.
I got this far in Windows Delphi -> Lazarus using the tools to convert.
Thanks!
This patch fixes the (self imposed) COM1..9 limit in Windows :