Shrike-Fi - FPGA Programs led_blink example but no LED blink?

I’m trying the LED Blink example and the upload seems to be fine, log output below. But no matter what, I never get the LED to blink and there is no signal on the FPGA F_GPIO16. It’s LOW.

I tried several different ESP32 sketches and those are working fine. I did not change the FPGA code at all yet, trying to use the code from the examples as a baseline.

LittleFS Filesystem Uploader v1.6.3 – GitHub - earlephilhower/arduino-littlefs-upload: Build and uploads LittleFS filesystems for the Arduino-Pico RP2040, RP2350, ESP8266, and ESP32 cores under Arduino IDE 2.2.1 or higher · GitHub

Sketch Path: C:\Users\jwh20\OneDrive\Documents\Arduino\shrike_flash
Data Path: C:\Users\jwh20\OneDrive\Documents\Arduino\shrike_flash\data
Device: ESP32 series, model esp32s3
Using partition: default
Partitions: C:\Users\jwh20\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.12\tools\partitions\default.csv
Start: 0x290000
End: 0x3f0000
Serial Port: COM5

Building LittleFS filesystem
Command Line: C:\Users\jwh20\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\4.0.2-db0513a\mklittlefs.exe -c C:\Users\jwh20\OneDrive\Documents\Arduino\shrike_flash\data -p 256 -b 4096 -s 1441792 C:\Users\jwh20\AppData\Local\Temp\tmp-44780-K5bW3SgoV0lj-.littlefs.bin
/led_blink.bin

Uploading LittleFS filesystem
Command Line: C:\Users\jwh20\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.3.1\esptool.exe --chip esp32s3 --port COM5 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 2686976 C:\Users\jwh20\AppData\Local\Temp\tmp-44780-K5bW3SgoV0lj-.littlefs.bin
Warning: Deprecated: Option ‘–flash_mode’ is deprecated. Use ‘–flash-mode’ instead.
Warning: Deprecated: Option ‘–flash_freq’ is deprecated. Use ‘–flash-freq’ instead.
Warning: Deprecated: Option ‘–flash_size’ is deprecated. Use ‘–flash-size’ instead.
Warning: Deprecated: Choice ‘default_reset’ for option ‘–before’ is deprecated. Use ‘default-reset’ instead.
Warning: Deprecated: Choice ‘hard_reset’ for option ‘–after’ is deprecated. Use ‘hard-reset’ instead.
Warning: Deprecated: Command ‘write_flash’ is deprecated. Use ‘write-flash’ instead.
esptool v5.3.1
Serial port COM5:
Connecting…
Connected to ESP32-S3 on COM5:
Chip type: ESP32-S3 (QFN56) (revision v0.2)
Features: Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded Flash 8MB (XMC)
Crystal frequency: 40MHz
USB mode: USB-Serial/JTAG
MAC: ac:a7:04:03:f2:ec

Uploading stub flasher…
Running stub flasher…
Stub flasher running.
Changing baud rate to 921600…
Changed.

Configuring flash size…
Auto-detected flash size: 8MB
Flash will be erased from 0x00290000 to 0x003effff…
Compressed 1441792 bytes to 12940…
Writing at 0x00290000 [ ] 0.0% 0/12940 bytes…
Writing at 0x003f0000 [==============================] 100.0% 12940/12940 bytes…
Wrote 1441792 bytes (12940 compressed) at 0x00290000 in 3.1 seconds (3671.7 kbit/s).
Verifying written data…
Hash of data verified.

Hard resetting via RTS pin…

Completed upload.

The Arduino code I am using is this:

#include “Shrike.h”

// Define the pin number for GPIO 21
const int ledPin = 21;

ShrikeFlash fpga;

void setup() {
delay(1000);

// Initialize GPIO 21 as an output pin
pinMode(ledPin, OUTPUT);

Serial.begin(115200);
Serial.println(“STARTING”);

if (LittleFS.begin()) {
Serial.println(“File system mounted”);
} else {
Serial.println(“File system NOT mounted. System halted”);
while (1) delay(100);
}

// Upload the FPGA file
if (fpga.fileExists(“/led_blink.bin”)) {
//fpga.flash(“/led_blink.bin”);
}

Serial.println(“Starting…”);

}

void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on (Apply voltage)
delay(1000); // Wait for 1 second (1000 milliseconds)

digitalWrite(ledPin, LOW); // Turn the LED off (Cut voltage)
delay(1000); // Wait for 1 second
}

As long as the fpga.flash() line is commented out, the program runs, although the FPGA is not active. If I uncomment this line, I get a string of crash messages and the ESP32 reboots.

Message is below.

Ok, I was able to fix the issue with crashing. I had not called fpga.begin(). Here is the new code:

#include “Shrike.h”

// Define the pin number for GPIO 21
const int ledPin = 21;

ShrikeFlash fpga;

void setup() {
delay(1000);

// Initialize GPIO 21 as an output pin
pinMode(ledPin, OUTPUT);

Serial.begin(115200);
Serial.println(“STARTING”);

if (LittleFS.begin()) {
Serial.println(“File system mounted”);
} else {
Serial.println(“File system NOT mounted. System halted”);
while (1) delay(100);
}

// begin() sets up the SPI bus and the FPGA control pins.
// flash() uses that state; calling it first panics on a null pointer.
if (!fpga.begin()) {
Serial.println(“FPGA init failed. System halted”);
while (1) delay(100);
}

// Upload the FPGA file
if (fpga.fileExists(“/led_blink.bin”)) {
fpga.flash(“/led_blink.bin”);
} else {
Serial.println(“Bitstream not found: /led_blink.bin”);
}

Serial.println(“Starting…”);

}

void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on (Apply voltage)
delay(1000); // Wait for 1 second (1000 milliseconds)

digitalWrite(ledPin, LOW); // Turn the LED off (Cut voltage)
delay(1000); // Wait for 1 second
}

It doesn’t crash and the ESP32 GPIO21 flashes as expected, but no output from the FPGA LED. Here is the Serial Monitor output now:
esp32_starting