Skip to main content

Posts

Showing posts from 2017

Ada on a $2 eBay 'Bluepill' board (STM32F103C8T6)

For about $2 a 'bluepill' board can be obtained from eBay. Taking its name from the PCB patina this small board is used in the Arduino community. The SoC itself per ST's early docs on it was 64k flash and 20k data, that said, all STM32F103C8's you buy nowadays are 128k flash. The CPU is a Cortex-M3 which can be run at 72Mhz maximum. There is a good website that shows the schematic and pinout of the bluepill: http://wiki.stm32duino.com/index.php?title=Blue_Pill If you are an Arduino programmer, the link above will take you where you want to go. But suppose you wanted to try programming and using the bluepill a different way? Well that is what this blog entry is about. An Ada port was done via AdaCores Ada_Drivers_Library and the Libre GNAT toolchain to the bluepill. This is preliminary work but it is able to generate working code that the author already is using as of yesterday (a garage parking measurement sensor).  The port of the library is derivative, ...

Stanford Mips-X @IIT

This doc may be helpful to have on hand to understand this post: http://i.stanford.edu/pub/cstr/reports/csl/tr/86/289/CSL-TR-86-289.pdf Integrated Information Technology or as that mouthful was abbreviated to: IIT (now 8x8) was founded by Chi-Shin Wang and Y.W. Sing two Weitek veterans.  Its original product line was floating point coprocessors and lived in a niche before the giant sucking sound was heard of Intel vacuuming up peripherals such as floating point. At that point, a new product was needed. From 1989 a small group was working on a Vision Processor (VP). This SIMD(4) engine took a year or so to build. Its first customer was Compression Labs (CLI). The VP had a large reg file 64 16bit regs  times 4 SIMD instances. This was so CLI could execute the 16x16 DCT. An 8x8 DCT is far more modest in reg consumption. Another customer for the part was AT&T with the videophone 2500 in 1992. So at this point, IIT had a reasonable video business with customers that had appl...
Using a Raspberry Pi3 as an OpenOCD server Cheap and plentiful, a Raspberry Pi3 makes an excellent OpenOCD server. You can place it near your target and just attach to it from where you do your builds. On my Pi3 server I have openocd-0.9.0 and openocd-0.10.0, the win with a Pi3 is it has WLAN, so permit it to sign on to your network, preferably with a known static IP, and then you can ssh over to it and start openocd: root@pi3:~/openocd-0.10.0/tcl# ../src/openocd --file board/st_nucleo_l476rg.cfg Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read         http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results mi ght differ compared to plain JTAG/SWD adapter speed: 480 kHz adapter_nsrst_delay: 100 none separate srst_only separate srst_nogate srst_open_drain connect_deassert_srst Info : clock speed 480 kHz Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x...
Building a motion sensing camera with a Raspberry Pi A Raspberry Pi and a pinoir camera make for a good motion capture camera. There is always an impetus to hack, the impetus in this case came from theft at my company. At night, someone had been walking off with hardware from cubicles. One was just down my aisle and was perhaps too close to home.  Not wanting any of my stuff wandering off, I wanted a camera that would record motion and save video only around the event. I did not want to process 8 hours of raw, mainly motionless video each day when I came in. Currently as it works, each file per night is about 80MB. These files are saved over the LAN on a file server, in this way not polluting the SD card on the Pi. The files can be viewed by VLC and are H.264. For the motion sensor, an Adafruit PiR sensor is used: https://www.adafruit.com/product/189 This sensor needs some connectors added, a small crimp connector is added to the bare wires and hot air used to shrink a sle...
ARM Cortex SVD files A lot of goodness can be represented by an SVD file. The full name is CMSIS-SVD and was designed by Keil who was acquired by ARM. All reasonable ARM Cortex vendors these days who want users to program their targets have SVD files. The scope of the SVD file covers all the peripherals in the designs down to the numerical addresses. Here is an extract from the STM32L432's SVD file. We see the DAC is at a baseAddress of 0x40007400 and the first reg in the DAC is the CR or control reg at offset 0, further, we see the individual fields of the CR with EN1 at bit position 0.   <peripherals>     <peripheral>       <name>DAC1</name>       <description>Digital-to-analog converter</description>       <groupName>DAC</groupName>       <baseAddress>0x40007400</baseAddress>       <addressBlock>     ...
Welcome! to hrrzi.com The name comes from the half-word instructions on the 36bit KL-10 processor. http://pdp10.nocrew.org/docs/instruction-set/Half-Word.html So for this blog the hrrzi instruction means halfword from the right to the right, zeroes on the left hand size, and an 18bit immediate in the right half. [Toad-1] LS:<~>@ type HW2.MAC title hw2 search monsym start: reset hrrzi 1,message psout haltf message: asciz / HRRZI - Hedley Rainnie's blog / end start [Toad-1] LS:<~>@ exec HW2 LINK: Loading [LNKXCT HW2 execution] HRRZI - Hedley Rainnie's blog