In a recent post, I talked about utilizing the “Blue Pill” STM32 module with the Arduino IDE. I’m not a huge fan of the Arduino IDE, however I will admit it is simple to utilize which makes it great for simple things.

I’m not a huge fan of integrated advancement environments (IDE), in general. I’ve utilized lots of them, particularly when they are tightly connected to the tool I’m trying to utilize at the time. however when I’m not doing anything special, I tend to just compose my code in emacs. believing about it, I suppose I truly don’t mind an IDE if it has tools that really assist me. however if it is just a text editor as well as introduces a few commands, I can do that from emacs or one more editor of my choice. The possibilities that your preferred IDE is going to have as much editing ability as well as personalization as emacs are close to zero. even if you don’t like emacs, why discover one more editor if there isn’t a remove benefit in doing so?

There are ways, of course, to utilize other tools with the Arduino as well as other frameworks as well as I decided to begin looking at them. After all, exactly how difficult can it be to develop Arduino code? If you want to jump directly to the punch line, you can inspect out the video, below.

Καταλήγει…

It turns out, the Arduino IDE does a great deal more than providing a bare-bones editor as well as introducing a few command line tools. It likewise handles a extremely convoluted develop process. The develop process joins a great deal of your data together, adds headers based on what it believes you are doing, as well as generally compiles one huge file, unless you’ve expressly included .cpp or .c data in your build.

That means just copying your typical Arduino code (I dislike to state sketch) doesn’t provide you anything you can develop with a typical compiler. While there are lots of makefile-based solutions, there’s likewise a tool called PlatformIO that purports to be a general-purpose solution for building on great deals of embedded platforms, including Arduino.

About PlatformIO

Although PlatformIO declares to be an IDE, it truly is a plugin for the open source Atom editor. However, it likewise has plugins for a great deal of other IDEs. Interestingly enough, it even supports emacs. I understand not everybody appreciates emacs, so I decided to investigate a few of the other options. I’m not speaking about VIM, either.

I wound up experimenting with two IDEs: Atom as well as Microsoft visual studio Code. since PlatformIO has their 2.0 version in preview, I decided to try it. You may be surprised that I’m utilizing Microsoft’s Code tool. Surprisingly, it runs on Linux as well as supports many things with plugins, including an Arduino module and, of course, PlatformIO. It is even offered as source under an MIT license. The two editors really look a great deal alike, as you can see.

PlatformIO supports a staggering number of boards ranging from Arduino to ESP82666 to mBed boards to Raspberry Pi. It likewise supports different frameworks as well as IDEs. If you are like me as well as just like to be at the command line, you can utilize PlatformIO Core which is command line-driven.

In fact, that’s one of the things you very first notice about PlatformIO is that it can’t choose if it is a GUI tool or a command line tool. I suspect a few of that is in the IDE choice, too. For example, with Code, you have to run the projection initialization tool in a shell prompt. Granted, you can open a shell inside Code, however it is still a command line. even on the PlatformIO IDE (actually, Atom), altering the blue pill framework from Arduino to mBed needs opening an INI data as well as altering it. setting the upload path for an FRDM-KL46 needed the exact same kind of change.

Είναι εύκολο?

Don’t get me wrong. I personally don’t mind editing a data or issuing a command from a prompt. However, it seems such as this type of tool will mainly charm to somebody who does. I like that the command line tools exist. But it does make it seem strange when some modifications are performed in a GUI as well as some are done from the command line.

That’s fixable, of course. However, I do have one more complaint that I feel poor for voicing since I don’t have a much better solution. PlatformIO does as well much. In theory, that’s the stamina of it. I can compose my code as well as not care exactly how the mBed libraries are written or the Arduino tools munge my source code. I don’t even have to set up a tool chain since PlatformIO downloads whatever I requirement the very first time I utilize it.

When that works it is truly great. The issue is when it doesn’t. For example, on the older version of PlatformIO, I had difficulty getting the mBed libraries to develop for a different target. I dug around as well as discovered the problem however it wasn’t easy. had I developed the toolchain as well as been in manage ofΗ διαδικασία, θα είχα καταλάβει πολύ καλύτερα πώς να αντιμετωπίσετε προβλήματα.

Στο τέλος, θα πρέπει να αντιμετωπίσετε προβλήματα. Το Platformio στοχεύει σε κινούμενους στόχους. Κάθε φορά που το Arduino IDE ή τα πλαίσια των βυθισμένων ή οτιδήποτε άλλο αλλάζει, υπάρχει μεγάλη πιθανότητα να σπάσει κάτι. Όταν το κάνει, θα πρέπει να εργαστείτε για να το επισκευάσετε μέχρι να το επισκευάσουν οι σχεδιαστές για εσάς. Εάν μπορείτε να το κάνετε αυτό, είναι ένα έξοδο εγκαίρως. Ωστόσο, υποψιάζομαι ότι οι άνθρωποι που θα σκέφτονται περισσότερο για την πλατφόρμα θα είναι λιγότερο σε θέση να το επισκευάσουν όταν σπάει.

Συμπέρασμα

Εάν θέλετε να πειραματιστείτε με μια διαφορετική μέθοδο κατασκευών προγραμμάτων – καθώς και το πιο σημαντικό, μια ενιαία μέθοδος για την παραγωγή καθώς και την ανάπτυξη – θα πρέπει να δώσετε την πλατφόρμα ένα γύρισμα. Όταν λειτουργεί, λειτουργεί καλά. Ακριβώς εδώ είναι μερικές συνδέσεις για να ξεκινήσετε:

Η πλατφόρμα IDE (απαιτεί άτομο)

Platformio Core (δεν χρειάζεται αν ορίσατε ένα πακέτο IDE)

Ο οπτικός κώδικας στούντιο (εγκατάσταση πλατφόρμα από το IDE)

Κατώτατη γραμμή, όταν λειτουργεί, λειτουργεί υπέροχα. Όταν δεν είναι οδυνηρό. Πρέπει να το χρησιμοποιήσετε; Είναι βολικό, δεν υπάρχει καμία ερώτηση γι ‘αυτό. Η ενσωμάτωση με τον κώδικα είναι αρκετά ελάχιστο. Η ενσωμάτωση του ατόμου – ενώ δεν είναι τέλεια – είναι πολύ πιο απρόσκοπτη. Ωστόσο, αν ανακαλύψετε να χρησιμοποιήσετε τα εργαλεία γραμμής εντολών, σχεδόν δεν έχει σημασία. Χρησιμοποιήστε τον επεξεργαστή που σας αρέσει, καθώς και έτσι. Εάν το χρησιμοποιήσετε, απλά ελπίζουμε ότι δεν σπάει καθώς και ίσως να έχετε ένα αντίγραφο ασφαλείας εάν το κάνει.

Leave a Reply

Your email address will not be published. Required fields are marked *