Jump to content
Electronics-Lab.com Community

How to have code auto-completion, code hinting, jumping to definition features on Arduino IDE with Ameba RTL8722


MENG XI

Recommended Posts

6.png

Many interesting projects are coded on Arduino IDE thus making it very easy to get a head start with project. Just like Realtek Ameba RTL8722, there are many interesting project worth trying out, like BLE, MQTT with TLS etc. However, once the project grows in length and complexity, it becomes super inconvenient with the lack of code completion, hinting and jumping to definition features that are commonly available on most popular code editors. However, there is actually a way to have all those features with only 3 steps, here is how,

 

(Note: there are probably other ways of achieving the same goal, so share your method if you know a better way;)


1. Go to “preference” under Arduino IDE and select “use external editor”

With this option selected, you will see the arduino editor grey out and become unable to edit code anymore, don’t worry, this is ok.

1.png


2. Download and open any of your favourite editor which has all these “smart features”

In this case, Visual Studio Code is used for demonstration.

2-300x300.png

 


3. Create a folder to store all your sketches and add Ameba RTL8722 ‘s arduino library to the workspace

3.png

4.png

(this 3.0.4 is the ameba library folder and it is usually located in you C drive under “C:\Users\YOURUSERNAME\AppData\Local\Arduino15\packages\realtek\hardware\AmebaD”)

 

And also don’t forget to add your own sketch folder to the workspace (here my sketch folder is named “arduino_sketch” as seen above).

 

With these steps done, it will only takes a couple of seconds before the editor parse each and every files in the folders added and link all symbols together.

5.png

 


Now you will be able to code in your favourite editor and also to have these convenient features,

# Code Completion

6.png

# Code Hinting

7.png

# Jump to definition

8.png

Every time you save the sketch you just modified, just click anywhere of the grey area on the arduino editor and it will be automatically updated with your latest modifications, so you will still be able to one-click compile/download your code using the “Verify” or “Upload” button.

9.png


Hope you find it useful and share with me how you like to code for Arduino project 🙂

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...