• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

felixjones/gba-toolchain: CMake based toolchain for GBA homebrew development

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

felixjones/gba-toolchain

开源软件地址:

https://github.com/felixjones/gba-toolchain

开源编程语言:

CMake 83.5%

开源软件介绍:

gba-toolchain

Please see the Sample Projects for example GBA projects.

Requirements

  • CMake (3.18 minimum)
  • Host compiler (optional for compiling additional tools)

Basic Usage

gba-toolchain uses CMake toolchain files to download and compile dependencies and set up compilers for cross-compiling.

The toolchain file (arm-gba-toolchain.cmake) is activated with the command line parameter --toolchain /path/to/arm-gba-toolchain.cmake when invoking CMake.

gba-toolchain will attempt to locate an installation of the GNU Arm Embedded Toolchain. If the GNU Arm Embedded Toolchain cannot be located, it will be downloaded to the host local directory (%LocalAppData% on Windows, ~/ on Linux, /usr/local/share on macOS).

GBA Libraries

If a library is required by CMake, but is missing, it will be downloaded into the gba-toolchain/lib directory.

libseven

libseven is a modern GBA C development library that also provides commonly needed utility functions.

Tonclib/libtonc

libtonc is the classic GBA C development library. Includes a text rendering engine, Tonc's Text Engine.

gba-hpp

gba-hpp is a modern GBA C++20 development library, designed for type safety and compile-time optimizations.

agbabi

agbabi ARM embedded ABI functions optimized for GBA. Also provides additional, low-level GBA utility functions.

Simply linking with agbabi will activate the optimised aeabi functions.

GBFS

gbfs provides an asset file system for GBA. Includes several tools for managing these.

posprintf

posprintf is a partial implementation of sprintf optimized for GBA.

Maxmod

Maxmod is a complete music and sound solution for the GBA.

Runtime libraries

A compiler runtime-library (crt0.s) and linker script (lib/ldscripts) is required for compiling a GBA binary.

gba-toolchain provides some optional runtime libraries for convenience.

All runtimes support GNU destructors, finalizers, and C++ global static destructors. These come with a small EWRAM cost, but can be disabled with the definition __NO_FINI__ (ideal for programs that never return or exit and thus do not need these features).

The linker scripts for these runtimes will reserve a minimum of 512 bytes for stack space.

librom

Runtime library for regular GBA ROMs.

The definition __ROM_START_PADDING__=bytes-to-pad can be used to insert padding after the ROM header, useful for inserting save type strings.

libmultiboot

Runtime library for Multiboot binaries. Multiboot binaries are usually transferred via GBA link cable from a host device to one or more connected GBA clients.

If launched as a regular ROM (from emulator, or similar) libmultiboot will copy ROM contents to EWRAM before executing. The extra code for ROM copying can be removed by adding the __NO_ROM_COPY__ definition.

libereader

Runtime library for e-Reader binaries.

e-Reader binaries have no header, however 4 bytes at 0x2000008 are clobbered by the e-Reader device ROM.

An e-Reader binary can ´exit´ back to the e-Reader ROM.

gba-minrt

An in-development, experimental minimal GBA runtime library. github.com/LunarLambda/gba-minrt.

Supports both ROM and Multiboot binaries.

Tools

Tools require a host compiler for building.

Alternatively, paths to precompiled tool binaries can be defined with CMake variables.

If a tool is required by CMake, but is missing, it will be downloaded and compiled.

gbafix

A valid header is required for running ROMs on actual hardware.

gbafix is used to "fix" a GBA binary (AKA: adds a header) so it can execute on hardware.

nedcmake

Nedcmake is used to convert an e-Reader binary into dot-code images (in .bmp format).

gbfs

gbfs provides a number of tools for managing GBFS asset file archives.

gbfs

The titular gbfs program bundles input sources into a GBFS archive.

bin2s

Converts a given binary file to an ASM source file. Useful for compiling GBFS archives directly into a ROM.

padbin

Pads a given binary to the next nearest multiple of a given number. GBFS searches on 256 byte boundaries, making this useful for aligning a ROM for appending a GBFS archive onto.

mmutil

Compiles audio files into a Maxmod sample binary. Can also output an associated header file, or a GBA ROM.

CMake Options

-DARM_GNU_TOOLCHAIN=/path/to/arm-gnu-toolchain/root/directory/

Use an existing installation of the GNU Arm Embedded Toolchain.

This can also be configured via the environment variable ARM_GNU_TOOLCHAIN.

-DUSE_CLANG=ON

Changes the compiler from ARM GNU GCC to the host's Clang compiler. This requires Clang to be installed.

The GNU Arm Embedded Toolchain is still required for GCC linking, compiling assembly, objcopy, and for the C/C++ standard libraries.

-DUSE_DEVKITARM=ON

Changes the compiler from GNU Arm Embedded Toolchain to an installation of devkitARM located at the DEVKITARM environment variable.

This avoids downloading GNU Arm Embedded Toolchain and uses devkitARM's provided tools when available (can avoid downloading and compiling host tools).

-DDEPENDENCIES_URL=https://some.url.to/a/place/with/file.ini

Overrides the initial URL used to download dependecies.ini.

Any existing dependecies.ini needs to be deleted from the gba-toolchain directory for this variable to take effect.

-DGBAFIX=/path/to/binary

Use an existing installation of gbafix.

This can also be configured via the environment variable GBAFIX.

-DNEDCMAKE=/path/to/binary

Use an existing installation of nedcmake.

This can also be configured via the environment variable NEDCMAKE.

-DGBFS=/path/to/binary

Use an existing installation of gbfs.

This can also be configured via the environment variable GBFS.

-DBIN2S=/path/to/binary

Use an existing installation of bin2s (part of gbfs).

This can also be configured via the environment variable BIN2S.

-DPADBIN=/path/to/binary

Use an existing installation of padbin (part of gbfs).

This can also be configured via the environment variable PADBIN.

-DMMUTIL=/path/to/binary

Use an existing installation of mmutil.

This can also be configured via the environment variable MMUTIL.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap