[Solved] Getting PlatformIO working for Pokitto

This is excellent work.
I’ll get round to testing it at some point.

There’s no rush to keep working on this, we know you’re busy with other things.

Thanks!

Two observations:

  1. I love the vscode + platformio user experience. When it works, its miles better than for example Arduino IDE. Way better. I should say even for a beginner. The UI is very responsive, visual formatting is unobtrusive, function/symbol hints appear at the right time. When we get this PIO thing to work 100% its going to be a strong contender for the best toolchain/IDE, no question about it

  2. Now that I’ve understood how the build system works, especially the scripting, I have realized you can get this thing to do anything you want. The customizability is on a totally different level to what I’ve used before

2 Likes

This is precisely why I refused to let us give up hope on PlatformIO.

I could see the potential that such a setup would have,
and I could see that having PIO+VSCode makes the Pokitto more attractive because VSCode is quite popular at the moment.
(Programmers can be very picky about their tools.)

When I was trying on my own I just didn’t know enough about the build process to make much progress.

(In light of the discovery of that broken function I think it’s possible that I did have it working at one point but was encountering that function problem.)

Now that we’re on our way to having both Code::Blocks and VSCode (and possibly Atom) available,
I’m hoping that we’ll end up with some more regular users.

You probably did. But the bug would have been impossible to track down. Like I said, I used Segger Ozone, a fully standalone hw debugging suite before I got a clue as to what was wrong

1 Like

Does pokitto_pre.py run before every build? Wouldn’t it be better if it only tried to download an update if the bak wasn’t present? If no internet connection is available, won’t that break even if you had downloaded the files previously?

We have Hello Platformio

Its 100% functional. Edit: only tested on Ubuntu Linux so far, upload still JLink

3 Likes

#update

I have packaged and registered Pokitto library to PlatformIO library registy

It seems to take >24hours for PIO library registry entries to be approved

Waiting for the lib to appear

After that, getting started on PIO will be a piece of cake (no need to learn git etc)

2 Likes

this library will work for usb upload / sd card bin?

1 Like

yes it will

1 Like

so this is going to be the new way for beginners to program for pokitto right?

(considering doing the tutorials)

Yes but the approval for the library into the Platformio reg is taking ages

Why I would like it to be registered is it makes importing the lib a lot easier

3 Likes

yea thats understandable

so just to be clear we install atom/visual studio code, then Platformio and in there is a pokitto start project?

Yes, the idea is that you install PlatformIO, import the lib through the lib manager and you’re done

3 Likes

I don’t know about Atom, but in VSCode is basically a fancy text editor and anything more advanced than editing plaintext and managing keybinds is a downloadable extension,
including the C++ language and PlatformIO.

2 Likes

vs code is a fork from atom there both code editors and got a wide list of packages to highlight and get back debug info from compilers for breakpoints, debug highlighting and more

im most likely going to end up using visual studio code cuz the intelisence system (if it can parse the pokitto lib) is going to be the killer feature

Aparently VSCode isn’t a fork of Atom.

Both VSCode and Atom are made with Electron and designed to look and behave somewhat similarly, but they don’t intentionally share any code (except for the Electron stuff).

interesting did not know that, they do look allot alike and there always put in the same boat, plugins seem to be compatible (assume thats due to electron and just being javascript) i have played around with monaco (the text editor rendering visual studio code uses)

i had seen that vscode is source is more leaning on typescript (cuz ofcourse its Microsoft)
still think vscode is the better deal to use (although i guess now that microsoft bought github they also own the atom project)

I like Typescript.
The lack of static typing is one of the things I most dislike about JavaScript.

Technically they own the repo and possibly the copyright,
but they don’t really ‘own’ the code because it’s MIT-licenced.

No time for an actual update now, but FYI Pokitto Lib is now installable from PIO / Home / Libraries by searching “Pokitto”

1 Like

Ah, I was looking in the wrong sections.
I was looking at boards and platforms.

Probably won’t test it properly tonight, but I might have a quick run to confirm that it works.