#problems programming spartan board for programming gba hd

1 messages · Page 1 of 1 (latest)

empty briar
#

I'm trying to program the spartan board for my gbahd and I got to the point that the right board and com port is selected in the arduino ide but I run the test code shown here; https://github.com/zwenergy/spartan-edge-esp32-boot and I am getting the attached error

GitHub

Arduino ESP32 library to load bitstream from SDCard to FPGA. - GitHub - zwenergy/spartan-edge-esp32-boot: Arduino ESP32 library to load bitstream from SDCard to FPGA.

sour pelicanBOT
#

Please remember to provide as much information as possible including all troubleshooting steps you have already taken. If this is a hardware issue, please provide clear in-focus images of the issue, PCB (circuit board), installation, and any soldering you have done. Help us help you, posts with insufficient information will be deleted

empty briar
#

also the switch under the tape is flicked on

frosty leaf
#

I see you're working out of your one-drive directory. Do you have all the files actually loaded and on your PC?

empty briar
#

Yeah I tried disabling OneDrive it didn't work

#

I only have the one computer really

shy fjord
empty briar
shy fjord
#

Ah I see now the link

empty briar
#

Yeah it seems like what it wants to do is a reference a file but I don't have said file and that's messing it up? But I have no idea what said file is or exactly how the syntax works

shy fjord
#

Just go on and try the actual boot program

#

Choose the "01LoadDefaultBitstream" example

empty briar
#

alright, is the serial monitor the same as the serial console because I cannot find a place to open it up in

#

yes it is

shy fjord
#

Where are you at?

empty briar
#

I googled it and they must've renamed it or something, I'm on step 3, I held down the boot button for a second or two and instead of a mount error I got this error;

shy fjord
#

Huh, seems actually somewhat logic. Try to replace "main" in line 36 and 48 by, e.g., "mainPage"

empty briar
#

looks like line 48 was already that, do I have to change the parentheses?

shy fjord
#

Euh, sorry, I didn't see that. Then no, change line 36 main to "mainC" and in line 48 main to "mainC" (but leave the mainPage)

empty briar
#

you're good and does this seem correct? I think it does but I don't trust myself with any software

#

it seems like a fancy way to say the mount failed

shy fjord
#

Compilation seems to go through, but it doesn't flash the ESP32

empty briar
#

could it be since I'm holding the boot button before uploading instead of quick presssing it? thats what I thought the wording here meant "3.5 Press 'BOOT' Button on Sparton Board and last more than 1 seconds to force ESP32 enter Bootloader mode."

shy fjord
#

Try to push and hold the "boot" button, click upload and wait until it says "connecting" in the serial monitor, then release the boot button

empty briar
#

seems to have worked, it says it is writing now

shy fjord
#

👍

empty briar
#

the ide seems to be stuck here and the fpga done light is flashing on and off, should I hit the reset the button or wait to see if something happens

shy fjord
#

That's fine, it's not stuck

#

You should see a new Wifi now

empty briar
#

I don't think I do? I didn't check beforehand. Is it supposed to be something specific?

shy fjord
#

There should be a Wifi called "gbaHD"

empty briar
#

Definitely don't see it then

shy fjord
#

Or try resetting the board

empty briar
#

I'm not sure the resetting is doing anything, it just freezes whichever one of these lights is solid when I press it

shy fjord
#

Did place an SD card already in the board?

empty briar
#

Yeah, I thought I was supposed to have the SD card with overlay/default.bit in it when I ran the code in the ide

shy fjord
#

Yeah, that's good. Hm.

empty briar
#

I could force quit the ide and then hit reset to see if that changes things, it could just be stuck trying to remove itself when it cant

#

Instead of giving up on removing itself

shy fjord
#

Did you format the SD card with FAT32?

empty briar
#

I'm pretty sure but I did that the other day, I'll check

#

it is indeed fat32

shy fjord
#

Hmm, never seen that. I would guess that something with loading the bitstream goes wrong. I'd double check the folder structure, naming and the actual bitstream file

empty briar
#

The only things I have on the SD card are the overlay folder and default.bit and both are spelt correctly, there isn't anything else I would need in there right

#

its still doing the flickering back and forth after I unplugged it and it plugged it into a usb port with no data so it isn't a weird terminal interaction

empty briar
#

I tried just doing it again and same exact issue

shy fjord
empty briar
#

got a new error

#

Also here is how I added to code

c:/users/LiamS/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: BFD (crosstool-NG esp-2021r2-patch5) 2.35.1.20201223 assertion fail /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/binutils/bfd/elf32-xtensa.c:5012
collect2.exe: error: ld returned 5 exit status

exit status 1

Compilation error: exit status 1

#

actually could it possibly be my "flash frequency" its set to 80mhz but also has an option for 40

#

the baud is set to 115200

shy fjord
empty briar
#

looking at it, it won't compile now even without adding that line of code, I'll try rebooting my computer

empty briar
#

the serial monitor is printing out booted

#

but it is printing out booted every single time the lights flash which they are still doing

shy fjord
#

Does it also write something about card mount failed?

empty briar
#

doesn't look like it

#

This is what is repeated every flash

ELF file SHA256: 269122e7f9017ab0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
Booted
FPGA Configuration success

abort() was called at PC 0x40150052 on core 1

Backtrace: 0x4008369d:0x3ffcaf00 0x4008ce85:0x3ffcaf20 0x40092a71:0x3ffcaf40 0x40150052:0x3ffcafc0 0x400d8e21:0x3ffcb060 0x400d2b51:0x3ffcb4a0 0x400daaa6:0x3ffcb510

shy fjord
#

Huh, it seem that it fails somewhere during WiFi setup

#

It doesn't involve Wifi yet

empty briar
#

rip

#

ELF file SHA256: 809a8f7905a30c56

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
FPGA Configuration success

abort() was called at PC 0x400ecfb6 on core 1

Backtrace: 0x40083569:0x3ffc4f70 0x40089925:0x3ffc4f90 0x4008ef8d:0x3ffc4fb0 0x400ecfb6:0x3ffc5030 0x400d1d91:0x3ffc50d0 0x400d1ade:0x3ffc5510 0x400d415a:0x3ffc5530

#

all the homies hate core 1

shy fjord
#

Hm, that's very interesting. It's crashing immediately after successfully loading the FPGA. Looking at the code, there isn't really anything to crash.

empty briar
#

I'll try that tomorrow, I'm saving my energy today cause I'm hanging with friends later

empty briar
#

@shy fjord I opened that file in the ide but then all it did was open

#

#include <ESP32IniFile.h>
#include <spartan-edge-esp32-boot.h>

/*

  • 01LoadDefaultBitstream
  • loading the default Bitstream
  • The MIT License (MIT)
  • Copyright (C) 2019 Seeed Technology Co.,Ltd.
    */

// include the library:
#include <spartan-edge-esp32-boot.h>

// initialize the spartan_edge_esp32_boot library
spartan_edge_esp32_boot esp32Cla;

// the bitstream name which we loading
#define LOADING_DEFAULT_FIEE "/overlay/default.bit"

// the setup routine runs once when you press reset:
void setup() {
// initialization
esp32Cla.begin();

// XFPGA pin Initialize
esp32Cla.xfpgaGPIOInit();

// loading the bitstream
esp32Cla.xlibsSstream(LOADING_DEFAULT_FIEE);
}

// the loop routine runs over and over again forever:
void loop() {
Serial.println("run");
delay(3000);
}

which is just 01loaddefaultbitstream

shy fjord
#

Try open the file in a regular text editor

empty briar
shy fjord
#

Put it before the "}"

#

So
return 0;}

empty briar
#

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
E (63) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (64) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
Card Mount Failed,please reboot the board
ets Jun 8 2016 00:22:57

#

that is showing up many many times

#

and the error is very large, but is a compliation error exit 1

fickle ferry
#

plug in and run "flash gbaHD.bat"

empty briar
#

its connecting to the wrong com port, is there a way I can change that?

fickle ferry
#

what com port is your spartan on?

empty briar
#

just reran it and it chose rught

#

holy shit. I think it worked. first time I can flip the switch back for like a week it feels like

fickle ferry
#

you most likely had the wrong version of the esp32 board library

#

my guess is that you can't go above version 1.0.6

empty briar
#

Dang, that stinks that the issue was so simple, is there something I need to do for it to actually send the video signal when I turn it on? It seems like it isn't supplying power to the sp, when I flip the switch on the spartan board the power light flashes for a second then shuts off

fickle ferry
#

what does the arduino serial monitor say?

empty briar
#

shoot, this

rst:0x10 (RTCWDT_RTC_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

fickle ferry
#

is your sd card formatted properly?

empty briar
#

fat 32 overlay folder with default.bit in the overlay folder

#

I'll do one more sanity check that I didn't miss a typo in the names

#

after I put the sd back into the board I click reset and it is sucessfully done, the wifi is showing up

#

I can't find what to do with the wifi or how to use that function on the gbaHD GitHub, is there another repository I have to go to?

fickle ferry
#

if you put the bitstream on the sd card you don't have to worry about the wifi part

empty briar
fickle ferry
#

that's a wiring issue

#

or an issue with the SP itself

empty briar
#

Alright thanks