Search found 182 matches

by Gfast2
Thu Nov 09, 2017 7:10 pm
Forum: General Discussion
Topic: How to get "CPU load" and "Memory Usage"
Replies: 18
Views: 54046

Re: How to get "CPU load" and "Memory Usage"

Hi Gfast. Idle task ideia: long ctr = 0; void setup() { xTaskCreatePinnedToCore(id, "id", 4096, NULL, 0, NULL, 0); } void loop() { } void id(void*z) { while (1) { ctr++; delay(10); } } if the cpu is stopped, in 1 second the CTR will be 100. If not, it will be any smaller value. After 1sec, you need...
by Gfast2
Thu Nov 09, 2017 8:12 am
Forum: General Discussion
Topic: How to get "CPU load" and "Memory Usage"
Replies: 18
Views: 54046

Re: How to get "CPU load" and "Memory Usage"

Hi Gfast. Idle task ideia: long ctr = 0; void setup() { xTaskCreatePinnedToCore(id, "id", 4096, NULL, 0, NULL, 0); } void loop() { } void id(void*z) { while (1) { ctr++; delay(10); } } if the cpu is stopped, in 1 second the CTR will be 100. If not, it will be any smaller value. After 1sec, you need...
by Gfast2
Thu Nov 09, 2017 8:10 am
Forum: General Discussion
Topic: How to get "CPU load" and "Memory Usage"
Replies: 18
Views: 54046

Re: How to get "CPU load" and "Memory Usage"

You can also loop though all running tasks and get the TaskStatus_t for each task. Which contains usStackHighWaterMark. if CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is defined you can also get vTaskGetRunTimeStats or ulRunTimeCounter from TaskStatus_t, although you might have to do some things to get...
by Gfast2
Wed Nov 08, 2017 9:55 am
Forum: General Discussion
Topic: How to let webserver access file system of the SD Card
Replies: 12
Views: 21079

Re: How to let webserver access file system of the SD Card

Gfast2, I also am more than 50 years old ... so don't listen to a word I say :-) I'm afraid I was programming in C and C++ before Java was even a concept. There is a lot of FUD when folks thing of C++. The simplest way to think of it (in my opinion) is that C++ is a superset of C. What I mean by th...
by Gfast2
Tue Nov 07, 2017 7:45 pm
Forum: General Discussion
Topic: How to let webserver access file system of the SD Card
Replies: 12
Views: 21079

Re: How to let webserver access file system of the SD Card

Hi guys, The attatchment of my post https://www.esp32.com/viewtopic.php?f=2&t=3522&p=16307&hilit=wifi%3A+bcn_timout%2Cap_probe_send_start#p16307 contains a http server that reads from SD card connected in SPI mode. The problems described in this post are not related to the http part. Dig Hi Dig Kle...
by Gfast2
Tue Nov 07, 2017 7:43 pm
Forum: General Discussion
Topic: How to let webserver access file system of the SD Card
Replies: 12
Views: 21079

Re: How to let webserver access file system of the SD Card

I have stopped tinkering with the Mongoose web server. Don't get me wrong, I think its a fantastic piece of work. My choice to not use the Mongoose server was because I wanted something that was based on C++ and I wanted to "play" with what is involved in making a Web Server. To that end, we have b...
by Gfast2
Tue Nov 07, 2017 9:13 am
Forum: General Discussion
Topic: How to let webserver access file system of the SD Card
Replies: 12
Views: 21079

Re: How to let webserver access file system of the SD Card

I think the answer is going to be a function of what software you use as a Web Server / HTTP Stack. The excellent Mongoose library will have one answer and my work in C++ classes has a different answer. As for sharing an "open file descriptor" between tasks, that should work fine as long as you are...
by Gfast2
Tue Nov 07, 2017 4:27 am
Forum: General Discussion
Topic: New ESP32 web IDE now available
Replies: 1
Views: 13735

Re: New ESP32 web IDE now available

;) ;) ;)
by Gfast2
Mon Nov 06, 2017 8:00 pm
Forum: General Discussion
Topic: SafeRTOS support
Replies: 2
Views: 4462

SafeRTOS support

Hi ESP-IDF, Because I'm located in Germany, Everything has to go through a very strict safety test before is selled on the market. (Like everywhere does actually :lol: ). If I build stuff aiming daylly hausehold devices, there should be no problem to live with freeRTOS . But I slowly reallize (throu...
by Gfast2
Mon Nov 06, 2017 7:45 pm
Forum: General Discussion
Topic: How to let webserver access file system of the SD Card
Replies: 12
Views: 21079

How to let webserver access file system of the SD Card

Hi ESP-IDF, I just wunder, how to let ESP32 plays like a traditional static webserver? My goal ist to let Mongoose Webserver access the virtual filesystem of SD card, and fetch the file that the webserver need. I got this idea from Mongoose's stock example HERE This is the code snippet that do the m...