Shop OBEX P1 Docs P2 Docs Learn Events
TAQOZ for implementing a parallel bus - Page 3 — Parallax Forums

TAQOZ for implementing a parallel bus

13»

Comments

  • Hi Christof,

    as far as I understand, @bob_g4bby has done something like this in https://forums.parallax.com/discussion/174593/taqoz-reloaded-v2-8-running-commands-from-sd-card#latest

    I tried this but for me it seems only to work in the CLI / Interpreter mode.

    I checked the file dates on Peter Jakackis Sourceforge page again:
    The TAQOZ zip file has 2021-04-03 but the latest files in the /Home/TAQOZ/Forth directory are from 2023-03-15.
    So work this latest files with the _BOOT_P2.BIX from 2021-08-19 in /Home / TAQOZ / binaries ?

    ...Memory, Memory...My kingdom for more memory...

    Markus

  • Christof Eb.Christof Eb. Posts: 1,106
    edited 2023-09-24 15:24

    Hm @MGreim
    As I don't understand, what you are really trying to achieve, you might discribe this better?
    If it is data, what you want to load from SD card, then you can access it fast as data with SD@ when it is needed. No need to fload. You can also declare big buffers in the video area to store big data. Lots of possibilities....

    There is awfully much of memory in P2 with Taqoz. o:) And as long as you have no pictures, it will be a lot of work to fill a SD card.....

    I think that Peter has simply replaced @here with uhere.

    What exactly does not work? Of course you cannot nest fload, because you can have only one file open at a time.

  • Hi,

    I am getting more and more confused:
    If you read Peters text below, you may see, that moving code into another space requires a little bit more I think.
    AFAIK the system must now (in the dictionary) that the code is above 64 k. If you de-compile a piece of code located in the upper area (with SEE) you may see indeed a line labelled with "page1".
    Unfortunately a little bit different then shown in Peters example. I guess he is using a more actual software.

    NEED FOR MORE ROOM?
    Relocating the dictionary is useful for when the code memory grows to the point that there is little "room" between the end of code and the
    dictionary. Normally this doesn't happen since wordcode is so compact and name and data memory spaces are also separate, but at some point
    in a very large program with lots of modules (which hasn't happened yet) the code space may grow beyond the first 64kB and so any references
    to this code outside the first 64kB page will use an additional paging code while any code compiled there will still use compact 16-bit wordcode
    when pointing to the first 64kB.

    Ok, so far it may work, but if you save the "extended" code with Backup Flash or Backup Bix the system totally crashes after the next boot.
    So I went back to the strategy to load my bigger modules line by line with FLOADS file by file .

    But even if you care about the memory limits I got very often a kind of crash of the whole system.
    As mentioned in some earlier post the board is then only replying with
    a punch of FE as boot message. Mostly I was able to re-animate the system by re-flashing the flash with Flexprop or /and by re-formating the SD card.
    I have now 3 pcs. P2 Edge rev. D in use partly with my own hardware around but also with the P2 Edge mini Breakout board.
    In between I am wondering if there are some hardware / timing problems between TAQOZ 2.8 and the P2 Edge board.
    Maybe it depends on the frequent flash cycles during development, maybe there are no problems when the system in normal operation just reading from the Flash or SD card.

    Anybody else around working with TAQOZ and the P2 Edge board? Some similar experiences ?
    I am a little bit frustrated...

    Markus

  • So fload does work now for you?

    Ah, you want to save the large system. As far as I know the Biz file method can handle up to 128kBytes. I have not studiend or used the flash.
    Not specific to Taqoz, people have had problems using SD cards with the edge board I think. As far as I remember the card has to be deselected? I encountered different behaviour with different cards even from the same manufacturer.
    Just an idea:
    Are you aware of the size limits of the stacks?

  • Actually you need to power cycle the SD, reboot/reset does not work. Either remove and reinsert SD or power cycle the whole board.

    sometimes holding reset down for 2-3 seconds helps also

    Mike

  • The Kiss board does not have power cycle but nevertheless at the moment, with the modified mount, booting from SD card works without problems.
    What I did have, was rare transfer problems over the serial at 1M baud. Just repeating helped.
    And if a large program with assembler is directly pasted into Teraterm and transferred to be compiled directly, then the serial buffer will overrun.

    I have to admit, that I use a watchdog in my Audio player, so perhaps I do not register every crash any more. But during loading (via SD card fload) this is not yet active.

    I have to say that apart from very very very rare cases all the bugs which I have been fighting have been my very own. I am still very impressed, that only 1 real bug in Taqoz 2.8 has showed up up to now: ALIAS .
    Not real bugs:
    :=! has to be used within it's limits.
    MOUNT does not work with some cards.

  • Dear Friends,

    thanks for all the consolation ;)
    And Christof is right, 99.99% are sure my own bugs...
    BTW a small trivial but important hint for all:
    Simply switch to the Serial Only Boot Mode if you get only silly or no reply from the P2 board back - that helps a lot

    For me SandDisk Ultra and SanDisk MaxEndurance work well Transcend makes more troubles, aside the other struggles.

    Markus

  • Hi

    some remarks regarding the recent posts:
    1. finally for me only the Sandisk Max Eundurance SD cards work reliable.
    2. its indeed possible the extend the memory by 64 k with $12000 uhere !
    3. uhere is no variable its code : see uhere *CODE*
    4. uhere is case sensitive UHERE doesn't work.

    TAQOZ# ' UHERE .L --- $0000_0000 ok
    TAQOZ# ' uhere .L  --- $0000_1EC4 ok
    
    

    5.If there is some code in the upper memory area and you say BU TAQOZ after a reboot only the new modules are shown, but the modules in the lower segment are still working. (not tested finally).

    TAQOZ# ' AUFAB .L --- $0001_44AE ok
    TAQOZ# BU ---  SUCCESS! ok
    
    NOOTING....  CARD: SANDISK   SD SH32G REV$80 #3988277907 DATE:2023/5
    KERNEL        Parallax P2  *TAQOZ RELOADED sIDE*  V2.8 'CHIP' Prop_Ver G 200MHz 210401-1230
       MODULES:
      19904 *MESSAB*    
     DATA STACK (1)
    1   $0000_4182   16770MESSEN loaded 
    MEMORY MAP
      CODE:     16DC0  93,632 bytes
      WORDS:    1CB4B  13,388 bytes
      DATA:     01CC5  212 bytes
    HARDWARE
      PCB       P2      
      CLOCK IN      20.000000MHZ
    DEVICES
      SD CARD       31 GB  SANDISK   SD SH32G REV$80 #3988277907 DATE:2023/5
    I2C DEVICES
    STATS       cpufreq: 200MHz  systicks: 1,947  
    -------------------------------------------------------------------------------
    TAQOZ# 
    
    
    
  • @MGreim said:
    Hi

    some remarks regarding the recent posts:
    1. finally for me only the Sandisk Max Eundurance SD cards work reliable.
    2. its indeed possible the extend the memory by 64 k with $12000 uhere !
    3. uhere is no variable its code : see uhere *CODE*
    4. uhere is case sensitive UHERE doesn't work.
    ```
    TAQOZ# ' UHERE .L --- $0000_0000 ok
    TAQOZ# ' uhere .L --- $0000_1EC4 ok
    ....

    Hi Markus,
    as you are now going into the depths of Taqoz, I can very much recommend to study the file taqoz.lst .

    uhere is fast code to bring an address of a variable in "user space" onto stack. Interestingly, uhere is just another name to access the same variable as with @HERE.

    1fcc9     45484005         byte 5,  "@HERE"
    1fccf     1ec4             word rg+here
    ...
    1fce3     65687505  byte 5,     "uhere"
    1fce9     1ec4      word rg+here
    

    The variable itself is located at $2C4 in user register space in HUB ram, which means at offset of $c4 to that variable space starting at $200. Actually this starting address is not fixed, but held in cog register 1, so that multi tasking could switch these user registers fast. ( For @HERE this does not seem to make much sense, because the dictionary has to be the same for all tasks.) The offset is coded into the wordcode $1EC4= $1E00 + $C4, one of the tricks to make Taqoz so fast.

    TAQOZ# @HERE .l --- $0000_02C4 ok
    TAQOZ# uhere .l --- $0000_02C4 ok
    TAQOZ# uhere @ . --- 47330  ok
    TAQOZ# $2C4 @ . --- 47330  ok
    TAQOZ# 1 cog@ .l --- $0000_0200 ok
    

    I don't think, that anyone has used the shifted dictionary pointer and the paging mechanism up to now. Including Peter. So your journey will probably lead you here into unknown (untested) area. Things like crashing "FORGET".... The bug in ALIAS is also related to the paging mechanism.

    I think, it is very important, that people can have good confidence into a compiler. I do know the experience, that if I cannot find my own bug, and then begin to distrust the tools.... This was my reason to argue for the stability of TAQOZ. Bob and me have been trying to bring in our knowledge how to use Taqoz and about it's limits into Bob's manuals. As you are now leaving the known area, the manual's contents have to be seen with a grain of salt.

    Perhaps some hint, how the paging works:
    Normally a word code (>=$2000) is just the address of the wordcodes of a word. So $2000...$FFFF can be used as code space. (Wordcodes <$2000 have other meanings.)
    If the code sits in another code page, a special paging wordcode -one of $004e...$0054- will proceed the lower 16 bits of the code address. So calling these words will need 2 wordcodes.

    Good luck, Christof

  • Hi Christof,
    thanks for your explanation again. As you mentioned, the paging mechanism is still a kind of terra incognita ;-)
    I am often using grep throughout the whole source of TAQOZ, but for a beginner the code is not really self explaining.
    Niklaus Wirth showed as last sentence on the last slide of his last lection at the ETH (80th birthday) : "Programs mus not be regarded as as code for computers, but as literature for humans".
    A high standard....and hard to fulfill...even in his own source code the curly bracket is nearly totally missing - and (* too ;-)

    So after some tests I have to redraw thesis 5 of my last posting.
    Loading some bigger code to the 2nd page and then BU is destroying the system. It seems that TAQOZ tries to store the upper area also in the first 64 k, but the space will not fit.
    Finally the system doesn't boot anymore from the SSD.

    I have now my basic system in the flash memory.
    So I can repair the system quite easily by changing switch "FLASH" to ON at he P2 EDGE Then I boot again from the flash, BU as new backup to the SSD and then switching the DIP switch OFF again.
    Markus

  • VECTOR: and the 2nd page
    the VECTOR: command doesn't work correctly if you are using.
    It jumps to anywhere - if you are lucky TAQOZ reboots.

  • @MGreim said:
    VECTOR: and the 2nd page
    the VECTOR: command doesn't work correctly if you are using.
    It jumps to anywhere - if you are lucky TAQOZ reboots.

    Hi,
    don't you want to start a new thread about using pages? I think it is unlikely that anyone will find your valuable discovery here.
    You could make a list of verified words and a list of words, that do not work properly and how to get substitutes of them to work properly.
    My primary assumption is, that anything, that handles wordcodes directly, must be verified if used with pages.

  • Hi,
    just a comment to some of my own posts some months ago:
    After months I found a very severe bug in my own software.
    I was moving some arrays in the RAM above 64 k with the org command.
    Unfortunately a typo was moving a part of this data above 128k :/ .
    That was corrupting sometimes the system...
    So now everything runs quite stable with Sandisk Max Endurance cards now.

Sign In or Register to comment.