Author Topic: vscode platformio esp-idf framework  (Read 1437 times)

0 Members and 1 Guest are viewing this topic.

Offline Alex QWTopic starter

  • Contributor
  • Posts: 23
  • Country: us
vscode platformio esp-idf framework
« on: January 09, 2024, 06:04:34 am »
hi guys,

I am using the vc code platform io esp-idf framework but on the terminal side I cannot get the "hello word" output
may I know how to solve it?

Image provided.
 

Offline darkspr1te

  • Frequent Contributor
  • **
  • Posts: 294
  • Country: zm
Re: vscode platformio esp-idf framework
« Reply #1 on: January 09, 2024, 06:32:09 am »
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 fails




darkspr1te

 

Offline Alex QWTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: vscode platformio esp-idf framework
« Reply #2 on: January 09, 2024, 07:02:44 am »
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 file


From
Alex.
 

Offline darkspr1te

  • Frequent Contributor
  • **
  • Posts: 294
  • Country: zm
Re: vscode platformio esp-idf framework
« Reply #3 on: January 09, 2024, 07:26:52 am »
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

 

Offline Alex QWTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: vscode platformio esp-idf framework
« Reply #4 on: January 09, 2024, 07:29:30 am »
hi,
 
the connection is well as shown picture below:
 

Offline Datom

  • Newbie
  • Posts: 8
  • Country: cn
Re: vscode platformio esp-idf framework
« Reply #5 on: January 09, 2024, 07:45:45 am »
The program seems to have been downloaded, but I'm not sure if the target of printf is COM6
 

Offline Alex QWTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: vscode platformio esp-idf framework
« Reply #6 on: January 09, 2024, 07:48:10 am »
hi guys

Do you know any source and tutorial to study how the platform io work?

From
Alex.
 

Offline bookaboo

  • Frequent Contributor
  • **
  • Posts: 732
  • Country: ie
Re: vscode platformio esp-idf framework
« Reply #7 on: January 09, 2024, 08:13:49 am »
- 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") anyway

Once 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.
« Last Edit: January 09, 2024, 08:15:46 am by bookaboo »
 

Offline Alex QWTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: vscode platformio esp-idf framework
« Reply #8 on: January 09, 2024, 08:55:44 am »
Hi bookaboo,

May I know how ESPIDF is quirks?

From
Alex.
 

Offline bookaboo

  • Frequent Contributor
  • **
  • Posts: 732
  • Country: ie
Re: vscode platformio esp-idf framework
« Reply #9 on: January 09, 2024, 10:44:34 am »
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.
« Last Edit: January 09, 2024, 11:09:14 am by bookaboo »
 
The following users thanked this post: Alex QW

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11602
  • Country: ch
Re: vscode platformio esp-idf framework
« Reply #10 on: January 13, 2024, 12:17:20 pm »
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 file


From
Alex.
Try 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.
 

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: vscode platformio esp-idf framework
« Reply #11 on: January 13, 2024, 03:37:13 pm »
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/software

https://randomnerdtutorials.com/getting-started-with-esp32/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf