vscode platformio esp-idf framework  - Page 1
Forum section: electronics / general

author: Alex QW
author_rank: Contributor
timestamp: January 09, 2024, 06:04:34 am
content: hi guys,I am using the vc code platform io esp-idf framework but on the terminal side I cannot get the "hello word" outputmay I know how to solve it?Image provided.

author: darkspr1te
author_rank: Frequent Contributor
timestamp: January 09, 2024, 06:32:09 am
content: Which Esp device are you using?What is your hello world code ? is it writing to the serial port ? if so which one ?do you blink the light at all ? this is handy to show running code even if all else failsdarkspr1te

author: Alex QW
author_rank: Contributor
timestamp: January 09, 2024, 07:02:44 am
content: HI, Darkspr1te,I am using ESP32-S3-DevKitC-1-N8R8 I am new to the esp32 microcontroller I show you my code and platform.ini fileFromAlex.

author: darkspr1te
author_rank: Frequent Contributor
timestamp: January 09, 2024, 07:26:52 am
content: I see this model has USB port for programming and one for the onboard usb-uart chip, are you connecting this as well ? as i think this is the serial port it defaults too and not the programming USB port.darkspr1te

author: Alex QW
author_rank: Contributor
timestamp: January 09, 2024, 07:29:30 am
content: hi,the connection is well as shown picture below:

author: Datom
author_rank: Contributor
timestamp: January 09, 2024, 07:45:45 am
content: The program seems to have been downloaded, but I'm not sure if the target of printf is COM6

author: Alex QW
author_rank: Contributor
timestamp: January 09, 2024, 07:48:10 am
content: hi guysDo you know any source and tutorial to study how the platform io work?FromAlex.

author: bookaboo
author_rank: Frequent Contributor
timestamp: January 09, 2024, 08:13:49 am
content: - Try leaving out the monitor_rts and monitor_dtr lines, I've never encountered those.- Check for the output on your terminal program of choice on COM6.- Add in a delay and toggle a pin as a sanity check.- better to print with ESP_LOGI("MAIN", "Hello World") anywayOnce you get this working I'd ditch Platformio if you want to use/learn ESPIDF in the long term. There are some things that Platformio does that makes it easier to get started but ultimately it's another abstraction layer on top of ESPIDF which will eventually get in the way of something you want to do.ESPIDF is very powerful but has it's quirks, these are often fixed in ESPIDF updates which pio always lags behind on. One of our team began a rather large project on the pio ESPIDF and all was well until we hit a deep sleep issue that was only solved in 5.2. So we ended up just going with the bare vscode+ESPIDF, which was a pain at the time but I wouldn't go back now.Youtube is full of tutorials, in fact it's better documented by far than pio. There's also espressifs own Eclipse version which I hear good things about, but have not used personally.That said, I'd stick with pio until you get blinky and hello world and have some fun, you dont need to mod the codebase to transition afterwards.

author: Alex QW
author_rank: Contributor
timestamp: January 09, 2024, 08:55:44 am
content: Hi bookaboo,May I know how ESPIDF is quirks?FromAlex.

author: bookaboo
author_rank: Frequent Contributor
timestamp: January 09, 2024, 10:44:34 am
content: Generally it's very good, the ESP32 doesn't have any more issues (in my experience) than other ranges of chips. The quirks are usually edge cases, so no reason to be afraid.The point is that if using Arduino or PlatformIO, you will not be able to fix some of the things you find.Those platforms are great for getting started and simple projects, but not for in depth development.Edit - If you are a beginner, then Arduino or PlatformIO may be best for now.

author: tooki
author_rank: Super Contributor
timestamp: January 13, 2024, 12:17:20 pm
content: Quote from: Alex QW on January 09, 2024, 07:02:44 amTry adding a line break to the printf statement, like so:printf("Hello world!\n");If that works, you know the hardware is set up properly.If you actually need to send characters without a line break, then you can instantiate a serial interface “properly” and send them through that.

author: Lindley
author_rank: Regular Contributor
timestamp: January 13, 2024, 03:37:13 pm
content: Agree using the Arduino IDE is so easy to get going with the ESP32, using Windows, Mac or Linux.Simply install the free Arduino IDE and then add in the ESP boards etc as detailed in this good tutorial and you will find the IDE has a mass of inbuilt Examples plus all those shown in the RNerds tutorial.https://www.arduino.cc/en/softwarehttps://randomnerdtutorials.com/getting-started-with-esp32/