@ersmith I found an issue with the Fastspin v4.1.2 listing file not showing the LUT addresses correctly next to the PASM code output. Seems to show LUT code starting at $080 instead of $200 in my example below.
I also tried to org this LUT code at $220 as well and the listing file start address then changed to 088, so its base value appears to be off by a factor of 4. It does increment by one at least after that, but this offset makes checking/debugging LUT address contents hard. Hopefully a simple fix.
0409c | hyperflash_service
0409c 2D 02 00 00 | long read_byte
040a0 2F 02 00 00 | long read_word
040a4 32 02 00 00 | long read_long
040a8 35 02 00 00 | long read_burst
040ac 15 01 00 00 | long unsupported
040b0 B1 02 00 00 | long write_word_flash
040b4 15 01 00 00 | long unsupported
040b8 15 01 00 00 | long write_burst_flash ' TODO
040bc |
040bc | ' add further memory types here, eg spi flash
040bc | '..................................................................................................
040bc |
040bc | lut_code
040bc | '..................................................................................................
040bc | org $200
040bc 080 | savestate
040bc 080 B3 F1 03 F1 | add ptra, limit 'increase hub address
040c0 081 04 66 47 F0 | shr limit, #4
040c4 082 B3 59 03 F1 | add addrhi, limit 'increase addrhi by limit/16
040c8 083 10 62 8F F9 | altd id, #savehubaddr 'preserve read state for next time
Inserting spaces before the "#0" works for me; in fact one of the standard tests that I run before releasing fastspin is this code:
con
TEST_ROW_RESULTS = 5
TEST_ROW_BUTTON = TEST_ROW_RESULTS + TEST_LED
#0,TEST_ELECTRICAL,TEST_LIGHT,TEST_LED
dat
long TEST_ROW_BUTTON '' should be 7
Also, if you don't put the space before the "#" then you'll get a warning but everything should still work. The preprocessor will ignore the "#0" and pass it through to the compiler, which will compile it normally.
Eric,
Cannot find the posts (and replies) where I said fastspin.zip and flexgui-master.zip are inconsistent so here goes again...
Previously I have downloaded flexgui.zip (eg 4.1.2) which contains
flexgui.exe
\bin\fastspin.exe
\bin\loadp2.exe
When I went to download v4.1.3
flexgui.zip now appears to be flexgui-master.zip but it does not contain the \bin\ files
fastspin.zip does not contain the \bin\ directory with loadp2.exe but fastspin.exe is in the root.
Please, could you make it so that each release there is a consistent download where all files are contained (flexgui.exe, fastspin.exe and loadp2.exe), even if no changes have been done for some of the files. This just makes it easy for everyone. You've done a great job, tho' this would make it easy for all of us thanks
I just downloaded 4.1.3 from here: https://github.com/totalspectrum/flexgui/releases
The flexgui.zip downloaded from there contained all the proper files including the bin folder with all the exe files. Just the same as previous releases.
This is really weird. That is the link I followed (its on the first post in this thread).
When I did it the other day, and confirmed earlier this afternoon, under the Flexgui version 4.1.3 heading there was a link to download flexgui (within the text) and there was no flexgui.zip under the Assets 3 heading below. IIRC there was a fastspin.exe download (which I had downloaded) under the Assets 3 heading. Thinks there may have been more options. Anyway, that link (which is not there now) lead to a page in git where I could download flexgui-master.zip (which I also downloaded)
Now I find the same page is different (basically same text from what I recall but missing the link described above), and flexgui.zip is available to download and I just did that and it does indeed have the bin subdirectory. But I've just looked and the bin is empty
FWIW in the root is flexgui.exe and README.md, and directories bin, board, doc, flexgui, include, samples, src. Of these, bin, board with subdirectory sdcard, and flexgui are all empty. fastspin.exe and loadp2.exe are no where to be found
Don’t think so as the website was showing something else. There should be other files in the bin directory IIRC (not at computer atm).
Giving up for tonight.
Previous releases worked fine once I understood what zip file i needed. I have them all in their own directories.
I wonder if the other exe files are not signed, but flexgui.exe is? If so then perhaps your antivirus software is quarantining the exe's or even just deleting them?
Others were having that issue in the past with the main exe, but ersmith got support to sign the exe and that helped then, maybe?
I would expect to get a warning. Sometimes i get a warning when i download a zip file, but ive never seen them not being shown for download. At home i just use MS Defender but im super careful not to open unknown emails or click unknown links. At work we use Norton professional or similar.
Now, if you follow the first link above (has the fastspin.zip file) there is a link https://github.com/totalspectrum/flexgui
that goes to a page that is different to the second link above and has a large list of files. Here there is a button to clone or download a zip file
This downloads the file flexgui-master.zip
So this explains the different pages/links that i've seen.
I have just downloaded flexgui.zip again, and this time I get a size of 8,996KB wheras the flexgui.zip I downloaded earlier (an hour ago) has 4,948KB. The larger flexgui.zip file contains the \bin\ subdirectory with the expected files
But clearly something is wrong
Anyway I have the 4.1.3 files now. Perhaps Eric can shed some light on this.
Now, if you follow the first link above (has the fastspin.zip file) there is a link https://github.com/totalspectrum/flexgui
that goes to a page that is different to the second link above and has a large list of files. Here there is a button to clone or download a zip file
This downloads the file flexgui-master.zip
That's the source code, and that's almost certainly what you downloaded. Which is fine, if you want to build from source, but binaries are not included.
The default github page is always the source, that's just the way github works. To get to binary releases you have to click on the "Releases" button (which is a bit tricky to find on the page) or just start directly with the release URL https://github.com/totalspectrum/flexgui/releases
I just tried using "numbers.spin", but it doesn't appear to work...
Tried this:
OBJ
...
num: "numbers"
PUB Main()|i,j,k,x,y
...
'Numbers for turning numbers into strings
num.init
j:=23432
i:=num#DEC
i+=(10+1)<<5'(digits+1)<<5
vga.print_string(num.ToStr(j,i))
Seems to return just a space character.
Is there some other way to in Fastspin to turn a number into a string?
Or, any idea why "numbers.spin" doesn't work? Should it?
Hey @ersmith
Any ETA on when this error will be resolved? "error: Symbol _pinr is of a type not handled by PASM output yet"
I have ported simplei2c over to FlexC, and trying to make it work on P2 & P1. Using the _pin*()/_dir*() stuff since that will work on all 64 pins for P2 and still work for P1, except _pinr() isn't implemented yet for P1 compiles.
I guess I can work around it for now with an #ifdef __propeller2__, but it would be cleaner if _pinr() for P1 worked.
Thanks Roy. The _pinr was a silly oversight, and the I2C code you wrote looks nice. I came down with the flu and have been flat on my back for the last few days, so I have a lot of work to catch up. Before that happened I started overhauling the file I/O code and my local repository is a horrible mess .
@Rayman: Not sure why numbers.spin would have problems. It was working at one point, I think. Could you send me the exact version you're using and some kind of repro case? Maybe we have a different "numbers.spin" file.
ersmith,
Just to be clear, the i2c code wasn't originally written by me, I just modified the existing Simple Libraries version of it to work in FlexC and for P2 as well as P1.
I saw that you had a lot of stuff in the works in the spin2cpp repository, particularly a bunch of C library additions. Hopefully, as I get more familiar with the codebase, I can help with some of that too.
Comments
I also tried to org this LUT code at $220 as well and the listing file start address then changed to 088, so its base value appears to be off by a factor of 4. It does increment by one at least after that, but this offset makes checking/debugging LUT address contents hard. Hopefully a simple fix.
Want to enumerate a list of colors like this:
But, I get an "warning" ignoring unknow preprocessor directive 0 message.
Guessing that means it is not working...
Way around this?
Insert some spaces before the #0.
Mike
Inserting spaces before the "#0" works for me; in fact one of the standard tests that I run before releasing fastspin is this code:
Also, if you don't put the space before the "#" then you'll get a warning but everything should still work. The preprocessor will ignore the "#0" and pass it through to the compiler, which will compile it normally.
Never mind, seems I can't have this on multiple lines by ending line with a comma
I thought I could do this:
But, I guess it was just a warning when it was all on one line...
I'll just keep this:
It compiles without error or warning... Thanks.
Cannot find the posts (and replies) where I said fastspin.zip and flexgui-master.zip are inconsistent so here goes again...
Previously I have downloaded flexgui.zip (eg 4.1.2) which contains
flexgui.exe
\bin\fastspin.exe
\bin\loadp2.exe
When I went to download v4.1.3
flexgui.zip now appears to be flexgui-master.zip but it does not contain the \bin\ files
fastspin.zip does not contain the \bin\ directory with loadp2.exe but fastspin.exe is in the root.
Please, could you make it so that each release there is a consistent download where all files are contained (flexgui.exe, fastspin.exe and loadp2.exe), even if no changes have been done for some of the files. This just makes it easy for everyone. You've done a great job, tho' this would make it easy for all of us thanks
The flexgui.zip downloaded from there contained all the proper files including the bin folder with all the exe files. Just the same as previous releases.
When I did it the other day, and confirmed earlier this afternoon, under the Flexgui version 4.1.3 heading there was a link to download flexgui (within the text) and there was no flexgui.zip under the Assets 3 heading below. IIRC there was a fastspin.exe download (which I had downloaded) under the Assets 3 heading. Thinks there may have been more options. Anyway, that link (which is not there now) lead to a page in git where I could download flexgui-master.zip (which I also downloaded)
Now I find the same page is different (basically same text from what I recall but missing the link described above), and flexgui.zip is available to download and I just did that and it does indeed have the bin subdirectory. But I've just looked and the bin is empty
FWIW in the root is flexgui.exe and README.md, and directories bin, board, doc, flexgui, include, samples, src. Of these, bin, board with subdirectory sdcard, and flexgui are all empty. fastspin.exe and loadp2.exe are no where to be found
What's happening???
Giving up for tonight.
Previous releases worked fine once I understood what zip file i needed. I have them all in their own directories.
Others were having that issue in the past with the main exe, but ersmith got support to sign the exe and that helped then, maybe?
The link on the first post in this thread has a link to spin2cpp
https://github.com/totalspectrum/spin2cpp/releases
This has the fastspin.zip download
and a link to flexgui
https://github.com/totalspectrum/flexgui/releases
This has the flexgui.zip download
Now, if you follow the first link above (has the fastspin.zip file) there is a link
https://github.com/totalspectrum/flexgui
that goes to a page that is different to the second link above and has a large list of files. Here there is a button to clone or download a zip file
This downloads the file flexgui-master.zip
So this explains the different pages/links that i've seen.
I have just downloaded flexgui.zip again, and this time I get a size of 8,996KB wheras the flexgui.zip I downloaded earlier (an hour ago) has 4,948KB. The larger flexgui.zip file contains the \bin\ subdirectory with the expected files
But clearly something is wrong
Anyway I have the 4.1.3 files now. Perhaps Eric can shed some light on this.
That's the source code, and that's almost certainly what you downloaded. Which is fine, if you want to build from source, but binaries are not included.
The default github page is always the source, that's just the way github works. To get to binary releases you have to click on the "Releases" button (which is a bit tricky to find on the page) or just start directly with the release URL https://github.com/totalspectrum/flexgui/releases
Tried this:
Seems to return just a space character.
Is there some other way to in Fastspin to turn a number into a string?
Or, any idea why "numbers.spin" doesn't work? Should it?
The long "sTitleForm1" becomes a pointer to the string of the same name.
But, I think in Spin and maybe PNut that it should be:
With the "@" symbol in front.
Any ETA on when this error will be resolved? "error: Symbol _pinr is of a type not handled by PASM output yet"
I have ported simplei2c over to FlexC, and trying to make it work on P2 & P1. Using the _pin*()/_dir*() stuff since that will work on all 64 pins for P2 and still work for P1, except _pinr() isn't implemented yet for P1 compiles.
I guess I can work around it for now with an #ifdef __propeller2__, but it would be cleaner if _pinr() for P1 worked.
I did the work around for now, and submitted a pull request.
I think I got it right, let me know if I need to do it another way.
FYI, I tested it on P1 with code to read/write the eeprom, and on P1 & P2 (p2es rev b chip) with code to read the parallax HMC5883L compass module.
Here's an example that I think should work, but doesn't.
I think I'm using it correctly...
Just to be clear, the i2c code wasn't originally written by me, I just modified the existing Simple Libraries version of it to work in FlexC and for P2 as well as P1.
I saw that you had a lot of stuff in the works in the spin2cpp repository, particularly a bunch of C library additions. Hopefully, as I get more familiar with the codebase, I can help with some of that too.