ESP32CAM Fails at Linking firmware.elf
See original GitHub issueI am using PlatformIO v2.2.1 I am trying to set up this project although I am getting some errors, other errors I was able to debug and find a solution, but this elf issue I cannot seem to resolve.
The tutorial is here https://d268s23yov0ww.cloudfront.net/aws-csdk-mqtt-rekognition-src.zip - a aws guide by amazon.
my plantformio.ini looks like this
[env:esp32dev] platform = espressif32 **//I have also tried using the url here as per other solutions, still same error** framework = espidf **// I have also swapped board and framework order, still same issue.** board = esp32cam monitor_speed = 115200 upload_port = COM32 board_build.embed_txtfiles = src/certs/private.pem.key src/certs/certificate.pem.crt src/certs/aws-root-ca.pem board_build.partitions = partitions_singleapp.csv
Below is the error i receive
Linking .pio\build\esp32dev\firmware.elf c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\aws-root-ca.pem.S.o: in function
aws_root_ca_pem’:
(.rodata.embedded+0x0): multiple definition of aws_root_ca_pem'; .pio\build\esp32dev\aws-root-ca.pem.o:(.rodata.embedded+0x0): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\aws-root-ca.pem.S.o: in function
aws_root_ca_pem’:
(.rodata.embedded+0x0): multiple definition of _binary_aws_root_ca_pem_start'; .pio\build\esp32dev\aws-root-ca.pem.o:(.rodata.embedded+0x0): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\aws-root-ca.pem.S.o: in function
_binary_aws_root_ca_pem_end’:
(.rodata.embedded+0x4a5): multiple definition of _binary_aws_root_ca_pem_end'; .pio\build\esp32dev\aws-root-ca.pem.o:(.rodata.embedded+0x4a5): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\aws-root-ca.pem.S.o: in function
_binary_aws_root_ca_pem_end’:
(.rodata.embedded+0x4a5): multiple definition of aws_root_ca_pem_length'; .pio\build\esp32dev\aws-root-ca.pem.o:(.rodata.embedded+0x4a5): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\certificate.pem.crt.S.o: in function
certificate_pem_crt’:
(.rodata.embedded+0x0): multiple definition of certificate_pem_crt'; .pio\build\esp32dev\certificate.pem.crt.o:(.rodata.embedded+0x0): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\certificate.pem.crt.S.o: in function
certificate_pem_crt’:
(.rodata.embedded+0x0): multiple definition of _binary_certificate_pem_crt_start'; .pio\build\esp32dev\certificate.pem.crt.o:(.rodata.embedded+0x0): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\certificate.pem.crt.S.o: in function
_binary_certificate_pem_crt_end’:
(.rodata.embedded+0x4c9): multiple definition of _binary_certificate_pem_crt_end'; .pio\build\esp32dev\certificate.pem.crt.o:(.rodata.embedded+0x4c9): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\certificate.pem.crt.S.o: in function
_binary_certificate_pem_crt_end’:
(.rodata.embedded+0x4c9): multiple definition of certificate_pem_crt_length'; .pio\build\esp32dev\certificate.pem.crt.o:(.rodata.embedded+0x4c9): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\private.pem.key.S.o: in function
private_pem_key’:
(.rodata.embedded+0x0): multiple definition of private_pem_key'; .pio\build\esp32dev\private.pem.key.o:(.rodata.embedded+0x0): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\private.pem.key.S.o: in function
private_pem_key’:
(.rodata.embedded+0x0): multiple definition of _binary_private_pem_key_start'; .pio\build\esp32dev\private.pem.key.o:(.rodata.embedded+0x0): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\private.pem.key.S.o: in function
_binary_private_pem_key_end’:
(.rodata.embedded+0x690): multiple definition of _binary_private_pem_key_end'; .pio\build\esp32dev\private.pem.key.o:(.rodata.embedded+0x690): first defined here c:/users/imgreenman/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\.pio\build\esp32dev\private.pem.key.S.o: in function
_binary_private_pem_key_end’:
(.rodata.embedded+0x690): multiple definition of private_pem_key_length'; .pio\build\esp32dev\private.pem.key.o:(.rodata.embedded+0x690): first defined here collect2.exe: error: ld returned 1 exit status *** [.pio\build\esp32dev\firmware.elf] Error 1
**I created new certs, does not make a difference, I have commented them out in the platfromio.ini to receive a different warning.
There was a an error**
home/xxx/workspace/m5cam/components/esp32-camera/driver/twi.c:61:24: error: 'rtc_gpio_desc' undeclared (first use in this function); did you mean 'rtc_io_desc'? uint32_t rtc_reg = rtc_gpio_desc[pin].reg;
Which was resolved by https://user-images.githubusercontent.com/30533684/82684064-04b3cc00-9c20-11ea-82bb-a4b4960fbe71.png
Any help would be appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (1 by maintainers)
Top GitHub Comments
Ok I found the issue with the newer version. In the src folder, open CMakeLists.txt and remove the following:
if(CONFIG_EXAMPLE_EMBEDDED_CERTS) target_add_binary_data(${COMPONENT_TARGET} “certs/aws-root-ca.pem” TEXT) target_add_binary_data(${COMPONENT_TARGET} “certs/certificate.pem.crt” TEXT) target_add_binary_data(${COMPONENT_TARGET} “certs/private.pem.key” TEXT) endif()
This is not necessary anymore
I will update the main source code provided with AWS’s example. Thanks for reporting!
I’m building with the following versions:
However after upgrading to the latest versions of everything it started to fail linking. I will look into what is happening and will report back here.