Comments (6)
I've successfully built the libraries with working code, I had to deal with lwip CMakeLists.txt to include altcp sources.
I guess the missing altcp sources to CMakeLists was the source behind previous unsuccessful builds.
Thanks you for your guidance @me-no-dev.
from esp32-arduino-lib-builder.
Great!
from esp32-arduino-lib-builder.
Arduino adds defines like this: https://github.com/espressif/arduino-esp32/blob/release/v2.x/CMakeLists.txt#L224-L230C13
But I am not sure if it will propagate across all components, so I suggest you have a look at the build system info: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
from esp32-arduino-lib-builder.
Thanks @me-no-dev for your guidance. Unfortunately haven't succeeded with solution provided.
I've tried with different methods trying to achieve the goal:
On CMakeLists.txt level:
- add_compile_definitions()
- add_compile_options()
- target_compile_options() [gives a CMake error (Incompatible target).]
Other manual insertions:
- Adding definitions at this line in build.sh (Build IDF libs section)
- Adding the options manually in sdkconfig
- Adding the options manually in defconfig.common
No one of them succeeded in having altcp function get compiled in liblwip.a.
However, I've found something might be important at Build System document:
The document shows that esp-idf isn't part of the project being built, and it comes standalone.
So really, how can I propagate a compile-flag into ESP-IDF?
Best,
Hamza
from esp32-arduino-lib-builder.
Navigating forward, Got some guidance how to override idf libraries; by copying the library out from idf components directory to the project's components directory.
Will inform with progress.
from esp32-arduino-lib-builder.
Just to keep this information until official support of ALTCP:
Enhanced the code with more stabilized ALTCP TCP mode, but with an increased Lwip stack size needed for the enhanced code.
Normal (unenhanced code), which queues a function on main loop thread on data receive for application processing, was working good, but changing to the better code (continue processing within lwip thread just ended up crashing with this decoded log:
13:04:09.160 > Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception).
13:04:09.166 > Debug exception reason: Stack canary watchpoint triggered (tiT)
13:04:09.172 > Core 0 register dump:
13:04:09.174 > PC : 0x4008db4d PS : 0x00060036 A0 : 0x4008bfb7 A1 : 0x3ffb2340
13:04:09.182 > A2 : 0x3ffc5644 A3 : 0x3ffc5658 A4 : 0x3ffc5658 A5 : 0x00000001
13:04:09.190 > A6 : 0x00000000 A7 : 0x00000018 A8 : 0x3ffc564c A9 : 0x3ffb2320
13:04:09.198 > A10 : 0x3ffb9454 A11 : 0x3ffb9454 A12 : 0x00000014 A13 : 0x00000000
13:04:09.206 > A14 : 0x3ffb7a28 A15 : 0x80000001 SAR : 0x00000018 EXCCAUSE: 0x00000001
13:04:09.213 > EXCVADDR: 0x00000000 LBEG : 0x400894cc LEND : 0x400894d7 LCOUNT : 0x00000000
13:04:09.221 >
13:04:09.221 >
13:04:09.222 > Backtrace: 0x4008db4a:0x3ffb2340 0x4008bfb4:0x3ffb2370 0x4008bf64:0xa5a5a5a5 |<-CORRUPTED
13:04:09.311 >
13:04:09.311 > #0 0x4008db4a:0x3ffb2340 in taskSelectHighestPriorityTaskSMP at /home/hamza/arduino/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3436
13:04:09.311 > (inlined by) vTaskSwitchContext at /home/hamza/arduino/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3519
13:04:09.311 > #1 0x4008bfb4:0x3ffb2370 in _frxt_dispatch at /home/hamza/arduino/esp32-arduino-lib-builder/esp-idf/components/freertos/port/xtensa/portasm.S:436
13:04:09.311 > #2 0x4008bf64:0xa5a5a5a5 in _frxt_int_exit at /home/hamza/arduino/esp32-arduino-lib-builder/esp-idf/components/freertos/port/xtensa/portasm.S:231
Which after further research, found it relates to limited lwip stack size. Thus rebuilt libraries with increased Lwip stack size of 3072 (up from 2560) and it successfully worked.
I'll inform with further notes in my progress upgrading to TLS.
from esp32-arduino-lib-builder.
Related Issues (20)
- Windows build? HOT 4
- mbedtls_calloc fail HOT 1
- error: implicit declaration of function 'esp_rmaker_cmd_prepare_empty_response' HOT 3
- Linking error "esp_phy/lib/esp32c3/libbtbb.a: file not recognized: file format not recognized" HOT 3
- ./build.sh command ends in ERROR: Can't reliably evaluate relative path without context: ../rmaker_common
- Fails to build on Ubuntu 22 with dependency issue HOT 4
- build lib v4.4 with option idf_libs failed HOT 2
- lib builder v5.1 with option build all running building process indefinitely HOT 3
- "Unknown targets: esp32c6" building against Arduino's idf-release/v5.1 branch HOT 3
- qrcode.h not found HOT 6
- Error at generating PlatformIO manifest HOT 40
- Adding Zigbee lib as a component HOT 4
- Error with copy-to-arduino.sh HOT 2
- Linker error due to zigbee HOT 2
- eth patch files are outdated HOT 1
- Built library is not the same as official one HOT 2
- inconsistent setting for: `CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y` HOT 2
- Question: Using component `esp_tinyusb` HOT 1
- ULP not included for S2 & S3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-arduino-lib-builder.