Trouble building code

tbar23
Posts: 3
Joined: Sun Oct 24, 2021 1:08 pm

Trouble building code

Postby tbar23 » Sun Oct 24, 2021 1:23 pm

I have inherited some code running on ESP32 that has not been built in about 18 months. I have installed IDF but cannot seem to get a successful build. I used menuconfig to change the flash size to 4Mb (consistent with my hardware), use a custom partition (consistent with previous build) and enable Bluetooth (consistent with previous build).

I see something strange around step 1193/1290:
[1193/1290] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/ble.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/ble.c.obj
As well as this issue:
/Users/trevor/esp/spotscanner/main/ble.c:92:31: error: 'BLE_SCAN_FILTER_ALLOW_WLIST_PRA_DIR' undeclared (first use in this function); did you mean 'BLE_SCAN_FILTER_ALLOW_WLIST_RPA_DIR'?
.scan_filter_policy = BLE_SCAN_FILTER_ALLOW_WLIST_PRA_DIR,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BLE_SCAN_FILTER_ALLOW_WLIST_RPA_DIR
/Users/trevor/esp/spotscanner/main/ble.c:92:31: note: each undeclared identifier is reported only once for each function it appears in
[1200/1290] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/console.c.obj
And the final output:
[1202/1290] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsod...r/libsodium/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c.ob
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Because this code has compiled in the past, I'm thinking that I must have some kind of configuration issue.

Suggestions on how to troubleshoot?

ESP_Sprite
Posts: 9013
Joined: Thu Nov 26, 2015 4:08 am

Re: Trouble building code

Postby ESP_Sprite » Mon Oct 25, 2021 1:10 am

/Users/trevor/esp/spotscanner/main/ble.c:92:31: error: 'BLE_SCAN_FILTER_ALLOW_WLIST_PRA_DIR' undeclared (first use in this function); did you mean 'BLE_SCAN_FILTER_ALLOW_WLIST_RPA_DIR'?
Seems like some kind of typo, either in your code, or in ESP-IDF that got fixed somewhere along the way.

tbar23
Posts: 3
Joined: Sun Oct 24, 2021 1:08 pm

Re: Trouble building code

Postby tbar23 » Mon Oct 25, 2021 12:43 pm

@ESP_Sprite - I think you are correct. I was thrown a bit because I see evidence of both the PRA/RPA filter existing. However, it does look like something changed - if I correct that undeclared variable, everything builds properly.

Thanks for the prompt response!

Who is online

Users browsing this forum: No registered users and 88 guests