aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gen-device-avr
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-11-04 14:50:26 +0100
committerRon Evans <[email protected]>2022-11-06 09:05:05 +0100
commitdf888acd5eff0eb5a70ef87ba083f0f15737d120 (patch)
treef83101a0e4b7fbdfa0ecc36794478ba3888c24a8 /tools/gen-device-avr
parentb9bb605257a0faa128dd7e07a9bb32a7bbf28d9a (diff)
downloadtinygo-df888acd5eff0eb5a70ef87ba083f0f15737d120.tar.gz
tinygo-df888acd5eff0eb5a70ef87ba083f0f15737d120.zip
avr: drop GNU toolchain dependency
- Use compiler-rt and picolibc instead of avr-libc. - Use ld.lld instead of avr-ld (or avr-gcc). This makes it much easier to get started with TinyGo on AVR because installing these extra tools (gcc-avr, avr-libc) can be a hassle. It also opens the door for future improvements such as ThinLTO. There is a code size increase but I think it's worth it in the long run. The code size increase can hopefully be reduced with improvements to the LLVM AVR backend and to compiler-rt.
Diffstat (limited to 'tools/gen-device-avr')
-rwxr-xr-xtools/gen-device-avr/gen-device-avr.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/gen-device-avr/gen-device-avr.go b/tools/gen-device-avr/gen-device-avr.go
index cdcf91121..1e841b954 100755
--- a/tools/gen-device-avr/gen-device-avr.go
+++ b/tools/gen-device-avr/gen-device-avr.go
@@ -60,7 +60,7 @@ type Device struct {
// AddressSpace is the Go version of an XML element like the following:
//
-// <address-space endianness="little" name="data" id="data" start="0x0000" size="0x0900">
+// <address-space endianness="little" name="data" id="data" start="0x0000" size="0x0900">
//
// It describes one address space in an AVR microcontroller. One address space
// may have multiple memory segments.
@@ -71,7 +71,7 @@ type AddressSpace struct {
// MemorySegment is the Go version of an XML element like the following:
//
-// <memory-segment name="IRAM" start="0x0100" size="0x0800" type="ram" external="false"/>
+// <memory-segment name="IRAM" start="0x0100" size="0x0800" type="ram" external="false"/>
//
// It describes a single contiguous area of memory in a particular address space
// (see AddressSpace).
@@ -432,7 +432,7 @@ __vector_default:
.endm
; The interrupt vector of this device. Must be placed at address 0 by the linker.
-.section .vectors
+.section .vectors, "a", %progbits
.global __vectors
`))
err = t.Execute(out, device.metadata)