Search found 6 matches

by jdbaptista
Tue Apr 22, 2025 2:50 pm
Forum: ESP-IDF
Topic: Questions about mocking components
Replies: 1
Views: 1525

Re: Questions about mocking components

Update:

I still haven't figured out how to mock esp-idf components, however I have figured out how to mock my own components in a straightforward manner by setting environment variables for CMake to use. I use the VSCode extension's multiple configuration feature, which is helpful for creating ...
by jdbaptista
Mon Mar 17, 2025 7:27 pm
Forum: ESP-IDF
Topic: Questions about mocking components
Replies: 1
Views: 1525

Questions about mocking components

Hello,

I am attempting to write unit tests that verify a mutex is taken within particular functions, which I have created a component for called app_errors. An example of one such function is:

/**
* @brief Moves the error state machine from the NO_ERR state to the
* NO_CONNECT state ...
by jdbaptista
Thu Oct 31, 2024 6:21 pm
Forum: ESP-IDF
Topic: slight change to esp_http_client_config_t url parameter breaks esp_http_client_perform
Replies: 2
Views: 3361

Re: slight change to esp_http_client_config_t url parameter breaks esp_http_client_perform

After some more use of esp-idf, I realize this was most likely a stack overflow, which can be detected by turning on stack canaries. This can be done in the Menuconfig using the FreeRTOS option configCHECK_FOR_STACK_OVERFLOW and also probably the COMPILER_STACK_CHECK_MODE option.
by jdbaptista
Thu Oct 31, 2024 6:17 pm
Forum: IDEs for ESP-IDF
Topic: vscode extension does not update testing tab unless on editor restart
Replies: 2
Views: 9751

vscode extension does not update testing tab unless on editor restart

I am writing tests in vscode using unity following the extension and esp-idf documentation and have found that the testing tab in the activity portion of the IDE does not automatically update when I write a new test, nor when I click "Refresh Tests", nor any other form of clicking in the tab (ie ...
by jdbaptista
Thu Sep 26, 2024 7:11 pm
Forum: ESP-IDF
Topic: slight change to esp_http_client_config_t url parameter breaks esp_http_client_perform
Replies: 2
Views: 3361

Re: slight change to esp_http_client_config_t url parameter breaks esp_http_client_perform

Turns out my buffer size was too small! Its unfortunate there is no easy error message for this though.
by jdbaptista
Wed Sep 25, 2024 5:39 pm
Forum: ESP-IDF
Topic: slight change to esp_http_client_config_t url parameter breaks esp_http_client_perform
Replies: 2
Views: 3361

slight change to esp_http_client_config_t url parameter breaks esp_http_client_perform

Note that the API key used here is both no longer active and was on a free account.

When esp_http_client_config_t is setup as

const esp_http_client_config_t s_defaultTomtomConfig = {
.url = url,
.auth_type = API_AUTH_TYPE,
.method = API_METHOD,
.event_handler = tomtomHandler,
.crt_bundle ...

Go to advanced search