GBA begins, walking into the temple developed by ARM (beginners entry)
1. Why choose GBA as an embedded system learning platform
We know that Nintendo's Gameboy Advance (GBA) has a very good handheld game console, which occupies more than 90% of the world's handheld game consoles.
Throwing the game function, GBA itself is a very good embedded system development learning platform, because GBA uses ARM7 CPU (RISC), with 240 × 160 64K color LCD, stereo system, button, DMA, communication port, 32K The CPU high-speed RAM (32bit) and 256K external RAM (16bit), as well as an optically connected game card, can be extended to 256Mbit Flash ROM and 128K EEPROM (or Flash, SRAM with battery memory) for saving progress.
Many developers are now learning embedded development and purchase ARM experiment boards and JTAG emulators. From a cost perspective, the ARM experiment board and the JTAG emulator price is expensive, but it is very suitable for developers with long-term hardware development experience; for beginners who want to step into embedded development hall, high hardware prices and Excessive hardware debug threshold, naturally become a blockbox that hinders learning embedded development, many beginners are giving up in the middle of the way. From the experience of many hardware engineers, whether low-level single-chip development or advanced embedded system design, learning focus should be designed in software programming, because hardware parts are mature circuits, familiar with natural water to the stream. Therefore, for the developers of beginner embedded development, GBA will also become the cheapest, easily entitled hardware platform, and GBA allows beginners to detach annoying hardware debugging, and focusing on learning software development.
Development kit price is difficult to use
ARM experiment board JTAG emulator expensive difficulties are suitable for engineers with long-term hardware development experience
GBALINE GBA is easy to be suitable for embedded development beginners
2. Features of GBA Hardware Platform
From the function, GBA includes functions such as sound processing, color LCD display, and input and output. The GBA display screen is 240 × 160 pixels that can support 8bit (256 colors) or 16bit (64K) with hardware accelerated capacity, support Alpha Blending, Rotation, Scaling, Mestructure (SCALING) Mosaic). There are 6 screen modes of GBA, which are Mode 0 - MODE5, respectively.
From the user's point of view, GBA involves people's hands, eyes, ear and other sensory organs; from the developer's perspective, it is a complete embedded system.
3. Essential hardware GBALINE
GBALINE is a set of peripherals for GBA, which completes PC <=> GBA high-speed data exchange, as well as data storage, and complete prices are a hundred dollars.
About GBALINE, specific URL:
http://www.sudt.com
Compiled Binary Code You need to write to the GBA card to run on a real hardware platform, which requires a set of download storage systems to help complete the final work, and the Gbaline kit is born for this feature. The kit includes a GBALINE download line and a refrigerated card belt. Downloadings directly connect GBA game consoles to computer, implement high-speed data exchange; edible card belts are used to store compilation binary code. 4. How to perform embedded development
How does the GBA hardware and PC are completely different, what do you learn? Do you still have to buy GBA development tools, learn to learn GBA development language? Many developers will have the same question. Don't be nervous, as long as the developer knows that the C language will use the ARM C compilation system, you can develop the GBA program, using GBA as an advantage of entry-level embedded learning platform. Currently, there is a free compilation tool under Linux and Windows. It is recommended that the Devkitadv development package is used, which is used by the GCC compiler. Of course, there are SDT2.51, ADS1.2, MetaWare for ARM, etc., but these are all charges, which are interested in research. Source Code Editing Tools Recommend Visual C .
5. Simulate the operating environment
The Simulated Operation Environment of the PC can use the GBA simulator, such as VisualBoyAdvance, and so on. Compiled ELF or BIN Files Open the analog hardware to run the ARM program.
6. Hardware composition
6.1. GBA system
CPU 32-bit RISC CPU (ARM7TDMI) /16.78MHz
Compatibility Integrated 8-bit CISC CPU is compatible with GBC, but cannot work with GBA CPU
Memory system ROM 16K bytes (GBC is 2K)
Work RAM 32K bytes CPU outside 256K bytes (2 times cycle)
VRAM 96K bytes
OAM 64-bit × 128
Palette RAM 16-bit × 512 (256 colors for elves, 256 colors for background)
Tape memory up to 32M ROM or flash up to 512kbit SRAM or flash memory
Display 240 × 160 × RGB points, 32,768 color simulation shows that there should be acceleration, supporting rotation, scaling, mosaic; 6 screen modes, respectively -Mode5.
Operation control key (A, B, L, R, START, SELECT, and arrow keys)
Sound 4 channel (corresponding to GBC channel) 2 CPU direct channel (PCM format)
Communication serial communication (8-bit / 32-bit, UART, multi-player, multi-purpose, JOY bus)
The cassette is the same as DMG and GBC, and the GBA card belt uses a 32-pin interface, and GBA automatically detects the type of inserted cassette and switches GBC or GBA mode. GB card belt, GB / GBC double mode card belt, GBC special card belt, GBA special card belt can be used on the GBA system.
6.2. GBALINE download line,
http://www.sudt.com
PC end interface LPT, automatic setting
GBA port SIO, serial communication
Data transfer rate 115K Byte / S (vary accordingly with operating system load, range: 90kb / s ~ 115kb / s)
Power supply
6.3. 64Mbit Flash Card
Flash capacity 64Mbit
Flash 10,000 times
NV-SRAM 32K BYTE with battery memory
7. Compilation Environment Settings
Devkitadv is a free GCC development kit. The latest version is R5-Beta-3. Here will be described as an example of how to use this development package under Windows NT, 2000, XP platform. Download and install the Devkitadv development package to the C: / devkitadv-r5-beta-3 directory, enter the DEVKIT-ADVANCE-R5-Beta-3.lnk file, which will appear in this point.
In the C: / Devkitadv-R5-Beta-3 directory, there is an Example, TestSuite and other directories, and now use the TestSuite directory as an example how to compile files through the command line.
Enter the command in the window:
CD testsuite
Make
After that, you will start compiling the TestSuite project and generate an file such as agbmain.bin, agbmain.elf. You can use the simulator VisualBoyAdVance to run one of the files, or download it to the Flash card through the GBALINE download line.
In addition to command line, you can also create a Makefile project file that Visual C , which is a strongly recommended way.
The simplest entry process is like this, I wish you all a happy!