Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

embedded:startup.tcl:1225: Error: #67

Open
Vendo232 opened this issue Nov 28, 2023 · 4 comments
Open

embedded:startup.tcl:1225: Error: #67

Vendo232 opened this issue Nov 28, 2023 · 4 comments

Comments

@Vendo232
Copy link

Vendo232 commented Nov 28, 2023

Hello Brian

hope you are doing great!

Despite what flashing command I use I always get this error at the end. The flash works, device boots though

Info : starting gdb server for stm32h7x.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Error executing event reset-end on target stm32h7x.cpu0:
embedded:startup.tcl:1225: Error:
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 1225

Also when using following command

make PATCH_PARAMS="--device=zelda --no-la --no-sleep-images --triple-boot" flash

the flash External Firmware still shows 419.... bytes instead of expected reduced size of 330... bytes.

    Internal Firmware Used:  121352 bytes
        Free: 9720 bytes
    Compressed Memory Used: 0 bytes
        Free: 0 bytes
    External Firmware Used: 4194304 bytes
@BrianPugh
Copy link
Owner

So the error is just that the debug probe failed to reset the device, which is really no big deal.

As for the program output, if you run with --no-la --no-sleep-image, the external firmware is still actually 4MB (as in, the end of the firmware is 4MB after the beginning of it), it's just that there's an "island" of free space where the Link's Awakening Rom and the sleeping graphics used to be. This is a series of all-zeros of length 1,794,336 at offset 860,160. There is still some of the stock firmware after this (offset 2,654,496). Dual-booting with the stock 4MB chip means putting retro-go's external firmware "inside" the patched-stock firmware at this island of free space.

@Vendo232
Copy link
Author

Vendo232 commented Nov 28, 2023

thank you Brian, trying to figure out the offset for 16MB Chip in Zelda GW and for some reason getting "region `FLASH' overflowed by 180 bytes", Any suggestion for the correct offset?

"in patch repo"
make PATCH_PARAMS="--device=zelda --no-la --no-sleep-images --triple-boot" flash

"in retro-go sylverb repo"
make -j8 INTFLASH_ADDRESS=0x08020000 EXTFLASH_SIZE=10485760 EXTFLASH_OFFSET=4194304 GNW_TARGET=zelda COVERFLOW=1 JPG_QUALITY=90 BIG_BANK=0 flash

"in zelda 3 repo"
make -j8 INTFLASH_BANK=2 EXTFLASH_SIZE=2621440 EXTFLASH_OFFSET=13787136 ENABLE_SAVESTATE=1 ADAPTER=stlink GNW_TARGET=zelda flash

Entering 'LCD-Game-Emulator'
Entering 'blueMSX-go'
Entering 'caprice32-go'
Entering 'fceumm-go'
Entering 'gwenesis'
Entering 'potator'
Entering 'prosystem-go'
Entering 'retro-go-stm32'
make[1]: Entering directory '/home/server/development/gamewatch/game-and-watch-retro-go'
[ BASH ] Checking for updated roms
[ LD ] gw_retro_go.elf
/usr/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: build/gw_retro_go.elf section `.data' will not fit in region `FLASH'
/usr/share/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 180 bytes
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.common:647: build/gw_retro_go.elf] Error 1
make[1]: Leaving directory '/home/server/development/gamewatch/game-and-watch-retro-go'
make: *** [Makefile.common:800: flash] Error 2

@Vendo232
Copy link
Author

Vendo232 commented Nov 28, 2023

when I run the RG without the "COVERFLOW=1 JPG_QUALITY=90" I dont get the "region `FLASH' overflowed by 180 bytes" error

it seems the coverflow on RG is broken, so ignore this please

@BrianPugh
Copy link
Owner

since you are putting retro-go after the stock firmware (offset 4194304 ), I'd recommend not using flags --no-la --no-sleep-images. This is because you are not using the island of free space inside the stock rom that this frees up.

Here's some updated commands for your situation (triple boot with zelda-gnw-firmware, retro-go, and zelda3):

# patch repo
# This uses up 4MB at offset 0
make PATCH_PARAMS="--device=zelda --triple-boot" flash

# in retro-go sylverb repo
# This uses up 10.5MB at offset 4MB
make -j8 INTFLASH_ADDRESS=0x08020000 EXTFLASH_SIZE=11010048 EXTFLASH_OFFSET=4194304 GNW_TARGET=zelda COVERFLOW=1 JPG_QUALITY=90 BIG_BANK=0 flash

# in the in zelda 3 repo
# This uses up the remaining 1.5MB at offset 14.5MB
make -j8 INTFLASH_BANK=2 EXTFLASH_SIZE=1572864 EXTFLASH_OFFSET=11010048 ENABLE_SAVESTATE=1 ADAPTER=stlink GNW_TARGET=zelda flash

I believe that you are correct in that there is not enough internal-flash storage to triple boot with coverflow.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants