cmgrant
Posts: 2
Joined: Mon Mar 26, 2018 2:52 am

Bare Metal Hats?

Sat Mar 31, 2018 2:09 am

Does anyone know of any hats that are available to help breakout some of the stuff bare metal developers want to "standard" connectors.

Specifically i'm thinking JTAG and serial rather than trying to individual pin with FTDI cables or hacked up 20 pin JTAG cables.

User avatar
Gavinmc42
Posts: 3936
Joined: Wed Aug 28, 2013 3:31 am

Re: Bare Metal Hats?

Sat Mar 31, 2018 2:47 am

Older Pi's have an unpopulated JTAG connector J5.
Just checked, also on the newest Pi3B+, under side of PCB, near HDMI connector.
Someone posted the part number years ago?

OpenOCD has been ported to Pi's and have JTAG via GPIO pins.
One Pi with OpenOCD can JTAG another Pi, in theory ;)
I don't think the Pi's JTAG internal registers have ever been published?

Adafruit are one of the few I know that are open about using Pi's for production programming.
https://learn.adafruit.com/programming- ... i/overview.
Flashrom is some other code that also works on Pi's.

I do baremetal on Pi's nearly every day now and still feel no need for JTAG.
Mainly because it is hard to debug without datasheet ;)

I imagine RFP stick the connectors on new prototypes and use JTAG for testing?
And perhaps for tricky software/driver problems?
Production testing would be done using the test pads at Sony.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

SonicWave
Posts: 22
Joined: Mon Mar 19, 2018 1:10 pm

Re: Bare Metal Hats?

Sat Mar 31, 2018 6:53 am

I do baremetal on Pi's nearly every day now and still feel no need for JTAG.
You don't get frustrated with the SD-Card method? Man I would love to get JTag working :(

User avatar
Gavinmc42
Posts: 3936
Joined: Wed Aug 28, 2013 3:31 am

Re: Bare Metal Hats?

Sat Mar 31, 2018 10:54 am

You don't get frustrated with the SD-Card method? Man I would love to get JTag working :(
Yep, ditto to both.

But I mostly use Ultibo these days and for graphics coding I use Zero's and boot from USB, using the USBboot ap
Once the Graphics is sorted the rest of the ap is coded to SDcard.
The advantage of Ultibo/Free Pascal is I can make units that can be tested separately.

Model B's have Ethernet and Ultibo have boot/kernel net upgrading.
This was one of the first things I tested when I found Ultibo, I made a Ultibo webserver to update other Ultibo Pi's ;)
I practically fell off my seat when the Ultibo webserver example ran some of my Linux web pages with no mods.
Been using Ultibo ever since, baremetal is hard enough, Linux is harder still, Ultibo is the easiest :D

The Pi 3's have network booting but I have not tried that yet.
My current Kernel.img's are about 3MB so it is quick and saves wear and tear on SD card insertions.

I want to port OpenOCD to free Pascal but that''s a big job, ditto for flashrom.
I will probably do JTAG eventually but will start on a fully documented microcontroller ;)
Of course once I have a JTAG viewer it may help getting into the PI's secret bits.

The goal is to have Zero's USB booting Ultibo aps to do things like Logic Analyser, Function Generator, EEPROM/micro programming, JTAG debugging, Digital CRO, I2C, SPI debug etc

They can be made standalone just by using a SDcard :D
Just for fun I am making an OpenVG GUI to control these.
Basically I want to set up a complete electronics equipment lab based on $5 Pi's.

Free Pascal has an embedded version that does some ARM 32bit Cortex, a debugger, programmer for them will be useful.

If you are keen to JTAG Pi's now then copy Adafruit's setup with OpenOCD.
The A+, B+ have test points near the JTAG or you can get some J5 connectors and some flex cable.

JTAG can be made to come out the GPIO header by ALT4/5.
There might be a resistor pullup/down that enables that on boot, but I don't have the ROM bootloader source.
Alternatively USBboot a Zero with a simple Ultibo kernel.img that configures these ALT4/5 GPIO to JTAG.
Plenty of low cost USB to JTAG dongles around, Olimex?

So many ways to skin a Pi ;)
Attachments
ulcars.jpg
ulcars.jpg (31.73 KiB) Viewed 917 times
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Bare metal, Assembly language”