sparkfun / SparkFun_HM01B0_Camera_ArduinoLibrary

Extensible library to use the Himax HM01B0 camera in Arduino
15 stars 4 forks source link

Errors with latest Apollo3 Edge core in Arduino (2.2.1), libmbed-os.a conflict #6

Open plaurent opened 2 years ago

plaurent commented 2 years ago

The Example1_StopMotion example fails to compile when using the latest Apollo3 Edge 2.2.1 board support in Arduino 1.8.19.

If I use the HM01B0 0.0.3 release available through Manage Libraries with Apollo3 2.2.1, it seems the code expects some constants or definitions that are no longer being used. The errors are:

/Users/patryk/Documents/Arduino/libraries/SparkFun_Himax_HM01B0_Camera/src/hm01b0_c/src/hm01b0_c.c:20:2: error: #error "Unsupported platform: Submit an issue / pull request to https://github.com/sparkfun/SparkFun_HM01B0_Camera_ArduinoLibrary to add support for your target"
 #error "Unsupported platform: Submit an issue / pull request to https://github.com/sparkfun/SparkFun_HM01B0_Camera_ArduinoLibrary to add support for your target"
  ^~~~~
exit status 1
Error compiling for board Edge.

I noticed the lines outputting this error are removed from master, so I tried using master instead.

If I use HM01B0 library master with Apollo3 2.2.1, it seems libmbed-os.a now already defines the symbols in the Himax camera library. The errors are:

In file included from /Users/patryk/Documents/Arduino/libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/src/hm01b0.c:12:
/Users/patryk/Documents/Arduino/libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/src/hm01b0_platform.h:30:4: warning: #warning "No platform implementation - falling back to generic Arduino interface. Performance not guaranteed." [-Wcpp]
   #warning "No platform implementation - falling back to generic Arduino interface. Performance not guaranteed."
    ^~~~~~~
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_write_reg':
HM01B0.c:(.text.hm01b0_write_reg+0x0): multiple definition of `hm01b0_write_reg'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_write_reg+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_read_reg':
HM01B0.c:(.text.hm01b0_read_reg+0x0): multiple definition of `hm01b0_read_reg'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_read_reg+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_load_script':
HM01B0.c:(.text.hm01b0_load_script+0x0): multiple definition of `hm01b0_load_script'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_load_script+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_power_up':
HM01B0.c:(.text.hm01b0_power_up+0x0): multiple definition of `hm01b0_power_up'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_power_up+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_power_down':
HM01B0.c:(.text.hm01b0_power_down+0x0): multiple definition of `hm01b0_power_down'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_power_down+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_mclk_enable':
HM01B0.c:(.text.hm01b0_mclk_enable+0x0): multiple definition of `hm01b0_mclk_enable'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_mclk_enable+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_mclk_disable':
HM01B0.c:(.text.hm01b0_mclk_disable+0x0): multiple definition of `hm01b0_mclk_disable'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_mclk_disable+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_init_if':
HM01B0.c:(.text.hm01b0_init_if+0x0): multiple definition of `hm01b0_init_if'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_init_if+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_deinit_if':
HM01B0.c:(.text.hm01b0_deinit_if+0x0): multiple definition of `hm01b0_deinit_if'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_deinit_if+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_get_modelid':
HM01B0.c:(.text.hm01b0_get_modelid+0x0): multiple definition of `hm01b0_get_modelid'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_get_modelid+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_init_system':
HM01B0.c:(.text.hm01b0_init_system+0x0): multiple definition of `hm01b0_init_system'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_init_system+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_test_walking1s':
HM01B0.c:(.text.hm01b0_test_walking1s+0x0): multiple definition of `hm01b0_test_walking1s'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_test_walking1s+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_test_walking1s_check_data_sanity':
HM01B0.c:(.text.hm01b0_test_walking1s_check_data_sanity+0x0): multiple definition of `hm01b0_test_walking1s_check_data_sanity'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_test_walking1s_check_data_sanity+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_reset_sw':
HM01B0.c:(.text.hm01b0_reset_sw+0x0): multiple definition of `hm01b0_reset_sw'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_reset_sw+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_get_mode':
HM01B0.c:(.text.hm01b0_get_mode+0x0): multiple definition of `hm01b0_get_mode'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_get_mode+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_set_mode':
HM01B0.c:(.text.hm01b0_set_mode+0x0): multiple definition of `hm01b0_set_mode'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_set_mode+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_cmd_update':
HM01B0.c:(.text.hm01b0_cmd_update+0x0): multiple definition of `hm01b0_cmd_update'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_cmd_update+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_get_ae':
HM01B0.c:(.text.hm01b0_get_ae+0x0): multiple definition of `hm01b0_get_ae'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_get_ae+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_save_exposure_gains':
HM01B0.c:(.text.hm01b0_save_exposure_gains+0x0): multiple definition of `hm01b0_save_exposure_gains'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_save_exposure_gains+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_restore_exposure_gains':
HM01B0.c:(.text.hm01b0_restore_exposure_gains+0x0): multiple definition of `hm01b0_restore_exposure_gains'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_restore_exposure_gains+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_hardware_trigger_streaming':
HM01B0.c:(.text.hm01b0_hardware_trigger_streaming+0x0): multiple definition of `hm01b0_hardware_trigger_streaming'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_hardware_trigger_streaming+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_set_mirror':
HM01B0.c:(.text.hm01b0_set_mirror+0x0): multiple definition of `hm01b0_set_mirror'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_set_mirror+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_blocking_read_oneframe':
HM01B0.c:(.text.hm01b0_blocking_read_oneframe+0x0): multiple definition of `hm01b0_blocking_read_oneframe'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_blocking_read_oneframe+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o): in function `hm01b0_cal_ae':
HM01B0.c:(.text.hm01b0_cal_ae+0x0): multiple definition of `hm01b0_cal_ae'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:hm01b0.c:(.text.hm01b0_cal_ae+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o):(.rodata.g_HM01B0_pin_int+0x0): multiple definition of `g_HM01B0_pin_int'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/platforms/apollo3/src/hm01b0_platform_apollo3.c.o:(.rodata.g_HM01B0_pin_int+0x0): first defined here
/Users/patryk/Library/Arduino15/packages/SparkFun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld: /Users/patryk/Library/Arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_EDGE/mbed/libmbed-os.a(HM01B0.o):(.rodata.sHM01b0TestModeScript_Walking1s+0x0): multiple definition of `sHM01b0TestModeScript_Walking1s'; libraries/ASparkFun_HM01B0_Camera_ArduinoLibrary/hm01b0.c.o:(.rodata.sHM01b0TestModeScript_Walking1s+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Edge.

Do you have any suggestions on how to address these errors and use this library with the latest Apollo3 Edge library support in Arduino?

Thank you.

StargazerX0 commented 1 year ago

I also face the same issue. Delete your currenr boards package and try to use this board manager url : https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json and install SparkFun Apollo3 Boards package. This should work.

oclyke commented 5 months ago

Closing b/c this seems to have been resolved, please re-open if this is not the case.

JK I can't close issues haha.