Thanks for you answer ! But if there's no DEBUG/RELEASE defined by the ESP-IDF the simplest solution is to have my own global #define somewhere in my code...
I asked because it's a common pattern in IDEs to have a way to detect the current build type through a defined symbol...
Search found 9 matches
- Mon Nov 20, 2023 4:41 pm
- Forum: ESP-IDF
- Topic: How to detect DEBUG / RELEASE kind of build ?
- Replies: 2
- Views: 1421
- Sun Nov 19, 2023 5:20 pm
- Forum: ESP-IDF
- Topic: How to detect DEBUG / RELEASE kind of build ?
- Replies: 2
- Views: 1421
How to detect DEBUG / RELEASE kind of build ?
Hi all ! I stumbled upon this simple problem : how can I detect a DEBUG build ?
Basically I need something like
Note : VS Code + ESP IDF extension
Basically I need something like
Code: Select all
#ifdef THERE_MUST_BE_AN_IDF_DEBUG_DEFINED_SOMEWHERE
#define FOO(x) { /* some stuf */ }
#else
#define FOO(x)
#endif
- Sat Nov 18, 2023 5:44 pm
- Forum: ESP-IDF
- Topic: Help for the TCP/IP Server in access point mode
- Replies: 2
- Views: 3308
Re: Help for the TCP/IP Server in access point mode
I'm not a sockets Guru but I think you should change serverAddress.sin_addr.s_addr = htonl(INADDR_ANY); to inet_pton(AF_INET, "192.168.4.1", &serverAddress.sin_addr); because "192.168.4.1" is the IP addr of the softAP thing, and this is the (iface ? dunno what to call it) you want to bind your socke...
- Sun Nov 12, 2023 10:18 am
- Forum: ESP-IDF
- Topic: STA_softAP + UDP broadcast on softAP side problem
- Replies: 1
- Views: 698
Re: STA_softAP + UDP broadcast on softAP side problem
My bad : when using a static struct to build a packet ALWAYS initialize it with 0s before doing anything else !
Of course, not doing so, the packet will have some wrongly initialized values (from the previous one)
Of course, not doing so, the packet will have some wrongly initialized values (from the previous one)
- Sat Nov 11, 2023 2:14 pm
- Forum: ESP-IDF
- Topic: STA_softAP + UDP broadcast on softAP side problem
- Replies: 1
- Views: 698
STA_softAP + UDP broadcast on softAP side problem
Hi all, I'm driving a smart bulb with an ESP32. The ESP is configured as a sta_softap (no bluetooth stack) and everything is fine : the ESP is connected through STA and the bulb is connected to the AP side. Then, to have a separation of concerns I create 3 sockets (alongside 3 struct sockaddr_in) - ...
- Mon Feb 21, 2022 4:06 pm
- Forum: ESP-IDF
- Topic: Unstable/frozen console using linenoise()
- Replies: 1
- Views: 2005
Re: Unstable/frozen console using linenoise()
Still having problems from time to time...
Any clue ?
Any clue ?
- Mon Jan 31, 2022 11:35 am
- Forum: ESP-IDF
- Topic: Unstable/frozen console using linenoise()
- Replies: 1
- Views: 2005
Unstable/frozen console using linenoise()
Hi all, I'm trying to get linenoise working (over usb and idf monitor, nothing fancy) I'm getting unstable behaviour that might be caused by the way I initialize the uart driver, can someone tell me if there's something wrong with this code ? By "unstable behaviour" I mean : working as intended OR l...
- Sat Jan 15, 2022 5:19 pm
- Forum: ESP-IDF
- Topic: i2s internal dac throughput / overflow somewhere ?
- Replies: 1
- Views: 2443
Re: i2s internal dac throughput / overflow somewhere ?
I switched to an external DAC, and with the exact same code (minus configuration needed by the DAC) I now have correct statistics...
Never mind, using an external DAC is the way to go in any cases !
Never mind, using an external DAC is the way to go in any cases !
- Mon Jan 10, 2022 5:46 pm
- Forum: ESP-IDF
- Topic: i2s internal dac throughput / overflow somewhere ?
- Replies: 1
- Views: 2443
i2s internal dac throughput / overflow somewhere ?
Hi all ! I'm coding a small app that generate a real time audio signal on internal dac. Then in a nutshell, the busy loop is something like that : while (true) { xSemaphoreTake(mutex, portMAX_DELAY); for (int i = 0; i < AUDIO_BUFFER_SIZE; i++) { // compute_stuff } xSemaphoreGive(mutex); samples_proc...