New PNUT.EXE loads all 128KB of Hub RAM
cgracey
Posts: 14,151
I modified PNUT.EXE so that it loads all 128KB of Hub RAM and then executes the PASM program at $E80 in Cog 0. Use F11 to load all 128KB RAM, instead of F10 which just loads 2KB at $E80.
It is necessary to space your PASM code to $E80 to step over the ROM area. This is done by starting your program off with:
For the DE0-Nano, it will be necessary to start off with 'orgh $18E80' to overcome the 4x memory wrap, due to having only 32KB.
Here's the new PNUT.EXE with example programs for both the DE2-115 and the DE0-Nano:
Prop2Full128k.zip
Note there are two new PASM directives, suggested by Sapieha:
ORGH address - fills hub RAM with $00 bytes up to hub location 'address'
ORGF address - fills cog RAM with $00000000 longs up to cog location 'address'
It is necessary to space your PASM code to $E80 to step over the ROM area. This is done by starting your program off with:
DAT orgh $E80 org <start of PASM code here>
For the DE0-Nano, it will be necessary to start off with 'orgh $18E80' to overcome the 4x memory wrap, due to having only 32KB.
Here's the new PNUT.EXE with example programs for both the DE2-115 and the DE0-Nano:
Prop2Full128k.zip
Note there are two new PASM directives, suggested by Sapieha:
ORGH address - fills hub RAM with $00 bytes up to hub location 'address'
ORGF address - fills cog RAM with $00000000 longs up to cog location 'address'
zip
320K
Comments
Thanks.
Now You can see that ORGH have be more usable
I have a DE0-Nano board and just tried the new PNUT program with your suggested header of
byte 0[$18E80]
org
This doesn't seem to work. If I remove the suggested line, programs load + run Ok at $E80.
This is using the F10 function in PNUT
Regards
Ooops! I forgot to mention that F10 does the same thing as before. It's F11 that loads the whole memory. Use F11.
BTW, any chance of getting a dud P2 to check PCB footprints against?, or at least a confirmation on the exact package details in case I've probably missed that.
Yes, I just implemented your ORGH and ORGF directives. They were needed badly. Thanks for thinking of these.
PM me your shipping address and I think we can send you a few duds.
THANKS.
I saw that long time ago -- As fast I started help Cluso with Debugger and tested some code for my Basic
Forgot to ask.
How long it is before You post that version with demo's?
The first post in this thread has the latest .zip with PNUT and the demo's.
Thanks
As You made Start at $E80.
Is it possible to add another start at $1000
Now I have tested both OrgH-F directives
Function correctly as expected.
Very much thanks
I have be thinking little -- and as always have impossible questions.
It is possible have one START XXXXX directive in PNut that auto-start loaded code from its XXXXX address ??
This will speed up the development cycle of some code I am working on immensely!!!
We can specify any address with these right?
As long I have tested -- Any address and as many nested OrgH-F as You need in code
It don't eliminate p2load YET -- and even if in some cases -- p2load still usable as it have much more Start-up possibility's
And it is always need for stand alone loader..
I like both
I will do something about this. I think if there are no PUB's or PRI's found in the source file, PNUT could operate in a PASM-only mode where a special directive could set the start address. I will add this after I get the Spin2 compiler functioning. Thanks for thinking of this.
I don't know yet, but it could be a long following the 128KB of data.
Thanks for understanding my intentions on that directive.
Chip I think that even if that directives are found --- It can be good if START XXXXXX can override them and start first INIT code (that in that case will be run and discard and placed at end of other code) for other things TYPE drivers that need be loaded before SPIN and then initialise SPIN interpreter.