Fixed in v1.1.1
Thanks, I'll try it out. Where do I find the compiled version of v1.1.1? (The link to "latest release" in the Quick Start Guide still points to v1.0.0)
Fixed in v1.1.1
Problems compiling QNEthernet were reported here: https://forum.pjrc.com/threads/6806...for-Teensy-4-1?p=289276&viewfull=1#post289276
The reason for the issue is that VisualTeensy adds all subdirectories of the <lib>/src folder to the include search path. QNEthernet has a copy of the errno.h header in one of its subdirectories.
Since GCC includes all include folders specified with -Ipath into the search path BEFORE the system files, the core includes the QNEthernet version of errno.h which causes the issue.
I therefore restricted the include search path for libraries to
- <lib>/
- <lib>/utility
- <lib>/src
This works for the reported problem. I also think that this complies to the library specification given here https://arduino.github.io/arduino-cli/0.19/library-specification/. However, it will generate problems for libraries assuming subfolders are included in the search path. I therefore want to publish the changes only after some testing.
If someone is interested, the beta version can be downloaded here: https://github.com/luni64/VisualTeensy/issues/58
CORE [ASM] memset.S
CORE [ASM] memcpy-armv7m.S
CORE [CC] sm_free.c
cores\teensy4/sm_free.c: In function 'sm_free_pool':
cores\teensy4/sm_free.c:15:3: error: 'errno' undeclared (first use in
this function)
errno = EINVAL;
^
cores\teensy4/sm_free.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
cores\teensy4/sm_free.c:15:11: error: 'EINVAL' undeclared (first use in this function)
errno = EINVAL;
^
make: *** [makefile:182: .vsteensy/build/core/sm_free.c.o] Error 1
make: *** Waiting for unfinished jobs....
CORE [CC] sm_util.c
CORE [CC] sm_calloc.c
CORE [CC] clockspeed.c
CORE [CC] usb_serial.c
CORE [CC] usb_keyboard.c
CORE [CC] sm_szalloc.c
cores\teensy4/sm_szalloc.c: In function 'sm_szalloc_pool':
cores\teensy4/sm_szalloc.c:14:3: error: 'errno' undeclared (first use
in this function)
errno = EINVAL;
^
cores\teensy4/sm_szalloc.c:14:3: note: each undeclared identifier is reported only once for each function it appears in
cores\teensy4/sm_szalloc.c:14:11: error: 'EINVAL' undeclared (first use in this function)
errno = EINVAL;
^
make: *** [makefile:183: .vsteensy/build/core/sm_szalloc.c.o] Error 1
CORE [CC] sm_malloc.c
cores\teensy4/sm_malloc.c: In function 'sm_malloc_pool':
cores\teensy4/sm_malloc.c:17:3: error: 'errno' undeclared (first use in this function)
errno = EINVAL;
^
cores\teensy4/sm_malloc.c:17:3: note: each undeclared identifier is reported only once for each function it appears in
cores\teensy4/sm_malloc.c:17:11: error: 'EINVAL' undeclared (first use in this function)
errno = EINVAL;
^
cores\teensy4/sm_malloc.c:101:10: error: 'ENOMEM' undeclared (first use in this function)
errno = ENOMEM;
^
make: *** [makefile:183: .vsteensy/build/core/sm_malloc.c.o] Error 1
CORE [CC] usb.c
CORE [CC] analog.c
CORE [CC] usb_seremu.c
CORE [CC] usb_joystick.c
CORE [CC] interrupt.c
CORE [CC] delay.c
CORE [CC] sm_zalloc.c
The terminal process "C:\Program Files\PowerShell\7\pwsh.exe -Command .../GitHub/VisualTeensy_v1_2_1.beta/make.exe all -j -Otarget" terminated with exit code: 1.
143 #INCLUDE += $(foreach d, $(LIB_DIRS_SHARED), -I$d)
Did you add the QNEthernet library to your lib folder or to the shared library folder?
Edit:
You probably did, I can reproduce that when including the lib from the shared libraries repository
Can you try to comment or delete line 143 from the makefile and see if it works then?
This one:
Code:143 #INCLUDE += $(foreach d, $(LIB_DIRS_SHARED), -I$d)
Jeton « all » inattendu dans une expression ou une instruction.
Au niveau de ligne : 1 Caractère : 46
+ 'C:/Program Files/Visual Teensy/make.exe' all <<<< -j -Otarget
+ CategoryInfo : ParserError: (all:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
Google Translate givesI upgraded to the latest vsCode version 1.640 and use the latest VisualTeensy v1.50. Every things works as it always did. Unfortunately I don't speak french. Can you translate the first two lines in the error message?
Unexpected "all" token in an expression or statement.
At line level: 1 Character: 46
"tasks": [
{
"label": "Build",
"group": {
"kind": "build",
"isDefault": true
},
"command": "C:/Program Files/Visual Teensy/make.exe",
"args": [
"all",
"-j",
"-Otarget"
]
},
....