Windows natively or with Windows Subsystem for Linux
supports
USB-serial devices.
The device must be recognized in Windows Device Manager.
Plug the USB-serial adapter into the Windows PC.
Look in Windows Device Manager under Ports to see the COM port number.
See troubleshooting notes below if it doesn’t show there.
The device must show in Windows Device Manager → USB Devices → Ports.
The serial device baud rate must be consistent between device and PC.
If the baud rate is incorrect, either no text or garbled text will be seen.
The COM port number can change upon plugging in the same device, especially if replugging into a different physical USB port on the PC.
If plugging in a different unit of the same type of device, it may likely also get a new COM port number.
Distinct devices of the same model, even if sequentially plugged into the same USB port may get different COM port numbers.
If the device doesn’t show up in Device Manager → Ports, see if it was mistakenly enabled as a Mouse or Human Interface Device.
If so, unplug and replug your device.
If it still fails to show up as a Port, instead showing up as mouse or HID, try right-clicking and Disabling the device and unplug/plug it once more.
If it still fails, maybe the Windows device driver is missing.
Try the device in a native Linux PC and see if the device works there.
If PuTTY doesn’t link on macOS due to “pterm” name conflict, create an alias by finding the putty binary using macOS Homebrew
findutils
that makes the command “gfind” in place of “find”.
gfind $(brew --prefix) -name putty -type f
Create a shell alias based on gfind results like:
alias putty="/opt/homebrew/Cellar/putty/<version>>/bin/putty"
Matlab
redirects
the I/O streams of binaries compiled with GFortran by setting
runtime environment variables
for stdout, stderr, and stdin.
This can lead to unexpected behavior of programs run from Matlab with built-in functions like system() as well as external language interfaces run from Matlab scripts like Java ProcessBuilder, Python subprocess, etc.
Disable I/O stream capture before the external process is started in the Matlab script:
If given a link that is suspect, or troubleshooting behavior of a website that is having trouble doing a redirect, check the HTTP header for a redirect.
Curl does this with the
–head
option.
curl --head example.invalid
This will return the HTTP header, which will show if there is a redirect, and where it is redirecting to.
Some web servers behave differently to a HEAD request than a GET request.
To see the behavior of a GET request, use the
–location
option to follow redirects.
The RISC-V based Raspberry Pi Pico microcontroller is commonly used for analog and digital control, optionally with WiFi or Bluetooth wireless connectivity.
While the full Raspberry Pi boards have a general purpose ARM CPU with enough storage and RAM capable of being used as a PC, the Pico is not commonly used for general purpose computing.
The multi-core CPU of the Pi Pico is capable of running parallel multi-threaded programs.
The Pico Cortex-M or RISC-V Hazard3 CPUs lacks a memory management unit (MMU).
Without an MMU, the Pico is not so effective at running a preemptive multitasking OS like a full Linux distribution.
However, it is possible to run a minimal Linux kernel and user space.
Provided a Pico board with enough memory, it’s possible to
run a minimal Linux distribution
on the Pico.
The analog and digital I/O pins can be used for
VGA output
from the Pico.
The Jetson Nano board has gone through several generations.
Older Jetson Nano boards may be stuck on an older unsupported OS.
If compatible with the specific Nano version hardware, the
NVIDIA Jetpack SDK
may be used to install a newer OS.
Select a
Jetson container
suitable for the desired task and hardware.
Operating systems require a certain minimum ISA microarchitecture level to run for each CPU vendor family.
The levels are arbitrarily defined by the vendor as a collection of features, for example AVX2 or AVX512.
A C++-based
cpuid library
can detect across operating systems if the Intel CPU supports a certain ISA level.
On macOS, Terminal commands can be specified to run with Rosetta using the arch command.
This is useful for running or testing x86_64 software on Apple Silicon Macs.
See “man arch” for more details.
A Fortran submodule may be defined in the same file or a different file than the Fortran module that uses the submodule.
Meta-build systems such as CMake and Meson are aware that each Fortran compiler has distinct Fortran submodule naming conventions.
Fortran module and submodule interface files are like generated header files.
The order of the commands for each compiler is significant and handled by the meta build system.
The Fortran module must be built before the Fortran submodule to generate the necessary module interface files BEFORE compiling the submodule.
Each compiler creates corresponding basic.o and basic_sub.o object files.
gfortran -c basic.90 creates object and module files: basic.odemo.moddemo.smod
“module” are the files generated by step #1, building the file containing the Fortran module.
“submodule” are the files generated by step #2, building the containing the Fortran submodule.
GCC Gfortran module and submodule naming convention is defined in
module.cc
by definintions “MODULE_EXTENSION” and “SUBMODULE_EXTENSION”.
LLVM Flang module and submodule naming convention is defined in Semantics.
The table above is derived from the two-file example program:
file basic.f90
module demo
real, parameter:: pi =4.*atan(1.)
real:: tau
interfacemodulesubroutine hello(pi,tau)
real, intent(in) :: pi
real, intent(out) :: tau
endsubroutine hello
endinterfacecontainsendmodule demo
program sm
use demo
call hello(pi, tau)
print*,'pi=',pi, 'tau=', tau
endprogram
file basic_sub.f90
submodule (demo) hi
containsmoduleprocedure hello
tau =2*pi
endprocedure hello
endsubmodule hi