2 megabyte CODE memory for the Propeller
APStech-Attila
Posts: 38
Hi!
·I am working on extending the code memory size·of the propeller. The reason is there are several complex applications where it is very easy to separate the·application to several tasks.··(eg. application: simple scope with VGA·display.
··· - Main menu
··· - VGA bitmap display,
··· - VGA hi-res text display with measurement data,
··· - TTL analyzer with serial data analyzer,
··· - Sweep generator etc. etc.)
·Only the VGA display would consume 6600 longs, so not too much can fit beside VGA. If you want text/graphics the easiest solution should be exchanging the complete boot EEPROM and rebooting the Propeller. This is not an option for me .
·I would like to transfer (in assembly) 32kbyte EEPROM image from external memory (4 to 16 megabit FLASH) to the RAM and run the new code from the "secondary boot COG" assembly. (It is possible to reserve a few words for intertask data transfer at the end of internal·RAM)·Naturally I will stop all cogs during bootload, and there will be no uncontrolled write/SPIN code execution during "secondary boot".
· Hope Chip can give us a hint how the first SPIN token gets executed after "primary boot" with the ROM·bootloader.
·Thanks
·· Attila
Post Edited (Attila) : 7/14/2006 11:47:07 AM GMT
·I am working on extending the code memory size·of the propeller. The reason is there are several complex applications where it is very easy to separate the·application to several tasks.··(eg. application: simple scope with VGA·display.
··· - Main menu
··· - VGA bitmap display,
··· - VGA hi-res text display with measurement data,
··· - TTL analyzer with serial data analyzer,
··· - Sweep generator etc. etc.)
·Only the VGA display would consume 6600 longs, so not too much can fit beside VGA. If you want text/graphics the easiest solution should be exchanging the complete boot EEPROM and rebooting the Propeller. This is not an option for me .
·I would like to transfer (in assembly) 32kbyte EEPROM image from external memory (4 to 16 megabit FLASH) to the RAM and run the new code from the "secondary boot COG" assembly. (It is possible to reserve a few words for intertask data transfer at the end of internal·RAM)·Naturally I will stop all cogs during bootload, and there will be no uncontrolled write/SPIN code execution during "secondary boot".
· Hope Chip can give us a hint how the first SPIN token gets executed after "primary boot" with the ROM·bootloader.
·Thanks
·· Attila
Post Edited (Attila) : 7/14/2006 11:47:07 AM GMT
Comments
Well, if you write an assembly to use the i2c protocall from the flash into ram (which is what I think your talking about), Just exclude the ram where your "intertask data" is kept at.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
It's got something to do with the return address thats set into your assembly code that will cause it to start executing when your assembly ends
... I'm fairly sure of this, but not 100%...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
'
' Start up oscillator and begin Spin program at $0010
' (assumes EEPROM data already loaded into $0000-$7FFF)
' (assumes currently running RCFAST oscillator)
' (assumes this is COG 0 - gets rebooted)
'
······················· rdbyte· address,#$0004········· 'if xtal/pll enabled, start up now
······················· and···· address,#$F8··········· '..while remaining in rcfast mode
······················· clkset· address
:delay················· djnz··· time_xtal,#:delay······ 'allow 20ms @20MHz for xtal/pll to settle
······················· rdbyte· address,#$0004········· 'switch to selected clock
······················· clkset· address
······················· coginit interpreter············ 'reboot cog with interpreter
time_xtal·············· long··· 20 * 20000 / 4 / 1····· '20ms (@20MHz, 1 inst/loop)
interpreter············ long··· $0001 << 18 + $3C01 << 4 + %0000
address················ res···· 1
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
But there was something about the return address in the assembly... really... I'm not ...
Maybe that was returning to the existing spin program from assembly...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey (Parallax)) : 7/15/2006 3:41:13 PM GMT
What is the meaning of the PAR value for the interpreter ($0001<<2 here)? Is it simply the address of the CLKSET value? Are there other "useful" values passed. I assume that when someone does a SPIN cognew(), there's an initialized stack (with any parameters pushed and a return to a cogstop(cogid)) with an initial stack address and an entry point address. Anything else?
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
kinda like pbasic "cat var W12"
the only problem I can see with it would be if you used the end it could possibly get clobbered by an active stack
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
Has anybody, or is someone thinking of useing the low power SD data logger to fetch memory for any·cogs to read,·just throwing ideas out there?
The SD Data Logger @ ··http://www.sddatalogger.com/
????
Rob7
By useing it for extra text storage: ie EEPROM data, the possibilities may·be endless. It would make for some interesting experiments ?
Rob7
I'm waiting for delivery of a USBwiz which is on backorder until early August. That's a general purpose interface for SD/MMC cards and USB devices like "thumb drives". It does have the ability to interface via SPI and I2C as well as asynchronous serial. I suspect I'll use I2C since that way I'll need only one driver, it's high speed, and clocked (for reliability at high speeds), yet it uses only 2 pins that, if they were accessible on the demo board, could be shared with the boot EEPROM.
In the meantime, I've got a bunch of 64Kx8 EEPROMs I can use to experiment with an overlay loader system.
Included in the archive is a modified version of the i2cObject which is necessary to access the boot eeprom on the demo board (no pullup on the clock line). The standard i2cObject will work with the PropellorStick and "home-brew" systems with both pullups on the boot eeprom.
Next step is to redo the I2C object in assembly.
http://www.comfiletech.com/index.asp?PageAction=VIEWCATS&Category=7
Specifically- http://www.comfiletech.com/index.asp?PageAction=VIEWPROD&ProdID=79
· Anyone interested in bootloading @ 4MBPs? (code is up and running in less than 80msec!) Size of codespace? Nearly unlimited!
· You will only need a W25P40 SPI FLASH preloaded with BootEEPROM images, and the attached FLASH OS.spin! (50 Cents / FLASH)
··This thing·works really simple: A complete·BootEEPROM image is copied into the FLASH attached to the PChip (with the Xmodem.spin I have posted earlier). In a Spin program you should invoke : FLASH.LoadCode(DI, DO, CS, CK, IndexOfBootimage).·// There are 16 longs intact during bootload at the end of codespace, so you can interchange data between applications //
· The whole thing behaves like "programatically swapping boot EEPROMS" and pressing the Reset button.
· You can give it a test run on my P8X32 DIP demo BOX demoboard·(·Can ship only inside EU )
· The development of a "DOD Shell" like enverionment is on the way, utilizing FOS, TV, Mouse. I will post pictures in a few days.
Best regards,
· Attila
··