~
$ arduino-cli version
arduino-cli Version: nightly-20220624 Commit: 4a4b784 Date: 2022-06-24T01:38:17Z
~
$ arduino-cli board list
Error initializing instance: Error loading hardware platform: discovery teensy:teensy-discovery not found
Port Protocol Type Board Name FQBN Core
/dev/ttyACM0 serial Serial Port (USB) Unknown
board=teensy41
boardsmanager.additional.urls=https://www.pjrc.com/teensy/td_156/package_teensy_index.json
browser=mozilla
build.verbose=false
build.warn_data_percentage=75
cache.enable=true
compiler.cache_core=true
compiler.warning_level=none
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
custom_keys=teensy41_en-us
custom_opt=teensy41_o2std
custom_speed=teensy41_600
custom_usb=teensy41_serial
editor.antialias=true
editor.auto_close_braces=true
editor.caret.blink=true
editor.code_folding=false
editor.divider.size=0
editor.external=false
editor.font=Monospaced,plain,12
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=true
editor.keys.home_and_end_beginning_end_of_doc=false
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.linenumbers=false
editor.save_on_verify=true
editor.tabs.expand=true
editor.tabs.size=2
editor.update_extension=true
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=false
export.application.platform=true
export.application.stop=true
export.delete_target_folder=true
gui.scale=auto
ide.accessible=false
last.ide.1.8.19.daterun=1656073907
last.ide.1.8.19.hardwarepath=/usr/share/arduino/hardware
last.screen.height=1200
last.screen.width=3840
last.sketch.count=0
last.sketch.default.location=1670,300,500,600,-1,0
last.sketch.default.path=/tmp/untitled1924177766.tmp/sketch_jun24a/sketch_jun24a.ino
launcher=xdg-open
platform.auto_file_type_associations=true
preferences.readonly=false
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:avrispmkii
proxy.manual.hostname=
proxy.manual.password=
proxy.manual.port=
proxy.manual.type=HTTP
proxy.manual.username=
proxy.pac.url=
proxy.type=auto
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=false
run.present.stop.color=#cccccc
serial.databits=8
serial.debug_rate=9600
serial.line_ending=1
serial.parity=N
serial.port=/dev/ttyACM1
serial.port.file=ttyACM1
serial.port.iserial=null
serial.stopbits=1
sketchbook.path=/home/chris/Arduino
software=ARDUINO
target_package=teensy
target_platform=avr
theme.file=
update.check=true
update.id=-3677535932606265667
update.last=1656073573065
upload.using=bootloader
upload.verbose=false
upload.verify=true
board_manager:
additional_urls:
- https://www.pjrc.com/teensy/td_156/package_teensy_index.json
daemon:
port: "50051"
directories:
data: /home/chris/.arduino15
downloads: /home/chris/.arduino15/staging
user: /home/chris/Arduino
ide:
bundled: false
portable: false
library:
enable_unsafe_install: false
locale: en
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true
elapsedMillis em = 0;
uint32_t alive_count = 0;
void setup() {
pinMode(13, OUTPUT);
while (!Serial)
;
Serial.begin(115200);
delay(1000);
Serial.println("Start of Echo Test");
}
void loop() {
if (Serial.available()) {
digitalToggleFast(13);
Serial.print("Received:(");
int ch;
while ((ch = Serial.read()) != -1) Serial.write(ch);
Serial.println(")");
}
#if 0
if (em > 5000) {
// If I Uncomment the print below it echos???
Serial.printf("Alive Count: %u\n", ++alive_count);
em = 0;
}
#endif
}
C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-monitor\1.56.53>teensy-monitor.exe
[COLOR="#FF0000"]HELLO 1 "arduino-cli"[/COLOR]
{
"eventType": "hello",
"protocolVersion": 1,
"message": "OK"
}
[COLOR="#FF0000"]OPEN 127.0.0.1:12345 usb:0/140000/0/1/2[/COLOR]
{
"eventType": "open",
"message": "OK"
}
C:\Program Files\Npcap>ncat -l 12345
Start of Echo Test
Alive Count: 1
Alive Count: 2
Alive Count: 3
abcdefg
Alive Count: 4
Received:(abcdefg
)
Alive Count: 5
...
C:\Program Files\Npcap>ncat -l 12345
Start of Echo Test
If at first
If "In Secure Mode" if this means: The Fuse Write sketch has run, or if programmed with EHEX file or The Teeny has been locked.With bootloader version 1.07, only the first 512K in normal mode or first 1M in secure mode is unconditionally erased, if the flash memory contains a previously written program with valid IVT+BootData fields.
With the above code: if you run this on Windows, you will never receive the data. That is if you type: abcdefg CTRL-Enter
in the Serial Monitor you will not receive the data.
Yup, it's a Windows-only issue (and yet another example of really odd WIN32 API limitations).
Here's an attempt at a fix. Extract and copy teensy-monitor.ext to C:/Users/{yourname}/AppData/Local/Arduino15/packages/teensy/tools/teensy-discovery/1.56/
I only did serial so far. Haven't touched HID yet.
It works
I am testing it on the Just Released RC9
View attachment 28968
Edit: Forgot to mention, the location I installed it was:Code:C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-monitor\1.56.53
Is it still broken when using HID?
Here's an attempt to fix the bug with HID mode.
C:\T_Drive\ardIDE_2>"Arduino IDE.exe"
C:\T_Drive\ardIDE_2>
Starting backend process. PID: 19108
Using browser-only version of superagent in non-browser environment
Error: EISDIR: illegal operation on a directory, realpath 'R:\Temp'
at Function.realpathSync.native (node:fs:2540:3)
at Function.native (node:electron/js2c/asar_bundle:5:4819)
at new SketchesServiceImpl (C:\T_Drive\ardIDE_2\resources\app\node_modules\arduino-ide-extension\lib\node\sketches-service-impl.js:48:51)
at _createInstance (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:27:12)
at Object.resolveInstance (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:47:18)
at C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\resolver.js:75:42
at Object.resolve (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\resolver.js:99:12)
at C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:335:37
at Container._get (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:326:44)
at Container.get (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:243:21) {
errno: -4068,
syscall: 'realpath',
code: 'EISDIR',
path: 'R:\\Temp'
}
Configuration directory URI: 'file:///c%3A/Users/Tim/.theia'
Theia app listening on http://localhost:51093.
root INFO Finished starting backend application: 4.7 ms [Finished 1.417 s after backend start]
[23040:0720/163411.348:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is
Stored workspaces roots: