Posts

Showing posts from January, 2023

Multifunction Ports on the Raspberry Pi 4B, Pinout and Alternate Name Functions

Multifunction Ports on the Raspberry Pi 4B,  Pinout and Alternate Name Functions https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269104   John R.  forum Post https://www.studiopieters.nl/raspberry-pi-4-model-b-pinout/   Sudio Pieters Netherlands Raspi4B pinout. https://lambdaland.org/posts/2020-12-23_freebsd_rpi4/   2020 FreeBSD install, Tier 3 now Tier 1,  Rust Language setup. https://github.com/raspberrypi/linux/blob/7f465f823c2ecbade5877b8bbcb2093a8060cb0e/arch/arm/boot/dts/bcm2711.dtsi#L41 Interrupt Code for Raspberry Pi 4 from Raspberry Pi Linux As Joan has stated only 1 of UART0/1 is accessible (UART0   /dev/ttyAMA0   is connected to Bluetooth on later model Pi). There are additional UART on the Pi4. Raspberry Pi4 UART  is a more up to date answer. https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4/104466#104466 The following summarises

GDB test connection from FreeBSD 13.0 x86_64 (GhostBSD ) to Black Magic Probe hardware

   GDB test connection from FreeBSD 13.0 x86_64 (GhostBSD ) to Black Magic Probe hardware https://black-magic.org/usage/gdb-commands.html   BMP GDB commands https://sourceware.org/gdb/    GDB command listing sudo gdb GNU gdb (GDB) 12.1 [GDB v12.1 for FreeBSD] Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-portbld-freebsd14.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at:     <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" t

GDB package install onto FreeBSD 14.0 for Raspberry Pi 4B

 GDB package install onto FreeBSD 14.0 for Raspberry Pi 4B    fred@Fred_RasPi4B:~ $ gdb -sh: gdb: not found fred@Fred_RasPi4B:~ $ whereis gdb gdb: /usr/ports/devel/gdb fred@Fred_RasPi4B:~ $ pkg install gdb pkg: Insufficient privileges to install packages fred@Fred_RasPi4B:~ $ sudo pkg install gdb Password: Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 2 package(s) will be affected (of 0 checked): New packages to be INSTALLED:         gdb: 12.1_2         source-highlight: 3.1.9_3 Number of packages to be installed: 2 The process will require 64 MiB more space. 13 MiB to be downloaded. Proceed with this action? [y/N]: y [1/2] Fetching gdb-12.1_2.pkg: 100%   12 MiB   4.1MB/s    00:03     [2/2] Fetching source-highlight-3.1.9_3.pkg:  92%    1 MiB   1.1MB/s    00:00 ET[2/2] Fetching source-highlight-3.1.9_3.pkg: 100%    1 MiB   1.2MB/s    00:01     Checking integrity... done (0 conflicting) [1/2] Installing source-h

USB Serial Port connection From GhostBSD / FreeBSD 13.1 to Raspberry Pi 4B hardware, through the Black Magic Probe virtual USB serial port to 3.3V ttl level

  USB Serial Port connection From GhostBSD / FreeBSD 13.1 to Raspberry Pi 4B hardware, through the Black Magic Probe virtual USB serial port to 3.3V ttl level   Open a MATE terminal or Xterm terminal  from Applications  -->  System Tools --> MATE terminal Check pstat -t  to see what devices are available  pstat -t       LINE   INQ  CAN  LIN  LOW  OUTQ  USE  LOW   COL  SESS  PGID STATE      ttyu2 23040    0    0 2304 23064    0 2307    11     0     0 ICOiX      ttyv0  1920    0    0  192  1984    0  199   625  4081  4081 Oicl      ttyv1  1920    0    0  192  1984    0  199     7  4082  4082 Oil      ttyv2  1920    0    0  192  1984    0  199     7  4083  4083 Oil      ttyv3  1920    0    0  192  1984    0  199     7  4084  4084 Oil      ttyv4  1920    0    0  192  1984    0  199     7  4085  4085 Oil      ttyv5  1920    0    0  192  1984    0  199     7  4086  4086 Oil      ttyv6  1920    0    0  192  1984    0  199     7  4087  4087 Oil      ttyv7  1920    0    0  192  1984    0 

Spruce Up tools to view amount of Free Memory and Disk Usage

Image
Spruce Up tools to view amount of Free Memory and Disk Usage URLs: https://puppylinux-or-pcbsd.blogspot.com/    Here is my source list of Free Memory Tools Tools to check Free Memory available and How much SWAP memory is used Use a perl shell script made for BSDs: https://stackoverflow.com/questions/4093786/what-is-equivalent-of-linuxs-free-command-on-freebsd-v8-1 https://forums.freebsd.org/threads/free-command-perl-script-for-freebsd.299/   example of using 'free' cli You can use this script. # fetch http://www.cyberciti.biz/files/scripts/freebsd-memory.pl.txt # mv freebsd-memory.pl.txt /usr/local/bin/free # chmod +x /usr/local/bin/free # perl --version # whereis perl # vi /usr/local/bin/free change first line #!/usr/bin/perl to #!/usr/local/bin/perl # free Linux like free command for my FreeBSD server Freecolor is a free replacement that displays free memory graphically as a bargraph. It supports the same options as free. Install freecolor, enter: # cd /usr/ports/sys

Hookup GDB to Black Magic Probe V2.3, Might have to compile

Image
Hookup GDB to Black Magic Probe V2.3, Might have to compile Check previous Post for some details all ready described there Edit  config.txt file to have these contents Raspberry Pi Uart pinouts https://pinout.xyz/pinout/uart https://black-magic.org/knowledge/pinouts.html https://github.com/WiringPi/     Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings)

Adding a Magic Probe Debugger to Raspberry Pi 4B

Image
 Adding a Magic Probe Debugger to Raspberry Pi 4B First test booting a Raspberry Pi 4B into Single User mode in FreeBSD 14.0  https://www.linux-magazine.com/Issues/2019/223/Desktop-FreeBSD    I managed to boot to another drive and edit loader.conf:   beastie_disable="NO"  loader_color="YES"   The beastie_disable="YES" allowed me to boot to single user mode, the loader_color="NO" seems to have enabled more verbosity in the log. It then became apparent it was trying to mount the external USB HDD that I had added to /etc/fstab . Annoying that with beastie disabled it did not give any error. Regardless, I added noauto to the fstab entry and rebooted, but it still failed to mount the drive, so I tried commenting out the entire entry for my hdd. This allowed it to boot to a login prompt.   # Disable the beastie menu and color beastie_disable = "YES" loader_color = "NO"     https://forums.freebsd.org/threads/

time; make -j4 buildworld KERNELCONF=GENERIC-VCHIQ -DNO_CLEAN

time make -j4 buildworld KERNELCONF=GENERIC-VCHIQ -DNO_CLEAN    # script /var/tmp/mw.out Script started, output file is /var/tmp/mw.out   https://people.freebsd.org/~rodrigc/doc/handbook/makeworld.html Can /usr/obj be removed when finished? This directory contains all the object files that were produced during the compilation phase. Normally, one of the first steps in the make buildworld process is to remove this directory and start afresh. Keeping /usr/obj around when finished makes little sense, and its removal frees up a approximately 2GB of disk space. Can interrupted builds be resumed? This depends on how far into the process the problem occurs. In general, make buildworld builds new copies of essential tools and the system libraries. These tools and libraries are then installed, used to rebuild themselves, and are installed again. The rest of the system is then rebuilt with the new