ESP32 and QMC5883 and HMC5883 not compiling

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
mkopitovic
Posts: 15
http://meble-kuchenne.info.pl
Joined: Sun Dec 13, 2020 9:15 pm
Has thanked: 1 time
Been thanked: 5 times

ESP32 and QMC5883 and HMC5883 not compiling

Post by mkopitovic »

Hi flowcode community

If I add QMC5883 and HMC5883 components I get an error and I can not compile anymore.

"Device: ESP.ESP32.ESP32_WROOM_32
Generated by: Flowcode v10.1.2.40
"

"../main/esp-project.c: In function 'FCD_02e41_HMC5883_Magnetometer1__Read_Bearing':
../main/esp-project.c:830:10: error: 'FCR_RETVAL' may be used uninitialized in this function [-Werror=maybe-uninitialized]
:Returns : MX_UINT8
^
cc1.exe: some warnings being treated as errors
"

best regards

BenR
Matrix Staff
Posts: 1936
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: ESP32 and QMC5883 and HMC5883 not compiling

Post by BenR »

Thanks for letting us know, hopefully sorted for you now via the library updates.

mkopitovic
Posts: 15
Joined: Sun Dec 13, 2020 9:15 pm
Has thanked: 1 time
Been thanked: 5 times

Re: ESP32 and QMC5883 and HMC5883 not compiling

Post by mkopitovic »

Hi
thanks for the fast response,
but unfortunately there still error during compile
"C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\ESP\ESP_CAL_String.c:113:17: warning: 'FCI_GETCHAR' defined but not used [-Wunused-function]
static MX_UINT8 FCI_GETCHAR(MX_STRING sStr1, MX_UINT16 iStr1_len, MX_UINT16 iPos)
"
best regards

BenR
Matrix Staff
Posts: 1936
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: ESP32 and QMC5883 and HMC5883 not compiling

Post by BenR »

Hello,

That just looks like a warning and shouldn't cause a compile error. Can you post your project or at least your .msg.txt file so we can see the errors you're getting.

mkopitovic
Posts: 15
Joined: Sun Dec 13, 2020 9:15 pm
Has thanked: 1 time
Been thanked: 5 times

Re: ESP32 and QMC5883 and HMC5883 not compiling

Post by mkopitovic »

hi
I sending you a message and project

best regards
Attachments
QMC5883 test.fcfx
(9.01 KiB) Downloaded 242 times
QMC5883 test.msg.txt
(15.26 KiB) Downloaded 250 times

BenR
Matrix Staff
Posts: 1936
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: ESP32 and QMC5883 and HMC5883 not compiling

Post by BenR »

Thanks again,

This was the error.

../main/esp-project.c: In function 'FCD_049a1_QMC5883_Magnetometer1__UpdateCompassData':
../main/esp-project.c:272:66: error: pointer targets in passing argument 3 of 'FCD_049a1_QMC5883_Magnetometer1__Read_N_Registers' differ in signedness [-Werror=pointer-sign]

Hopefully that one resolved for you now too.

mkopitovic
Posts: 15
Joined: Sun Dec 13, 2020 9:15 pm
Has thanked: 1 time
Been thanked: 5 times

Re: ESP32 and QMC5883 and HMC5883 not compiling

Post by mkopitovic »

hi
sorry to bother you but I ran into a few more bugs trying to make a compass:
1: LSM303D_Magnetometer1 component also don't compile,
2: EBM015 component also don't compile,
3: LSM303DLHC1 don't have Read_bearing, Read register and collectXYZdata but compile normally in this moment I can't confirm that component work.

thanks
Attachments
LSM303dlhc1.jpg
LSM303dlhc1.jpg (40.47 KiB) Viewed 9125 times

Steve-Matrix
Matrix Staff
Posts: 1480
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 208 times
Been thanked: 350 times

Re: ESP32 and QMC5883 and HMC5883 not compiling

Post by Steve-Matrix »

Please post your project so we can see where the problem is.

Post Reply