Why does VL53L1X full API take up SO much memory?
- November 1, 2019
- 2 replies
- 1281 views
So I am working with a VL53L1X sensor on a LPC804 from NXP. I am using the full API (STSW_img007). I made a simple test to see if I could get the I2C functions running allright, so I tried to read out the model ID. When I was successful, I wanted to move on to see if I could make some measurements and get the data out. So I plugged in some code I found in an example to get started, but suddenly I did not have enough memory from my code. I can see that the code jumpes from around 12KB to a whooping 38KB just by implementing these test functions.
So now I cant go further, because the code is too large. It says on ST.com that the full API would take up around 9KB, so I have no idea why this is happening.
Does anyone know why it takes up so much memory and what I can do about it? The two pictures show my test code for I2C and my code for range measurement.
Bonus question: I tried to look at the .map file that is generated when I build the code in order to determin what was taking up so much space. My .map file was hard to get any useful data out of, because there were so many debug.o files. Is there an easy way to turn off the logging function in the VL53L1X full API? I am asking as I suspect that the debug.o files are from the logging function.
Thanks
