gba/docs/searchindex.json

1 line
135 KiB
JSON
Raw Normal View History

2018-12-29 20:18:09 -07:00
{"doc_urls":["development-setup.html#development-setup","development-setup.html#per-system-setup","development-setup.html#per-project-setup","development-setup.html#compiling","development-setup.html#checking-your-setup","gba-asm.html#gba-assembly","gba-asm.html#arm-and-thumb"],"index":{"documentStore":{"docInfo":{"0":{"body":24,"breadcrumbs":2,"title":2},"1":{"body":148,"breadcrumbs":3,"title":3},"2":{"body":80,"breadcrumbs":3,"title":3},"3":{"body":457,"breadcrumbs":1,"title":1},"4":{"body":111,"breadcrumbs":2,"title":2},"5":{"body":159,"breadcrumbs":2,"title":2},"6":{"body":455,"breadcrumbs":2,"title":2}},"docs":{"0":{"body":"Before you can build a GBA game you'll have to follow some special steps to setup the development environment. Once again, extra special thanks to Ketsuban , who first dove into how to make this all work with rust and then shared it with the world.","breadcrumbs":"Development Setup","id":"0","title":"Development Setup"},"1":{"body":"Obviously you need your computer to have a working rust installation . However, you'll also need to ensure that you're using a nightly toolchain (we will need it for inline assembly, among other potential useful features). You can run rustup default nightly to set nightly as the system wide default toolchain, or you can use a toolchain file to use nightly just on a specific project, but either way we'll be assuming the use of nightly from now on. You'll also need the rust-src component so that cargo-xbuild will be able to compile the core crate for us in a bit, so run rustup component add rust-src . Next, you need devkitpro . They've got a graphical installer for Windows that runs nicely, and I guess pacman support on Linux (I'm on Windows so I haven't tried the Linux install myself). We'll be using a few of their general binutils for the arm-none-eabi target, and we'll also be using some of their tools that are specific to GBA development, so even if you already have the right binutils for whatever reason, you'll still want devkitpro for the gbafix utility. On Windows you'll want something like C:\\devkitpro\\devkitARM\\bin and C:\\devkitpro\\tools\\bin to be added to your PATH , depending on where you installed it to and such. On Linux you can use pacman to get it, and the default install puts the stuff in /opt/devkitpro/devkitARM/bin and /opt/devkitpro/tools/bin . If you need help you can look in our repository's .travis.yml file to see exactly what our CI does. Finally, you'll need cargo-xbuild . Just run cargo install cargo-xbuild and cargo will figure it all out for you.","breadcrumbs":"Per System Setup","id":"1","title":"Per System Setup"},"2":{"body":"Once the system wide tools are ready, you'll need some particular files each time you want to start a new project. You can find them in the root of the rust-console/gba repo . thumbv4-none-agb.json describes the overall GBA to cargo-xbuild (and LLVM) so it knows what to do. Technically the GBA is thumbv4-none-eabi , but we change the eabi to agb so that we can distinguish it from other eabi devices when using cfg flags. crt0.s describes some ASM startup stuff. If you have more ASM to place here later on this is where you can put it. You also need to build it into a crt0.o file before it can actually be used, but we'll cover that below. linker.ld tells the linker all the critical info about the layout expectations that the GBA has about our program, and that it should also include the crt0.o file with our compiled rust code.","breadcrumbs":"Per Project Setup","id":"2","title":"Per Project Setup"},"3":{"body":"Once all the tools are in place, there's particular steps that you need to compile the project. For these to work you'll need some source code to compile. Unlike with other things, an empty main file and/or an empty lib file will cause a total build failure, because we'll need a no_std build, and rust defaults to builds that use the standard library. The next section has a minimal example file you can use (along with explanation), but we'll describe the build steps here. arm-none-eabi-as crt0.s -o target/crt