1 / 10

An Overview

L. An Overview. What Is ldino?. Tool to allow you to build programs for the atmega328 in binary or hexadecimal Default base is binary Option for using hexadecimal is “-x” Can automatically upload your program to a connected Arduino and run it Use “-P” option with “-o” option

gkendra
Download Presentation

An Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. L An Overview

  2. What Is ldino? • Tool to allow you to build programs for the atmega328 in binary or hexadecimal • Default base is binary • Option for using hexadecimal is “-x” • Can automatically upload your program to a connected Arduino and run it • Use “-P” option with “-o” option • Allows you to place program segments at arbitrary locations in memory

  3. Will disassemble your program and produce a listing for it • Use “-L” option to produce a listing

  4. Installing ldino • Runs on Linux or Windows • Has 2 components • Executable • Place it in your $PATH or %PATH% • Resource file “.ldinorc” • Must be placed in your “home” directory • $HOME on linux • %HOMEPATH% on windows • Resource file .ldinorc tells ldino how to program your Arduino board

  5. About .ldinorc • ASCII text file containing two variables • “arduino-home”: location where Arduino IDE is installed • “arduino-port”: port where the Arduino board is attached #.ldinorc for linux arduino-home=/home/agbell/var/arduino-1.0.5 arduino-port=/dev/ttyACM0

  6. Using ldino • Converts ASCII text into Intel .hex format • Intel .hex file is what the atmega328 runs • .hex files are “machine code” • .elf files get converted into .hex files via objcopy • Instead of building your program in C or assembly, you build it in ASCII binary or hex • You pass your ASCII “machine code” to ldino • Can produce an assembly language listing of your machine code • Can automatically load your program to the Arduino and run it

  7. Sample Input File • Comments are allowed • .org directives tell ldino where to place code in ROM • .org operands are always hexadecimal ;this is a comment .org 10 91800024; loads R24 with DDRB (I/O address 0x24) 6280 ; OR R24 with 0x20 93800024; store R24 out to DDRB ; we don’t need to do this anymore ;9508 ; return

  8. Command-Line Options -L: produce a listing file (.lst) of your machine code -P: program an attached Arduino board with a .hex file -V: be verbose -h: print extended help -o: place generated .hex in a specific file -v: print ldino version -x: specifies that input is in hex, not binary

  9. Usage Examples ldino -x myfile.txt Converts ASCII text in myfile.txt into .hex format, then sends the .hex records to stdout. The ASCII text in myfile.txt must be presented in hexadecimal. ldino -P -o myfile.hex myfile.txt Converts ASCII text in myfile.txt into .hex format and sends the .hex records to a file called myfile.hex. If the conversion is successful, ldino will immediately program any connected arduino with the contents of myfile.hex using the parameters specified in .ldinorc

  10. Usage Examples ldino -L myfile.txt Converts ASCII text (binary) in myfile.txt into .hex format, sends the .hex records to stdout, and produces a listing file named myfile.txt.lst that contains the disassembled input. ldino -P myprog.hex Programs an attached arduino with the ROM image contained in myprog.hex.

More Related