10-01-2020 12:47 PM
Hello, i'm new of this forum, i try to use the API of "bmx160.h" files with an 8-bit microcntroller in C- language but there is a declaretion of an array inside a function that needed dinamic allocation of memory.
In the file attached the array is named "uint8_t temp_buf[temp_len];" and the dimension of array "temp_len" is a parameter passed to the function.
The compiler give me this error: "BMX160_drivers/bmi160.c:1369:21: error: variable length arrays are not supported" .
Does anyone know what needs to be done to make the compiler allocate memory?
Thank you!
Solved! Go to Solution.
10-23-2020 09:55 AM
Good Mornig, with the PIC32 Microchip microcontroller the compiler acept the original declaration of vector "uint8_t temp_buf[temp_len];"
10-26-2020 11:50 PM
this should work as long as you know that in your app you are not reading more than 142 bytes of data