Visualteensy & Teensyduino 1.54 beta 6 issue with multiple definitions?

Status
Not open for further replies.

TeensyWolf

Well-known member
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/v...UDPSendReceiveString/UDPSendReceiveString.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

Capture.jpg

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.
 
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
 
Wild guess: Can it be that you installed the FNET library to your sketchbook/library folder as well?
 
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
 
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:
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
 
@luni, I'm seeing this issue again (had forgotten about it, and mentioned it in the Teensyduino 1.54 Released thread). All I have to do is update FNET from 4.6.3 to 4.7.0 (or 4.7.1) to see errors, multiple definition of `fnet_mimxrt_serial_init' and others.

Saw this on 2 separate Win 10 PCs. Fresh install of Arduino, Teensyduino 1.54 and VisualTeensy v1.0.0.0 (or v0.9.9.3).

Code compiles with regular Arduino 1.8.15

To recreate:

1. New Visualteensy project
2. Add SPI (v1.0), FNET (v0.1.3) & NativeEthernet (v1.0.5) libs (from Teensyduino) to VisualTeensy
3. Add this code: https://raw.githubusercontent.com/v...master/examples/UdpNtpClient/UdpNtpClient.ino
4. Comment out the error in loop or move loop to bottom of file
5. Save, opens in VSCode
6. Build and see error

Teensy 4.1


Thanks

vsteensy.json
Code:
{
  "version": "1",
  "target": "vsCode",
  "buildSystem": "makefile",
  "debugSupport": "cortex_debug",
  "configurations": [
    {
      "name": "default",
      "guid": "0f94abb2-468b-410c-be81-9369a3205b2c",
      "setupType": "expert",
      "coreBase": "C:\\Program Files (x86)\\Arduino\\hardware\\teensy\\avr",
      "compilerBase": "C:\\Program Files (x86)\\Arduino\\hardware\\tools\\arm",
      "makefileExtension": null,
      "copyCore": true,
      "sharedLibraries": [
        "Circular_Buffer"
      ],
      "projectLibraries": [
        "FNET",
        "SPI",
        "NativeEthernet"
      ],
      "board": {
        "name": "Teensy 4.1",
        "options": {
          "USB Type": "Serial",
          "CPU Speed": "600 MHz",
          "Optimize": "Faster",
          "Keyboard Layout": "US English"
        }
      }
    }
  ]
}

c_cpp_properties.json
Code:
{
  "configurations": [
    {
      "name": "VisualTeensy",
      "includePath": [
        "src/**",
        "C:/Program Files (x86)/Arduino/hardware/teensy/avr/cores/teensy4",
        "C:/Users/win10/github/Arduino/libraries/Circular_Buffer/**",
        "lib/FNET/**",
        "lib/SPI/**",
        "lib/NativeEthernet/**"
      ],
      "forcedInclude": [],
      "defines": [
        "__IMXRT1062__",
        "TEENSYDUINO=154",
        "ARDUINO_TEENSY41",
        "F_CPU=600000000",
        "USB_SERIAL",
        "LAYOUT_US_ENGLISH",
        "ARDUINO=10813"
      ],
      "compilerPath": "C:/PROGRA~2/Arduino/hardware/tools/arm/bin/arm-none-eabi-gcc.exe",
      "intelliSenseMode": "gcc-arm",
      "cppStandard": "gnu++14"
    }
  ],
  "version": 4
}

makefile
Code:
#******************************************************************************
# Generated by VisualTeensy (https://github.com/luni64/VisualTeensy)
#
# Board              Teensy 4.1
# USB Type           Serial
# CPU Speed          600 MHz
# Optimize           Faster
# Keyboard Layout    US English
#
# 8/6/2021 10:22 PM
#******************************************************************************
SHELL            := cmd.exe
export SHELL

TARGET_NAME      := t41_ntp
BOARD_ID         := TEENSY41

MCU              := imxrt1062

LIBS_SHARED_BASE := C:\Users\win10\github\Arduino\libraries
LIBS_SHARED      := Circular_Buffer 

LIBS_LOCAL_BASE  := lib
LIBS_LOCAL       := FNET SPI NativeEthernet 

CORE_BASE        := core
GCC_BASE         := C:\PROGRA~2\Arduino\hardware\tools\arm\bin
UPL_PJRC_B       := C:\PROGRA~2\Arduino\hardware\tools
UPL_TYCMD_B      := C:\PROGRA~1\TyTools

#******************************************************************************
# Flags and Defines
#******************************************************************************
FLAGS_CPU   := -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16
FLAGS_OPT   := -O2
FLAGS_COM   := -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD
FLAGS_LSP   := 

FLAGS_CPP   := -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing
FLAGS_C     := 
FLAGS_S     := -x assembler-with-cpp
FLAGS_LD    := -Wl,--print-memory-usage,--gc-sections,--relax,--defsym=__rtc_localtime=$(shell powershell [int](Get-Date -UFormat +%s)[0]) -T$(CORE_BASE)/imxrt1062_t41.ld

LIBS        := -larm_cortexM7lfsp_math -lm -lstdc++

DEFINES     := -D__IMXRT1062__ -DTEENSYDUINO=154 -DARDUINO_TEENSY41 -DARDUINO=10813
DEFINES     += -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH

CPP_FLAGS   := $(FLAGS_CPU) $(FLAGS_OPT) $(FLAGS_COM) $(DEFINES) $(FLAGS_CPP)
C_FLAGS     := $(FLAGS_CPU) $(FLAGS_OPT) $(FLAGS_COM) $(DEFINES) $(FLAGS_C)
S_FLAGS     := $(FLAGS_CPU) $(FLAGS_OPT) $(FLAGS_COM) $(DEFINES) $(FLAGS_S)
LD_FLAGS    := $(FLAGS_CPU) $(FLAGS_OPT) $(FLAGS_LSP) $(FLAGS_LD)
AR_FLAGS    := rcs
NM_FLAGS    := --numeric-sort --defined-only --demangle --print-size

#******************************************************************************
# Colors
#******************************************************************************
COL_CORE    := [38;2;187;206;251m
COL_LIB     := [38;2;206;244;253m
COL_SRC     := [38;2;100;149;237m
COL_LINK    := [38;2;255;255;202m
COL_ERR     := [38;2;255;159;159m
COL_OK      := [38;2;179;255;179m
COL_RESET   := [0m

#******************************************************************************
# Folders and Files
#******************************************************************************
USR_SRC         := src
LIB_SRC         := lib
CORE_SRC        := $(CORE_BASE)

BIN             := .vsteensy/build
USR_BIN         := $(BIN)/src
CORE_BIN        := $(BIN)/core
LIB_BIN         := $(BIN)/lib
CORE_LIB        := $(BIN)/core.a
TARGET_HEX      := $(BIN)/$(TARGET_NAME).hex
TARGET_ELF      := $(BIN)/$(TARGET_NAME).elf
TARGET_LST      := $(BIN)/$(TARGET_NAME).lst
TARGET_SYM      := $(BIN)/$(TARGET_NAME).sym

#******************************************************************************
# BINARIES
#******************************************************************************
CC              := $(GCC_BASE)/arm-none-eabi-gcc
CXX             := $(GCC_BASE)/arm-none-eabi-g++
AR              := $(GCC_BASE)/arm-none-eabi-gcc-ar
NM              := $(GCC_BASE)/arm-none-eabi-gcc-nm
SIZE            := $(GCC_BASE)/arm-none-eabi-size
OBJDUMP         := $(GCC_BASE)/arm-none-eabi-objdump
OBJCOPY         := $(GCC_BASE)/arm-none-eabi-objcopy
UPL_PJRC        := "$(UPL_PJRC_B)/teensy_post_compile" -test -file=$(TARGET_NAME) -path=$(BIN) -tools="$(UPL_PJRC_B)" -board=$(BOARD_ID) -reboot
UPL_TYCMD       := $(UPL_TYCMD_B)/tyCommanderC upload $(TARGET_HEX) --autostart --wait --multi
UPL_CLICMD      := $(UPL_CLICMD_B)/teensy_loader_cli -mmcu=$(MCU) -v $(TARGET_HEX)
UPL_JLINK       := $(UPL_JLINK_B)/jlink -commanderscript .vsteensy/flash.jlink

#******************************************************************************
# Source and Include Files
#******************************************************************************
# Recursively create list of source and object files in USR_SRC and CORE_SRC
# and corresponding subdirectories.
# The function rwildcard is taken from http://stackoverflow.com/a/12959694)

rwildcard =$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))

#User Sources -----------------------------------------------------------------
USR_C_FILES     := $(call rwildcard,$(USR_SRC)/,*.c)
USR_CPP_FILES   := $(call rwildcard,$(USR_SRC)/,*.cpp)
USR_S_FILES     := $(call rwildcard,$(USR_SRC)/,*.S)
USR_OBJ         := $(USR_S_FILES:$(USR_SRC)/%.S=$(USR_BIN)/%.o) $(USR_C_FILES:$(USR_SRC)/%.c=$(USR_BIN)/%.o) $(USR_CPP_FILES:$(USR_SRC)/%.cpp=$(USR_BIN)/%.o)

# Core library sources --------------------------------------------------------
CORE_CPP_FILES  := $(call rwildcard,$(CORE_SRC)/,*.cpp)
CORE_C_FILES    := $(call rwildcard,$(CORE_SRC)/,*.c)
CORE_S_FILES    := $(call rwildcard,$(CORE_SRC)/,*.S)
CORE_OBJ        := $(CORE_S_FILES:$(CORE_SRC)/%.S=$(CORE_BIN)/%.o) $(CORE_C_FILES:$(CORE_SRC)/%.c=$(CORE_BIN)/%.o) $(CORE_CPP_FILES:$(CORE_SRC)/%.cpp=$(CORE_BIN)/%.o)

# User library sources (see https://github.com/arduino/arduino/wiki/arduino-ide-1.5:-library-specification)
LIB_DIRS_SHARED := $(foreach d, $(LIBS_SHARED), $(LIBS_SHARED_BASE)/$d/ $(LIBS_SHARED_BASE)/$d/utility/)      # base and /utility
LIB_DIRS_SHARED += $(foreach d, $(LIBS_SHARED), $(LIBS_SHARED_BASE)/$d/src/ $(dir $(call rwildcard,$(LIBS_SHARED_BASE)/$d/src/,*/.)))                          # src and all subdirs of base

LIB_DIRS_LOCAL  := $(foreach d, $(LIBS_LOCAL), $(LIBS_LOCAL_BASE)/$d/ $(LIBS_LOCAL_BASE)/$d/utility/ )        # base and /utility
LIB_DIRS_LOCAL  += $(foreach d, $(LIBS_LOCAL), $(LIBS_LOCAL_BASE)/$d/src/ $(dir $(call rwildcard,$(LIBS_LOCAL_BASE)/$d/src/,*/.)))                          # src and all subdirs of base

LIB_CPP_SHARED  := $(foreach d, $(LIB_DIRS_SHARED),$(call wildcard,$d*.cpp))
LIB_C_SHARED    := $(foreach d, $(LIB_DIRS_SHARED),$(call wildcard,$d*.c))
LIB_S_SHARED    := $(foreach d, $(LIB_DIRS_SHARED),$(call wildcard,$d*.S))

LIB_CPP_LOCAL   := $(foreach d, $(LIB_DIRS_LOCAL),$(call wildcard,$d/*.cpp))
LIB_C_LOCAL     := $(foreach d, $(LIB_DIRS_LOCAL),$(call wildcard,$d/*.c))
LIB_S_LOCAL     := $(foreach d, $(LIB_DIRS_LOCAL),$(call wildcard,$d/*.S))

LIB_OBJ         := $(LIB_CPP_SHARED:$(LIBS_SHARED_BASE)/%.cpp=$(LIB_BIN)/%.o)  $(LIB_CPP_LOCAL:$(LIBS_LOCAL_BASE)/%.cpp=$(LIB_BIN)/%.o)
LIB_OBJ         += $(LIB_C_SHARED:$(LIBS_SHARED_BASE)/%.c=$(LIB_BIN)/%.o)  $(LIB_C_LOCAL:$(LIBS_LOCAL_BASE)/%.c=$(LIB_BIN)/%.o)
LIB_OBJ         += $(LIB_S_SHARED:$(LIBS_SHARED_BASE)/%.S=$(LIB_BIN)/%.o)  $(LIB_S_LOCAL:$(LIBS_LOCAL_BASE)/%.S=$(LIB_BIN)/%.o)

# Includes -------------------------------------------------------------
INCLUDE         := -I./$(USR_SRC) -I$(CORE_SRC)
INCLUDE         += $(foreach d, $(LIB_DIRS_SHARED), -I$d)
INCLUDE         += $(foreach d, $(LIB_DIRS_LOCAL), -I$d)

# Generate directories --------------------------------------------------------
DIRECTORIES     :=  $(sort $(dir $(CORE_OBJ) $(USR_OBJ) $(LIB_OBJ)))
generateDirs    := $(foreach d, $(DIRECTORIES), $(shell if not exist "$d" mkdir "$d"))

#$(info dirs: $(DIRECTORIES))

#******************************************************************************
# Rules:
#******************************************************************************

.PHONY: directories all rebuild upload uploadTy uploadCLI clean cleanUser cleanCore

all:  $(TARGET_LST) $(TARGET_SYM) $(TARGET_HEX)

rebuild: cleanUser all

clean: cleanUser cleanCore cleanLib
	@echo $(COL_OK)cleaning done$(COL_RESET)

upload: all
	@$(UPL_PJRC)

uploadTy: all
	@$(UPL_TYCMD)

uploadCLI: all
	@$(UPL_CLICMD)

uploadJLink: all
	@$(UPL_JLINK)

# Core library ----------------------------------------------------------------
$(CORE_BIN)/%.o: $(CORE_SRC)/%.S
	@echo $(COL_CORE)CORE [ASM] $(notdir $<) $(COL_ERR)
	@"$(CC)" $(S_FLAGS) $(INCLUDE) -o $@ -c $<

$(CORE_BIN)/%.o: $(CORE_SRC)/%.c
	@echo $(COL_CORE)CORE [CC]  $(notdir $<) $(COL_ERR)
	@"$(CC)" $(C_FLAGS) $(INCLUDE) -o $@ -c $<

$(CORE_BIN)/%.o: $(CORE_SRC)/%.cpp
	@echo $(COL_CORE)CORE [CPP] $(notdir $<) $(COL_ERR)
	@"$(CXX)" $(CPP_FLAGS) $(INCLUDE) -o $@ -c $<

$(CORE_LIB) : $(CORE_OBJ)
	@echo $(COL_LINK)CORE [AR] $@ $(COL_ERR)
	@$(AR) $(AR_FLAGS) $@ $^
	@echo $(COL_OK)Teensy core built successfully &&echo.

# Shared Libraries ------------------------------------------------------------
$(LIB_BIN)/%.o: $(LIBS_SHARED_BASE)/%.S
	@echo $(COL_LIB)LIB [ASM] $(notdir $<) $(COL_ERR)
	@"$(CC)" $(S_FLAGS) $(INCLUDE) -o $@ -c $<

$(LIB_BIN)/%.o: $(LIBS_SHARED_BASE)/%.cpp
	@echo $(COL_LIB)LIB [CPP] $(notdir $<) $(COL_ERR)
	@"$(CXX)" $(CPP_FLAGS) $(INCLUDE) -o $@ -c $<

$(LIB_BIN)/%.o: $(LIBS_SHARED_BASE)/%.c
	@echo $(COL_LIB)LIB [CC]  $(notdir $<) $(COL_ERR)
	@"$(CC)" $(C_FLAGS) $(INCLUDE) -o $@ -c $<

# Local Libraries -------------------------------------------------------------
$(LIB_BIN)/%.o: $(LIBS_LOCAL_BASE)/%.S
	@echo $(COL_LIB)LIB [ASM] $(notdir $<) $(COL_ERR)
	@"$(CC)" $(S_FLAGS) $(INCLUDE) -o $@ -c $<

$(LIB_BIN)/%.o: $(LIBS_LOCAL_BASE)/%.cpp
	@echo $(COL_LIB)LIB [CPP] $(notdir $<) $(COL_ERR)
	@"$(CXX)" $(CPP_FLAGS) $(INCLUDE) -o $@ -c $<

$(LIB_BIN)/%.o: $(LIBS_LOCAL_BASE)/%.c
	@echo $(COL_LIB)LIB [CC]  $(notdir $<) $(COL_ERR)
	@"$(CC)" $(C_FLAGS) $(INCLUDE) -o $@ -c $<

# Handle user sources ---------------------------------------------------------
$(USR_BIN)/%.o: $(USR_SRC)/%.S
	@echo $(COL_SRC)USER [ASM] $< $(COL_ERR)
	@"$(CC)" $(S_FLAGS) $(INCLUDE) -o "$@" -c $<

$(USR_BIN)/%.o: $(USR_SRC)/%.c
	@echo $(COL_SRC)USER [CC]  $(notdir $<) $(COL_ERR)
	@"$(CC)" $(C_FLAGS) $(INCLUDE) -o "$@" -c $<

$(USR_BIN)/%.o: $(USR_SRC)/%.cpp
	@echo $(COL_SRC)USER [CPP] $(notdir $<) $(COL_ERR)
	@"$(CXX)" $(CPP_FLAGS) $(INCLUDE) -o "$@" -c $<

# Linking ---------------------------------------------------------------------
$(TARGET_ELF): $(CORE_LIB) $(LIB_OBJ) $(USR_OBJ)
	@echo $(COL_LINK)
	@echo [LD]  $@ $(COL_ERR)
	@$(CC) $(LD_FLAGS) -o "$@" $(USR_OBJ) $(LIB_OBJ) $(CORE_LIB) $(LIBS)
	@echo $(COL_OK)User code built and linked to libraries &&echo.

%.lst: %.elf
	@echo [LST] $@
	@$(OBJDUMP) -d -S --demangle --no-show-raw-insn "$<" > "$@"
	@echo $(COL_OK)Sucessfully built project$(COL_RESET) &&echo.

%.sym: %.elf
	@echo [SYM] $@
	@$(NM) $(NM_FLAGS) "$<" > "$@"

%.hex: %.elf
	@echo $(COL_LINK)[HEX] $@
	@$(OBJCOPY) -O ihex -R.eeprom "$<" "$@"

# Cleaning --------------------------------------------------------------------
cleanUser:
	@echo $(COL_LINK)Cleaning user binaries...$(COL_RESET)
	@if exist $(USR_BIN) rd /s/q "$(USR_BIN)"
	@if exist "$(TARGET_LST)" del $(subst /,\,$(TARGET_LST))

cleanCore:
	@echo $(COL_LINK)Cleaning core binaries...$(COL_RESET)
	@if exist $(CORE_BIN) rd /s/q "$(CORE_BIN)"
	@if exist $(CORE_LIB) del  $(subst /,\,$(CORE_LIB))

cleanLib:
	@echo $(COL_LINK)Cleaning user library binaries...$(COL_RESET)
	@if exist $(LIB_BIN) rd /s/q "$(LIB_BIN)"

# compiler generated dependency info ------------------------------------------
-include $(CORE_OBJ:.o=.d)
-include $(USR_OBJ:.o=.d)
-include $(LIB_OBJ:.o=.d)



img1.jpg

img2.jpg
 
Last edited:
Had a quick look and found the following: In the FNET library folder: lib\FNET\src\port\cpu\mimxrt there are two files:
  • fnet_mimxrt_serial.cpp
  • fnet_mimxrt_serial.c
They only differ in their extension. I don't say that this is not allowed but the makefile generator of VisualTeensy seems to stumble over it. Probably both files will generate the same *.o file. A quick workaround is to rename fnet_mimxrt_serial.c to e.g fnet_mimxrt_serialc.c

I'll check if I can fix this later.
 
Had a quick look and found the following: In the FNET library folder: lib\FNET\src\port\cpu\mimxrt there are two files:
  • fnet_mimxrt_serial.cpp
  • fnet_mimxrt_serial.c
They only differ in their extension. I don't say that this is not allowed but the makefile generator of VisualTeensy seems to stumble over it. Probably both files will generate the same *.o file. A quick workaround is to rename fnet_mimxrt_serial.c to e.g fnet_mimxrt_serialc.c

I'll check if I can fix this later.

Would be interesting, what type of files Arduino IDE generates, if it is compiling and working.
 
Would be interesting, what type of files Arduino IDE generates, if it is compiling and working.
They generate filename.cpp.o, filename.c.o, etc. I always wondered why one would include the extension in the filename for the object files. Now I know :)

I'll fix that in VisualTeensy, shouldn't be a big thing.
 
Last edited:
Status
Not open for further replies.
Back
Top