Programming and developing for P2 from an rpi
moony
Posts: 27
in Propeller 2
My personal desktop happens to be a travel up a flight of stairs from the garage I do things in, so I was wondering if I can reasonably expect some of the P2's tooling to work on a Raspberry Pi 3 B+
I can live without one of the various IDEs, I'm more interested in if I can expect flexcc/flexspin and loadp2 to work.
I can live without one of the various IDEs, I'm more interested in if I can expect flexcc/flexspin and loadp2 to work.
Comments
Ray
+1
Would love to try out the Flex tools on RPi. Currently using PropellerIDE on an RPi 400, and finding it to be a bit quirky. It seems like the cursor occasionally jumps to a random location in the source code and places keyboard presses there while still displaying the original text. Very disconcerting.
EDIT: latest RPi fresh install tested and the following was needed:
The current RPi OS does not contain tcl, needed by flexprop, it is this easy to install it: The current RPi OS does not contain bison, needed by flexprop, it is this easy to install it: If the current RPi OS does not contain git (doubtful), install with: To clone flexprop (start within a directory where you store sources i.e. $ mkdir src ; $ cd src): To build flexprop: To run flexprop: To keep up-to-date with flexprop's latest sources: I may have over-simplified a bit, but you can always return here and post any problems that come up...
dgately
Some notes here: http://www.rayslogic.com/Propeller2/RaspberryPiZeroW.html
But, @dgately's post looks better...
Since I have SimpleIDE installed and I had to join dialout, is that also required for a FlexProp installation? Has anybody figured out to place FlexProp in the Programing Menu.
Since ersmith has been doing quite a few updates, would it be worthwhile to come up with some kind of automated update program. Any bash experts of maybe Python script experts to create such a program. Probably the best solution would be for FlexProp, itself to have an update provision.
For the new people ersmith has a Patreon and a Paypal account for those of us that might be inclined to show their appreciation for the hard work that ersmith is doing. I am a Patreon account donor.
Ray
https://raspberrypi.stackexchange.com/questions/60577/how-can-i-add-custom-application-launchers-to-the-panel
When it comes to finding out these handy procedures, "google.com is your friend!"...
It started showing after opening more than one tab.
Error message:
That may help -- please let me know if it does.
Ray
To update to the current repository revision:
@ersmith Yes, it did work! The error is not showing anymore. Thanks and sorry for the late reply, I did not have time this week for the follow up.
Do you know what could be the cause of this error I am having when compiling with debug enabled?:
Full message:
As per instructions of @ersmith, fixed it by running the make install command specifying the directory where I cloned the repo:
This fixed it.
I'm trying to install flexprop on a raspberry pi. dgately's post above was very helpful but after install i'm getting a warning: openspin not found , P1 loader is not built. I need the P1 support. My question is where do I put openspin. (I believe it is a single file)
Build openspin by cloning https://github.com/parallaxinc/openspin and then making it. The final program ends up in build/openspin. Just copy that to anywhere on your PATH. I think the steps would be something like:
thank you sir. that works
In case you hadn't thought of this.... (For people running across this thread and looking for alternatives...)
Visual Studio Code is available to run directly on an RPi. See VSCode Download/Setup Instructions after which you can install Spin2 syntax highlighting and FlexProp per instructions at P2 code development with FlexProp on Raspberry Pi also here's a list of useful extensions for VSCode use VSCode Extensions for P2 development
sudo apt install tcl-dev tk-dev needed to compile.
The program works and compiles but doesn't see any serial port. While I tried to load anything to P2 I got
Edit: rebooting a Pi was needed to make a serial port visible. Now the RPi can program the P2.
I recompiled flexprop on a RPi4.
The result now is: if I compile and run blink3.spin on a P2 edge it runs until I close the terminal window
If I close the terminal, LEDs stops blinking and P2 restarts with what it has in the flash.
If I disconnect a prop plug before I close the terminal window, LEDs continue to blink
No surprise. A side effects of the comport DTR line being the Propeller's reset control.
Thanks to all who have contributed to this thread. I just updated my pi 2B to 6.1.5 After running flexprop on my laptop with SSD I do find the RPi painfully slow, but I needed an alternative programming system for P2.
Jim
The default build settings don't enable optimizations.
do
make install "OPT=-O2"
for an optimized build.do make install "OPT=-O2" for an optimized build.
Jim