summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Arch/AVR.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Arch/AVR.cpp')
-rw-r--r--lld/ELF/Arch/AVR.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lld/ELF/Arch/AVR.cpp b/lld/ELF/Arch/AVR.cpp
index ebc7616e0b3..86343a6faa1 100644
--- a/lld/ELF/Arch/AVR.cpp
+++ b/lld/ELF/Arch/AVR.cpp
@@ -6,6 +6,25 @@
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+//
+// AVR is a Harvard-architecture 8-bit micrcontroller designed for small
+// baremetal programs. All AVR-family processors have 32 8-bit registers.
+// The tiniest AVR has 32 byte RAM and 1 KiB program memory, and the largest
+// one supports up to 2^24 data address space and 2^22 code address space.
+//
+// Since it is a baremetal programming, there's usually no loader to load
+// ELF files on AVRs. You are expected to link your program against address
+// 0 and pull out a .text section from the result using objcopy, so that you
+// can write the linked code to on-chip flush memory. You can do that with
+// the following commands:
+//
+// ld.lld -Ttext=0 -o foo foo.o
+// objcopy -O binary --only-section=.text foo output.bin
+//
+// Note that the current AVR support is very preliminary so you can't
+// link any useful program yet, though.
+//
+//===----------------------------------------------------------------------===//
#include "Error.h"
#include "InputFiles.h"
OpenPOWER on IntegriCloud