12
A side-by-side size comparison of a US Quarter, a Gumstix Overo Earth, a stick of gum, and the Gumstix Summit expansion board. Gumstix is an American multinational corporation headquartered in Redwood City, California. It develops and manufactures small system boards comparable in size to a stick of gum.

Gumstix is an American multinational corporation

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Gumstix is an American multinational corporation

A side-by-side size comparison of a US Quarter, a Gumstix Overo Earth, a stick of gum, and the Gumstix Summit expansion board.

Gumstix is an American multinational corporation headquartered in Redwood City, California. It develops and manufactures small system boards comparable in size to a stick of gum.

Page 2: Gumstix is an American multinational corporation

your machine macneill.scss.tcd.ie

scp

ssh

Winscp

PuTTy Secure Copy client

Page 3: Gumstix is an American multinational corporation

Command to install packages (debian)apt -y install qemu qemu-system qemu-system-arm gdb gdb-multiarchThese packages are already installed on macneill

Use puttyssh macneill.scss.tcd.ie

developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update

The GNU Arm Embedded Toolchain is a ready-to-use, open-source suite of tools for C, C++ and assembly programming. The GNU Arm Embedded Toolchain targets the 32-bit Arm Cortex-A, Arm Cortex-M, and Arm Cortex-R processor families. The GNU Arm Embedded Toolchain includes the GNU Compiler (GCC) and is available free of charge directly from Arm for embedded software development on Windows, Linux, and Mac OS X operating systems.

Page 4: Gumstix is an American multinational corporation

XScale is a microarchitecture for central processing units initially designed by Intel implementing the ARM architecture (version 5) instruction set.

arm-none-eabi-as -march=armv5te -g -o FirstProgram.o FirstProgram.s

arm-none-eabi-ld -Ttext=0x0 -o FirstProgram.elf FirstProgram.o

arm-none-eabi-objcopy -O binary FirstProgram.elf FirstProgram.bin

arm-none-eabi targets ARM architecture,has no vendor, does not target an operating system and complies with the ARM Embedded ABI.Application binary interface (ABI) is an interface between two binary program modules

Page 5: Gumstix is an American multinational corporation

The output file created by ld is in a format calledELF. Various file formats are available for storingexecutable code. The ELF format works fine when you havean OS around, but since we are going to run the programon bare metal, we will have to convert it to a simplerfile format called the binary format.

A file in binary format contains consecutive bytesfrom a specific memory address. No other additionalinformation is stored in the file. This is convenientfor Flash programming tools, since all that has to bedone when programming is to copy each byte in the file,to consecutive address starting from a specified baseaddress in memory.

The GNU toolchain’s objcopy command can be used toconvert between different object file formats.

Page 6: Gumstix is an American multinational corporation

When the ARM processor is reset, it starts executing fromaddress 0x0. On the connex board a 16MB Flash is locatedat address 0x0. The instructions present in the beginningof the Flash will be executed.

When qemu emulates the connex board, a file has to bespecified which will be treated file as Flash memory. TheFlash file format is very simple. To get the byte fromaddress X in the Flash, qemu reads the byte from offsetX in the file. In fact, this is the same as the binaryfile format.

To test the program, on the emulated Gumstix connex board,we first create a 16MB file representing the Flash. Weuse the dd command to copy 16MB of zeroes from /dev/zeroto the file flash.bin. The data is copied in 4K blocks.

dd if=/dev/zero of=flash.bin bs=4096 count=4096

dd if=Arithmetic1.bin of=flash.bin bs=4096 conv=notrunc

Page 7: Gumstix is an American multinational corporation

Memory Map

Page 8: Gumstix is an American multinational corporation

GDB, the GNU Project debugger, allows you to see what isgoing on inside another program while it executesor what another program was doing at the moment it crashed.

GDB can do four main kinds of things (plus other thingsin support of these) to help you catch bugs in the act:

Start your program, specifying anything that mightaffect its behavior. Make your program stop on specifiedconditions. Examine what has happened, when your programhas stopped. Change things in your program, so you canexperiment with correcting the effects of one bug and goon to learn about another.

Those programs might be executing on the same machineas GDB (native), on another machine (remote), or on asimulator. GDB can run on most popular UNIX and MicrosoftWindows variants, as well as on Mac OS X.

Page 9: Gumstix is an American multinational corporation

QEMU (short for Quick EMUlator) is a free andopen-source emulator and virtualizer that can perform hardware virtualization.

gdb-multiarch file FirstProgram.otarget remote | qemu-system-arm -S -gdb stdio -M connex -pflash flash.bin

-display none

-S means do not start CPU at startup. The -M connex option specifies that the machine connex is to be emulated. The -pflash options specifies thatflash.bin file represents the Flash memory.

Page 10: Gumstix is an American multinational corporation
Page 11: Gumstix is an American multinational corporation

Note: when using putty you may need to tick this box to get a neat display

Page 12: Gumstix is an American multinational corporation

This is the ARM version we use throughout this module