flexGUI P1 questions
in Propeller 1
I know that the P2 forum has a flexGUI thread, which seems to be aimed at P2 users. Not sure how many people are using flexGUI with the P1.
I wanted to use the flexGUI for the Activity WX board in the WiFi mode. I thought the flexGUI had the capability to find the WiFi port. I tried it and it did not find the port. Is there a special setting for doing this.
Thanks
Ray
I wanted to use the flexGUI for the Activity WX board in the WiFi mode. I thought the flexGUI had the capability to find the WiFi port. I tried it and it did not find the port. Is there a special setting for doing this.
Thanks
Ray
Comments
% proploader PropLoader v1.0-41 (2020-02-03 15:19:43 g9192230) usage: proploader [options] [<file>] options: -b <type> select target board and subtype (default is 'default:default') -c display numeric message codes -D var=value define a board configuration variable -e program eeprom (and halt, unless combined with -r) -f <file> write a file to the SD card -i <ip-addr> IP address of the Parallax Wi-Fi module <== WiFi-based upload!!! -I <path> add a directory to the include path -k prompt before exiting due to an error -n <name> set the name of a Parallax Wi-Fi module -p <port> serial port -P show all serial ports
flexgui's "Configure Commands" menu will get you to a dialog where you should be able to replace the serial port with "-i 99.99.99.99" (use your P1's IP number) in the Run Command field....OS_SPECIFIC_PATH_TO_YOUR_SHELL... "%D/PATH_TO_PROPLOADER/proploader" -Dbaudrate=%r -i 99.99.99.99 "%B" -r -t -k
Not tested, but should get you close... My example is on a macOS system. Obviously paths for WIN or Linux will differ.dgately
How far has the port of Simpletools for FlexGUI C gotten? I want to do some experiments with FlexGUI, but now I am not sure if I want to use C or Basic.
Ray
I decent chunk of the simpletools lib is there. This is just the stuff from simpletools.h, not all of the Simple Libraries (aka Learn folders). It also has simplei2c, and there is a decent chunk of standard C libraries stuff too (@ersmith has been adding more and more).
I'll have an update soon that gets more of the simpletools.h stuff converted over. I'm working out P2 conversions of the functions that use P1 counter modules. Stuff like freqout(), square_wave(), etc.
As I port simpletools stuff to FlexC, I make it work on P1 (easy) and P2 (a bit harder in same cases). So they should work for you on P1.
Thanks Roy for the effort you are putting in for the addition of simpletools, and other things, to FlexC. Now, if I could get FlexGUI to work with the WX WiFi.
Ray
As a test, can you try proploader itself on a command line (not from within flexgui) with a "-W' option? It should list all WiFi modules that it finds. That's the same mechanism that SimpleIDE uses to display modules in its menu.
I used these settings in flexgui's Configure Command...:
Run Command: /Users/myUserName/flexgui/bin/mac_terminal.sh "%D/bin/proploader" -i 10.0.0.102 "%B" -r -t -k Flash Command: /Users/myUserName/flexgui/bin/mac_terminal.sh "%D/bin/proploader" -i 10.0.0.102 "%B" -e -r -k
% /Users/myUserName/flexgui/bin/proploader -Dbaudrate=115200 -i 10.0.0.102 /Users/altergator/Desktop/p26.binary -r -t -k; osascript -e 'tell application "Wish" to activate'; exit 0 Opening file '/Users/altergator/Desktop/p26.binary' Downloading file to port 10.0.0.102 620 bytes sent Verifying RAM Download successful!
% /Users/myUserName/flexgui/bin/proploader -i 10.0.0.102 /Users/altergator/Desktop/p26.binary -e -r -k; osascript -e 'tell application "Wish" to activate'; exit 0 Opening file '/Users/altergator/Desktop/p26.binary' Downloading file to port 10.0.0.102 620 bytes sent Verifying RAM Programming EEPROM Download successful!
I'm using a Mac, so "osascript -e 'tell application "Wish" to activate';" is unique to my set up, so ignore if you are on WIN or Linux...
In the Run command, I am using ' -i ip address'. I also tried, ' -p ip address', this did not work. Not sure why it is not finding it within FlexGUI.
Ray
You can copy the exact command that flexgui used to attempt the upload from the Compiler Results area of flexgui's main window... Here's how flexgui interpreted my config (on macOS):
Finished at Mon May 18 07:56:09 2020 /Users/myUserName/flexgui/bin/mac_terminal.sh "/Users/myUserName/flexgui/bin/proploader" -i 10.0.0.10 "/Users/myUserName/Desktop/p26.binary" -e -r -k
At the command line, I type in 'proploader -W', and the first time it shows a blank line, and then the command prompt. The second time I type in 'proploader -W', then it finds the port. It seems like proploader is missing a beat, but the proploader that is being used by SimpleIDE does not seem to skip a beat.
My box is Windows 10 Pro with the latest updates. Is proploader having a problem with Windows, or is Windows having a problem with proploader. The first time I ran proploader from the command prompt I saw the virus check notification pop up. So, a new little problem to solve.
Ray
Could you point the flexgui Run Command to the proploader that is used in SimpleIDE and give it a try? I sync all of my tools to the latest built ones from flexgui's sources, so I use the same proploader version in flexgui & SimpleIDE. I just copy the built binaries from flexgui to where SimpleIDE expects the loader (which is different on macOS, from WIN or Linux). I also have a directory to generically store all my prop tools (/opt/parallax/bin/).
Ray
The Patreon is for early adopters that pay a small fee to get the latest software and to help @ersmith fund the development. You can wait a day or two to get the latest public version. Or you can give a donation.
Just trying to get eric some bucks, I just upd my donation.
Good deal! I did the same a few weeks back.
We definitely want to keep Eric happy. He has a metric boatload of time invested in the Flex suite, and its awesome! A wee bit of shilling for him would not be amiss IMHO!
Back to basics.
//test1.c #include <stdio.h> void main() { usleep(1000); printf("Hello,FleGUI/n"); }
For some reason I am not seeing "Hello,FleGUI/n".flexgui sample spin program:
'' simple hello world program #ifndef _BAUD #define _BAUD (__P2__) ? 230_400 : 115_200 #endif CON #ifdef __P2__ _clkfreq = 160_000_000 rx_pin = 63 tx_pin = 62 #else _clkmode = xtal1 + pll16x _clkfreq = 80_000_000 rx_pin = 31 tx_pin = 30 #endif baud = _BAUD OBJ #ifdef __P2__ ser: "spin/SmartSerial" #else ser: "spin/FullDuplexSerial" #endif PUB hello ser.start(rx_pin, tx_pin, 0, baud) repeat ser.printf("Hello, world!\n")
Run Command:
/Users/altergator/flexgui/bin/mac_terminal.sh "%D/bin/proploader" -Dbaudrate=%r "%B" -r -t -k -v
Result:
% /Users/altergator/flexgui/bin/proploader -Dbaudrate=115200 /Users/altergator/flexgui/samples/hello.binary -r -t -k; osascript -e 'tell application "Wish" to activate'; exit 0 Opening file '/Users/altergator/flexgui/samples/hello.binary' Downloading file to port 10.0.0.102 3072 bytes sent Verifying RAM Download successful! [ Entering terminal mode. Type ESC or Control-C to exit. ] ?????????????????????????????????????????????????????????????????????????????????????????????????Hello,! Hello, world! ...
A little glitch in the first print, but it sends the correct text, eventually.dgately
#include "simpletools.h" int main() // Main function { while(1) // Main loop { print("Hello, World!\n"); // Display text pause(200); // Wait 0.5 s before repeat } }
So, stdio may be suspect?Ray
//test1.c //#include <stdio.h> #include "simpletools.h" void main() { //usleep(6000); pause(17); print("Hello,FlexGUI\n"); }
shl SCLHighTime, #64 'Prep for brief delay (spec. SCL High must be >= 0.391 µS)
Obviously shifting left by 64 isn't what was desired, since it'll do nothing (the shift count is always modulo 32). Possibly the original intention was shifting left by LOG2(64), but I don't think that's quite long enough. If I change the "64" to "14" (to introduce a nice long delay) then everything seems to work better.I've made that change to my copy of PropLoader and flexgui and checked it in to github. I've also attached a Windows binary; if you replace the flexgui/bin/proploader.exe with the one from this .zip it should work better.
When the Eval rev C board becomes available, and I am satisfied with the implementation of WiFi for the P2, then I will be switching over to P2. But, for now, since FlexGUI does not implement CMM, you have to be very code size conscious when working with the P1.
I am still looking into working with FlexBasic as a quick prototype language. I wonder, when the rest of the simpletools device drivers become available, could they be used with FlexBasic?
Ray
In the 'Ports' I have the 'Find port automatically' checked. By the way, how would you uncheck the item. Anyway, when I select the Scan, it seems like nothing is occurring.
Ray
Ray
Since the on/off switch was not doing anything, I pulled the barrel plug, waited a bit, then plugged in the barrel plug, and the WX WiFi came to life. Is their a problem with the Activity WX board and barrel power socket? Not sure as to how or what the explanation is, for what just happened. Anybody experience something like that?
If the problem is with the barrel power socket and a battery source, then maybe I need some more direction with how to power the Activity WX board when using a battery source.
Ray
Compiling both programs, each program size is 7860 bytes. So, it seems like you do not get a program code size savings in either one, so far. I wonder what a test1.spin code size would be. Since I do not use Spin, not sure what the Spin program code would look like, for comparable code match.
Ray
This no longer needs a pause.
7860 bytes
//test1.c //#include <stdio.h> #include "simpletools.h" void main() { //usleep(6000); //pause(17); print("Hello,FlexGUI\n"); }
test1.bas7860 bytes
print "Hello,FlexGUI"