Monte python and the P2
iseries
Posts: 1,492
in Propeller 2
This Christmas turn out to be very interesting. First I got and Anki Vector robot to play with. I became interested because of what it could do but was not happy it was based on a phone processor.
Anyway the SDK to talk to the robot is all in Python. The only way to talk to the robot is through Python and you can only talk to the robot. You cannot download any code to the robot only interact with it through Python.
For the most part that worked very well and working with the robot at that level was very natural.
Then I got my P2 Eval board for Christmas and found that by hitting greater than and a space along with an ESC I could bring up a Forth prompt TAQOZ#. From there I could easily blink an LED. That was crazy.
Now if that was a Python prompt >>> Oh my god. I’m not a Python fan and actually don’t like Python yet but after working with the Vector robot and seeing where Python seems to be going it is the latest buzz language.
I’m a C language fan and have been for decades and that’s not going to change. I have used no less than 10 languages in my past but C is still the universal common ground and it works and it works well.
I took a look at the Micro python code and also the pyboard which is based on STM32. No surprise there as that is my second chip of choice. I know it’s very difficult to work with these chips but it works.
I found that Micro Python has been ported to the Pic, and teensy boards of all things and even the ESP line of chips. Well to port this to the P2 is not going to happen without a C compiler. All of these devices have a C compiler.
I took a look at the propGCC and found that to be just short of a nightmare. How was that ever developed? I love the Simple IDE tools and the compiler and loader are just amazing. Now that I see how it was made I am at awe. Face it, if I had to use SPIN to build my programs I would not probably be using the Prop chip today. A lot of the devices I interface too are based on C code or C libraries.
I built a Linux server in the cloud and download the code and got it to compile with some jockeying around. It was a virtual server so I could just delete it if it didn’t work. I still don’t see how that could be turned into a P2 compiler. I did see however there were some references to the P2 in it already.
The problem I see at hand here is that the P2 is now out and to build Python into it is a little too late. The window of opportunity has passed and even though it’s not a tool I would use nor would I use Forth for that matter but it is the latest shinny tool in the tool box and would go a long way to making the P2 better.
Even now I am at a little disadvantage with writing code for the P2 because of the lack of tools.
I am also a little concerned that the Forth is in ROM. Things like Python are constantly changing and having something burned in with no way to update it is bad karma. Even the firmware to boot my PC was just updated last week.
Mike
Anyway the SDK to talk to the robot is all in Python. The only way to talk to the robot is through Python and you can only talk to the robot. You cannot download any code to the robot only interact with it through Python.
For the most part that worked very well and working with the robot at that level was very natural.
Then I got my P2 Eval board for Christmas and found that by hitting greater than and a space along with an ESC I could bring up a Forth prompt TAQOZ#. From there I could easily blink an LED. That was crazy.
Now if that was a Python prompt >>> Oh my god. I’m not a Python fan and actually don’t like Python yet but after working with the Vector robot and seeing where Python seems to be going it is the latest buzz language.
I’m a C language fan and have been for decades and that’s not going to change. I have used no less than 10 languages in my past but C is still the universal common ground and it works and it works well.
I took a look at the Micro python code and also the pyboard which is based on STM32. No surprise there as that is my second chip of choice. I know it’s very difficult to work with these chips but it works.
I found that Micro Python has been ported to the Pic, and teensy boards of all things and even the ESP line of chips. Well to port this to the P2 is not going to happen without a C compiler. All of these devices have a C compiler.
I took a look at the propGCC and found that to be just short of a nightmare. How was that ever developed? I love the Simple IDE tools and the compiler and loader are just amazing. Now that I see how it was made I am at awe. Face it, if I had to use SPIN to build my programs I would not probably be using the Prop chip today. A lot of the devices I interface too are based on C code or C libraries.
I built a Linux server in the cloud and download the code and got it to compile with some jockeying around. It was a virtual server so I could just delete it if it didn’t work. I still don’t see how that could be turned into a P2 compiler. I did see however there were some references to the P2 in it already.
The problem I see at hand here is that the P2 is now out and to build Python into it is a little too late. The window of opportunity has passed and even though it’s not a tool I would use nor would I use Forth for that matter but it is the latest shinny tool in the tool box and would go a long way to making the P2 better.
Even now I am at a little disadvantage with writing code for the P2 because of the lack of tools.
I am also a little concerned that the Forth is in ROM. Things like Python are constantly changing and having something burned in with no way to update it is bad karma. Even the firmware to boot my PC was just updated last week.
Mike
Comments
TAQOZ is meant to be a way to explore the chip and do basic hardware testing.
I believe Peter is adding more to the version for the respin, but I'll leave it to him to discuss.
Do some looking around, I know there are some folks looking to port MicroPython to the P2.
Keep it mind these are also engineering samples and these will allow people to start building tools that should be ready by the respin and general release.
C.W.
If I want to build something compilated I can use an STM chip which is more widely used.
Mike
It would be nice to box up some of this code and use GitHub or something to put the code out there. Then if an update needs to be added or requires some tooling it can be nicely put together. I like just using git to download everything and then run the code.
Having to find Pnut or fastspin or spin2gui or something to try some code out is not working for me.
I have to go through at least 10 different blog post to get up to speed with what is going on here.
Mike
Someone put the propgcc together and I'm all for building the server and downloading the code and compiling it but when it doesn't taste good I need to know what ingredient is missing to make it work.
I looked over the GNU stuff and found that it supports many of the systems I worked on in the past. STM, SPARC, AS400, PowerPC, RS6000, PDP-11, and even IBM 390. No mention of P1 though.
I don't know how to build a C compiler for the P2 but I can write C code.
Mike
Maybe I run for president in my rowing club! Merry christmas to all
Here I think it's our misunderstanding... The P2 is NOT out. The silicon is not final. Those devices which are in people's hands are for finding silicon bugs and developing toolchains.
Well, FORTH is not like python, it's more like C insomuch as it hasn't really changed that much in decades.
Welcome to the party, we're glad to have you.
Now you know it's not too late for you to contribute to its direction I hope you'll be encouraged to work with us.
Additionally, as a teaser - there is the potential LATER for a product with custom ROMs for anyone who wishes to develop it that was mentioned a while ago.
If you can get python to fit in that ROM it's not beyond the realm of possibility that someone may want to fund a run on ICs that have that in ROM.
To be clear, I'm not saying parallax is doing this - I'm saying that at one point custom ROMs as a product was mentioned.
Obviously, a long way off, but the potential is amazing, isn't it?
Tom
When P2 starts, the ROM is dumped to RAM,a region can be write locked, and then the boot cycle begins.
New, better, different code can be the first thing loaded.
In TAQOS, one can paste a. bigger dictionary into a terminal and very considerably expand the system on the fly too.
Nothing, but the boot options and process, is set in stone.
I suspect the release ROM will be improved over this first sample.
However it all goes, it was made completely possible to ignore the ROM with zero impact. Many users will not even realize it is there. We included one for testing and in the future debug / test work to be possible sans anything but serial comms.
The other plan is a bootable image with a full on chip SPIN + PASM development system. Forth will get similar, because that exists now and is production proven.
One will be able to use a P2 to develop for P2. Who know what else may happen along these lines? Will be fun times.
All that said, a bog standard compile, upload, run C environment is planned.
Right now, the big need is testing on the chip, toolchains, and common circuits as well as smart pin modes and features.
Just writing PASM to do stuff will help.
Solving The Documentation Problem - Opinions Please
Idea: "Propeller Plumbers" organization on Github.
[github] rosco-pc/propeller-wiki/wiki
Please: Discussion in one of the mentioned places.
That does not make sense.
P2 is not quite out now yet, it is merely sampling in small numbers of ES versions, and still being tested/revised, so it is not 'too late' for anything on the software side. Python is on the road map.
It is very early days, did you look at fastspin, which has Spin/Basic/PASM and some C already ?
That also makes little sense, as the P2 is not a ROM only device. You can load any forth you like.
The ROM is small, and there for bootloading, and other items were fitted into ROM. Looks very flexible to me.
Its sad that Parallax doesn't get off the stick and assign someone at HQ to work on this, maybe with an RFP-thread in the forum for interested folks to contribute?
At this point its well past time for this to have been discussed considering where we're at with production.
Its pretty weird to see a company which seems to depend upon hard core forumistas for development, and evangelizing, which they seem to be stepping up to do, and not doing some simple management and assistance with getting it consolidated in a useful form/format.
This doesn't need a Sr. Engineer to assist with, isn't there anyone at HQ who might be interested and could be tasked with spending 2-3 hr's a week in making this happen?
As with the original P1 is was never built to run C. Someone had to come up with a way to make that work.
Mike
The P2 runs PASM, and unlike the P1, can do so outside the COG memory. In this sense, it is a multi-core chip ready to be driven by any language.
Chip will do SPIN 2, and likelt a self hosted dev environment.
Parallax will do C and other things to support education as they always do. I suspect some other things may be seen and targeted at various niches as we see this all flesh out.
Others are likely to toss in with whatever they think may make sense.
You, reader, can do what you want. Many of us plan on doing things we want. The more the merrier.
As for management...
Give it a bit of time. There is no rush. We are on engineering sample chips for good reason. Amazingly, they are almost fully functional, but could use improvements and bug fixes. That is where we are now.
People can proceed to develop and test. Out of all that, Chip gets what he needs to make the respin worth it, and likely production ready. On Semi has Parallax on a program that works with all that is going on right now.
Let the holidays pass. Then it can get a bit more formal. Until then, some of us know enough to help others out and the central repository will fall quite nicely out of that.
None of that is a surprise.
However even here at the nerve center of discussion by the most knowledgeable prop-heads we still see everybody and their aunt asking about how to get this or that, who has a link to something somewhere, and on and on.
A common GitHub or BitBucket would be a great place to start corraling as many efforts as possible, if Parallax doesn't want to host. Heck, even an updateable Stickie in this forum for each offering with links would be useful in the short term.
IDK, maybe this'll be all sorted out at the tools meeting.
just saying...
Mike