04-02-2023 08:43 AM
The example "bme68x_demo_sample" does not compile.
Out of RAM: "dram0_0_seg" overflowed by 9256 bytes.
Each instance is allocated in memory: BSEC_INSTANCE_SIZE 3272
There are two conflicting defines:
NUM_OF_SENS 4
NUM_BME68X_UNITS 8
Where to specify the number of sensors, and where is multi instance? How to run this version at least on a standard board with 8 sensors? The new version is very demanding on memory and cannot be applied to a large number of sensors > 8.
04-26-2023 09:12 PM
After uploading the demo from the 1.4 BSEC2 library, the (latest) Android app now complains about missing bsec config, but it's on the sd card.
This thread suggests matching the right version of AI studio. I'm currently on the latest, but not sure how to get older versions from Bosch.
Do you happen to have the matching versions and wouldn't mind uploading here?
04-27-2023 10:08 AM
05-31-2023 05:06 AM
Hi all,
bme68x_demo_sample is the code implement of bme68x_demo_sample.ino.bin under folder "BME688_x8Board_v1.5.0\BME688_x8Board_v1.5.0".
If you would like to run BSEC and get IAQ, CO2, estimate output, you should run the example code generic_examples https://github.com/boschsensortec/Bosch-BSEC2-Library/tree/master/examples/generic_examples
07-25-2024 10:18 AM
It sounds like you're encountering a memory allocation issue with the bme68x_demo_sample due to conflicts in the number of sensor definitions and the physical memory limits of your board. Given the error message "dram0_0_seg overflowed by 9256 bytes" and the specifics you've mentioned, it looks like the application is trying to allocate more memory than is available on your ESP32 board.
Here's how you can resolve this issue:
1. Reduce the Number of Sensors: Since each sensor instance (BSEC_INSTANCE_SIZE) consumes 3272 bytes and your current settings are for 8 sensors, this significantly exceeds the default memory capacity of standard ESP32 boards like the ESP32-WROOM-32E(https://www.xecor.com/product/esp32-wroom-32e-n16). Adjust the NUM_BME68X_UNITS to a lower number that fits within the memory limits of your board. Start with the same number as NUM_OF_SENS (i.e., 4) to see if this resolves the memory overflow issue.
2. Configuration and Compilation Settings: Ensure that the configuration in your development environment matches the physical setup and memory capabilities of your ESP32 board. Double-check that the settings in the SDK configuration (sdkconfig) file align with these requirements.
3. Optimize Memory Usage: Look for opportunities to optimize the memory usage in your code. This might involve modifying how data is stored and managed or reducing the footprint of other parts of your application.
4. Multi-instance Management: If you need to manage multiple sensor instances, make sure that your code correctly handles these instances within the memory constraints. This can be managed by dynamically allocating and deallocating memory as needed, rather than having all instances reside in memory simultaneously.
5. Test on a Compatible Board: If reducing the number of sensors and optimizing the code does not resolve the issue, consider testing the application on a board with higher memory capacity or one that supports external memory.
By carefully managing the memory and adjusting the number of sensor instances, you should be able to run your application successfully on standard ESP32 boards. If the application's memory demands continue to exceed what's available, you might need to consider either upgrading the hardware or further optimizing the software.
08-28-2024 10:46 AM
To resolve the RAM overflow issue and run the BSEC2 library with multiple BME68x sensors on a standard board, you need to make a few adjustments to the configuration and code. Here's how you can proceed:
1. Specify the number of sensors:
- In the BSEC2 library, the number of sensors is defined by the `NUM_BME68X_UNITS` macro.
- Ensure that `NUM_BME68X_UNITS` is set to the actual number of sensors you are using, which in your case is 8.
- Remove or comment out the conflicting `NUM_OF_SENS` definition to avoid confusion.
2. Adjust memory allocation:
- The BSEC2 library allocates memory for each sensor instance using the `BSEC_INSTANCE_SIZE` macro.
- With 8 sensors, the total memory required is `8 * BSEC_INSTANCE_SIZE`, which is causing the RAM overflow.
- To accommodate more sensors, you may need to optimize memory usage in other parts of your code or consider using a board with more RAM.
3. Enable multi-instance support:
The BSEC2 library supports multi-instance functionality, allowing you to use multiple sensors simultaneously. Ensure that the multi-instance feature is properly enabled and configured in your code. You may need to modify the example code to handle multiple sensor instances correctly.