tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.51k stars 914 forks source link

[GameBoyAdvance] Tinygo build don't build a correct GBA ROM and execute .gba file with mgba fails: "The game crashed!" #2025

Closed scraly closed 1 year ago

scraly commented 3 years ago

Hi,

I tested to run and build the gba-display example found in this repository.

Cool, the tinygo run command is orking:

$ tinygo run -target=gameboy-advance gba-display.go
tinygo:ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected
image

But unfortunately I can't build successfully the gba binary and when I test it through mgba emulator, it fails! :(

$ tinygo build -target=gameboy-advance -o bin/gba-display.gba gba-display.go 
tinygo:ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected

$ file bin/gba-display.gba
bin/gba-display.gba: data

$ mgba bin/gba-display.gba
The game crashed!

Same things when I launch mgba in the graphical way:

image

So, I can't build a working gba ROM file.

$ tinygo version
tinygo version 0.19.0 darwin/amd64 (using go version go1.16.5 and LLVM version 11.0.0)

$ mgba --version
mgba 0.9.2 (f6d5f51d231053cc8a1778b7a139096d2bcf7324)

Is it possible to know how to remove the warning message and to fix the bug?

Thanks

deadprogram commented 1 year ago

This is no longer a problem at least with the 0.28 release coming soon. Tagging to close this issue on next release. Thanks @scraly

scraly commented 1 year ago

Thanks @deadprogram I will test it soon! :)

deadprogram commented 1 year ago

This is part of the v0.28 release so now closing this issue. Thanks!