Forum Rule: Always post complete source code & details to reproduce any issue!
-
Senior Member+
It probably would build on 2019 as well...
The RAWHID stuff was done on 2019
-
Senior Member+

Originally Posted by
KurtE
It probably would build on 2019 as well...
The RAWHID stuff was done on 2019
It was asking for some specific 1.45 (?) tool pack. Rather than see if an update would grab it (or it could be found) - the Install of VS2022 Enterprise is done - ready for a reboot
-
Senior Member+
Didn't restart yet - opened and build gave this:
Code:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp_SetupDiGetDeviceInterfaceDetailW referenced in function open_usb_device Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\hid_Windows.obj 1
Error LNK2019 unresolved external symbol __imp_timeGetTime referenced in function teensy_write Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\hid_Windows.obj 1
Error LNK2019 unresolved external symbol __imp_SetupDiDestroyDeviceInfoList referenced in function open_usb_device Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\hid_Windows.obj 1
Error LNK2019 unresolved external symbol __imp_SetupDiEnumDeviceInterfaces referenced in function open_usb_device Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\hid_Windows.obj 1
Error LNK2019 unresolved external symbol __imp_SetupDiGetClassDevsW referenced in function open_usb_device Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\hid_Windows.obj 1
Error LNK2019 unresolved external symbol HidD_GetAttributes referenced in function open_usb_device Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\hid_Windows.obj 1
Error LNK2019 unresolved external symbol HidD_GetHidGuid referenced in function open_usb_device Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\hid_Windows.obj 1
Error LNK1120 7 unresolved externals Teensy_loader_cli D:\Tim\downloads\Teensy_loader_cli\x64\Debug\Teensy_loader_cli.exe 1
>> same after restart of course
-
Senior Member+
Not right now I am building for Debug x86
I am not sure if x64 can build.
If you open properties on project:
Go to linker/Input section
The Additional Dependencies: hid.lib;setupapi.lib;winmm.lib;%(AdditionalDepende ncies)
-
Senior Member+
Kurt - works to build fine as x86:
Code:
D:\Tim\downloads\Teensy_loader_cli\Debug>Teensy_loader_cli.exe
Filename must be specified
Usage: teensy_loader_cli --mcu=<MCU> [-w] [-h] [-n] [-b] [-v] [-f] <file.hex>
-w : Wait for device to appear
-r : Use hard reboot if device not online
-s : Use soft reboot if device not online (Teensy 3.x & 4.x)
-n : No reboot after programming
-b : Boot only, do not program
-v : Verbose output
-f : Fill memory region holes with 0s
-d : dump hex file memory ranges
-
Senior Member+
Quick update: I reworked the setup, such that the Visual Studio builds using the same .c file as used in the makefile
I then added the external stuff into that source file. And it appears to build again.
I then pushed these changes up to my Fork/Branch: https://github.com/KurtE/teensy_load...ee/experiments
Will see if this is something I should issue a Pull Request back to Paul or not...
note: My experiments branch code has two extra options:
-d (Dumps the address ranges within the hex file)
-f (Tries to fill in holes between areas within hex file)
Some of my changes were to make Windows happier, to use things like sscanf_s instead of sscanf but Linux did not like ssconf_s so made all of these use: SSCANF
which I defined depending on this or not.
-
Senior Member+
@KurtE - I'll give it a go to confirm it builds here and check back.
-
Senior Member+
@KurtE - Teensy_loader_cli.sln works to build setting Debug x86:
Code:
Usage: teensy_loader_cli --mcu=<MCU> [-w] [-h] [-n] [-b] [-v] [-f] <file.hex>
Hello World - Defragster was here!
-w : Wait for device to appear
-r : Use hard reboot if device not online
-s : Use soft reboot if device not online (Teensy 3.x & 4.x)
-n : No reboot after programming
-b : Boot only, do not program
-v : Verbose output
-f : Fill memory region holes with 0s
-d : dump hex file memory ranges
Didn't try an upload - but minor source edit built, and shows in usage output!
Using Win 11 and up to date MSFT Visual Studio 2022
If WDK was needed - it was resident from VS 2019 install
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules