Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Visualteensy & Teensyduino 1.54 beta 6 issue with multiple definitions?

  1. #1

    Visualteensy & Teensyduino 1.54 beta 6 issue with multiple definitions?

    Can't seem to get past this issue. Forgive me if I'm not seeing something obvious here.

    I've clean installed Arduino 1.8.13 and Teensyduino 1.54-beta 6.

    I've downloaded https://raw.githubusercontent.com/vj...eiveString.ino

    It compiles in Arduino nicely.

    I typically run VisualTeensy v0.9.9.2 and I'm having issues with getting this to compile in that environment.

    To recreate that, I've created a new VisualTeensy project, pulled in the TeensyDuino libs

    Click image for larger version. 

Name:	Capture.jpg 
Views:	13 
Size:	78.8 KB 
ID:	23736

    When I save the VisualTeensy project, opens up in VSCode, like normal, it compiles, but I get this:

    Code:
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o: In functionfnet_mimxrt_serial_init':
    C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: multiple definition of `fnet_mimxrt_serial_init'
    
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o:C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: first defined here
    c:/progra~2/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
    
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o: In function fnet_mimxrt_serial_init': C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: multiple definition of fnet_mimxrt_serial_putchar'
    
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o:C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: first defined here
    
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o: In function fnet_mimxrt_serial_init': C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: multiple definition of fnet_mimxrt_serial_getchar'
    
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o:C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: first defined here
    
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o: In function fnet_mimxrt_serial_init': C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: multiple definition of Serials'
    
    .vsteensy/build/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.o:C:\Users\pc\GitHub\pc\pc-network/lib/FNET/src/port/cpu/mimxrt//fnet_mimxrt_serial.cpp:56: first defined here
    collect2.exe: error: ld returned 1 exit status`
    I'm not sure if this is an issue with FNET.H, or with VisualTeensy or Teensyduino beta libraries.

    Any tips would be appreciated.

  2. #2
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,450
    I can have a look. Which board are you compiling for?

  3. #3
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,450
    I just tried what you described above. Compiles without a single warning here. (TD 1.54, Arduino 1.8.12, T4.1)

    Code:
    ....
    IB [CC]  cipher_wrap.c 
    LIB [CC]  ctr_drbg.c 
    LIB [CC]  ccm.c 
    LIB [CC]  pk_wrap.c 
    LIB [CC]  ecp_curves.c 
    LIB [CC]  pkcs12.c 
    LIB [CC]  x509write_csr.c 
    LIB [CC]  fnet_mimxrt.c 
    LIB [CC]  fnet_mimxrt_isr_inst.c 
    LIB [CC]  fnet_cpu.c 
    LIB [CC]  fnet_mimxrt_eth.c 
    LIB [CC]  fnet_mimxrt_serial.c 
    LIB [CC]  memory_buffer_alloc.c 
    LIB [CC]  fnet_mimxrt_isr.c 
    LIB [CC]  des.c 
    LIB [CC]  hmac_drbg.c 
    LIB [CC]  fnet_fec.c 
    CORE [AR] .vsteensy/build/core.a 
    Teensy core built successfully 
    
    USER [CPP] main.cpp 
    
    [LD]  .vsteensy/build/fnet.elf
    Memory region         Used Size  Region Size  %age Used
                ITCM:         96 KB       512 KB     18.75%
                DTCM:       39680 B       512 KB      7.57%
                 RAM:       12416 B       512 KB      2.37%
               FLASH:      296976 B      7936 KB      3.65%
                ERAM:          0 GB        16 MB      0.00%
    User code built and linked to libraries 
    
    [HEX] .vsteensy/build/fnet.hex
    [SYM] .vsteensy/build/fnet.sym
    [LST] .vsteensy/build/fnet.lst
    Sucessfully built project
    Edit: also tried a current clone of the core libraries -> also works without issues

  4. #4
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,450
    Wild guess: Can it be that you installed the FNET library to your sketchbook/library folder as well?

  5. #5
    Quote Originally Posted by luni View Post
    Wild guess: Can it be that you installed the FNET library to your sketchbook/library folder as well?
    Thanks for looking into this Luni.

    I'm using T4.1

    I uninstalled Arduino and wiped out that folder. Reinstalled and the sketchbook library folder is library free.

    I'll try the non-beta Teensyduino

  6. #6
    TD 1.53, Arduino 1.8.12, T4.1 compiles clean in Arduino & VSCode (libs FNET V0.1.3 & NativeEthernet v1.0.1)
    TD 1.53, Arduino 1.8.13, T4.1 compiles clean in Arduino & VSCode (libs FNET V0.1.3 & NativeEthernet v1.0.1)
    Last edited by TeensyWolf; 02-18-2021 at 09:21 PM.

  7. #7
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,608
    Just FYI: When I compile that code with Arduino 1.8.13 and TD 1.54-beta6, it spits out an error message early on in the compilation.
    Code:
    Error while detecting libraries included by C:\arduino-1.8.13_1.54_b6\hardware\teensy\avr\libraries\FNET\src\service\serial\fnet_serial.c
    There's no other information and it doesn't prevent the code compiling and linking. I haven't figured out why that error occurs (but haven't looked too hard) but maybe it's indicating a problem somewhere in the files included by FNET.

    Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •