People dealing with the ARM code processor will need to test the assembly code in the first instance. Generally, individuals own computers which are part of the x86 family. With this in mind, it is difficult to execute the ARM code. For people using Windows, they will need to generate compatible executables through a development package specially based on gcc. The process of installing ARM would include choosing the binary section, which is the latest version of gcc toolchain for Cygwin. You won't need to install Cygwin. After running the installer, the user will also need to choose options (default ones). This can seem complicated but the article below will take you through all the necessary steps to install ARM correctly.
You may need to test the assembly code for an ARM processor, whether you are a student or a professional. The problem is that as most of the computers are part of the x86 family of processors, it is not possible to execute the ARM code.
There is a development package based on gcc to generate Linux compatible executables on the ARM architecture. And, more importantly, you can test small simple executables.
- Go to this page and choose the binaries section, the latest version of gcc toolchain for Cygwin.
: this is a version for Cygwin, so installing Cygwin is not necessary after all.
- Run the installer. Whenever you are asked to choose options, leave as the default installation ones.
Now, do a little test with the ARM code. We will try to display "Hello Kioskea". Open the Windows notepad and save a file with this content (call this file
.ascii "Hello Kioskea"
.type main, %function
/* save stack address */
str lr, [sp, #-4]!
ldr r0, .Adr_string
/* return 0 du main */
mov r0, #0
ldr lr, [sp], #4
mov pc, lr
- We now have our assembler source file. Now open the command prompt in Windows; you must be in the directory of the source file with the command prompt.
- To compile this file into an executable elf (Linux executable format), type this command:
arm-elf-gcc test.s -o test
- To test this executable, type:
- To debug, you'll need the command arm-elf-gdb.
- The syntax used by gcc assembler source files is complicated. It takes time to master the basics.
- Below are links that point to documentation on the syntax for gcc assembler.
- Here's a simple solution but it's not portable (Windows only) and is limited.
- This link points to an ARM development environment. It is free, but it is limited to 32 KB of code, but this is enough to test small pieces of code. This software is unfortunately not portable (Windows only) and you must register on the official website to get a free license.
Published by jak58
Latest update on September 14, 2013 at 03:52 AM by deri58.