Go to file
Alissa Rao 2aa59bb341
Implement a sync API for working with global mutable state. (#107)
* Add IntelliJ workspace files to the .gitignore.

* Add a simple make_example script for Linux.

* Create a `sync` module with many GBA-specific sync utilties.

* Fix overflow error in debug mode in the hello_world crate.

* Fixes to DMA.

* Code cleanup for the sync module.

* Run rustfmt on new sync code.

* Fix up some names and documentation in the sync module.

* Add a few changes suggested by thomcc for the locks.

* Added needed compiler fences to `InitOnce::try_get`.
* Change the error in `RawMutex::raw_unlock` to better reflect the cause.

* Add a proper issue link to the __sync_synchronize hack.

* Disable interrupts during `InitOnce::try_get`.

* Fix some bad wording in the comments for `InitOnce::try_get`

* Use the new target in `cfg` checks to see if we're on GBA.

* Change registers used for transfer_align4_arm for the different target.

* Cleanup on sync_api changes for the target change.
2021-02-21 16:57:26 -07:00
.cargo Simplify build process (#106) 2021-02-20 11:49:40 -07:00
.github/workflows Simplify build process (#106) 2021-02-20 11:49:40 -07:00
book Use RFC 2873 asm syntax (#93) 2020-06-14 01:22:59 -06:00
examples Implement a sync API for working with global mutable state. (#107) 2021-02-21 16:57:26 -07:00
examples-bak Get all the code lined up 2019-02-14 19:39:34 -07:00
src Implement a sync API for working with global mutable state. (#107) 2021-02-21 16:57:26 -07:00
.gitignore Implement a sync API for working with global mutable state. (#107) 2021-02-21 16:57:26 -07:00
build.rs Simplify build process (#106) 2021-02-20 11:49:40 -07:00
Cargo.toml Simplify build process (#106) 2021-02-20 11:49:40 -07:00
init.sh Fixed dead link + convenience additions 2018-12-13 14:31:11 +01:00
LICENSE-APACHE2.txt Revert "Deploy rust-console/gba to github.com/rust-console/gba.git:master" 2018-11-13 12:47:52 -07:00
linker.ld Simplify build process (#106) 2021-02-20 11:49:40 -07:00
make_example.sh Implement a sync API for working with global mutable state. (#107) 2021-02-21 16:57:26 -07:00
Makefile.toml Simplify build process (#106) 2021-02-20 11:49:40 -07:00
README.md Simplify build process (#106) 2021-02-20 11:49:40 -07:00
rustfmt.toml Fix rustfmt to get things a little more compact 2019-02-12 10:00:16 -07:00
todo_check.bat fixed point stuff 2018-12-18 02:05:59 -07:00

License:Apache2 ci crates.io docs.rs

  • Built with cargo-make
  • Stability:None

gba

Eventually there will be a full Tutorial Book that goes along with this crate. However, currently the development focus is leaning towards having minimal coverage of all the parts of the GBA. Until that's done, unfortunately the book will be in a rather messy state.

What's Missing

The following major GBA features are still missing from the crate:

  • Affine Graphics
  • Interrupt Handling
  • Serial Communication

Build Dependencies

Install required cargo packages

rustup install nightly
rustup +nightly component add rust-src
cargo install cargo-make
cargo install gbafix

Install arm build tools

  • Ubuntu
    sudo apt-get install binutils-arm-none-eabi
    
  • OSX
    brew install --cask gcc-arm-embedded
    
  • Windows
    • Download the GNU Arm Embedded Toolchain
    • Install the toolchain, make sure to select "Add path to environment variable" during install

First Time Setup

Writing a Rust program for the GBA requires a fair amount of special setup. All of the steps are detailed for you in the Development Setup part at the start of the book.

If you've done the described global setup once before and just want to get a new project started quickly we got you covered:

curl https://raw.githubusercontent.com/rust-console/gba/master/init.sh -sSf | bash -s APP_NAME

Contribution

This crate is Apache2 licensed and any contributions you submit must also be Apache2 licensed.