Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update avr bits for new compiler #100

Merged
merged 30 commits into from
Nov 21, 2024
Merged

Update avr bits for new compiler #100

merged 30 commits into from
Nov 21, 2024

Conversation

keith-packard
Copy link
Owner

Debian has a new gcc-avr package based on gcc 14.

@keith-packard keith-packard force-pushed the update-avr branch 9 times, most recently from 4309303 to 8b6515d Compare November 21, 2024 08:05
This ended up saving the snek source code and building that instead of the
actual current bits.
Remove the '0' from the flexible array size. Add warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This is only used from inside snek-memory.c

Signed-off-by: Keith Packard <keithp@keithp.com>
Remove END as a possible terminator for a list of simple statements.

Signed-off-by: Keith Packard <keithp@keithp.com>

fixup-gram
Was using \s for whitespace instead of \\s

Signed-off-by: Keith Packard <keithp@keithp.com>
If the snek_alloc call ends up running snek_collect, then
the incoming list might have moved.

Signed-off-by: Keith Packard <keithp@keithp.com>
Use already-computed 'list_size' value.

Signed-off-by: Keith Packard <keithp@keithp.com>
Provide alias for 'pow', clean up inf and nan definitions.

Signed-off-by: Keith Packard <keithp@keithp.com>
Make these options common across all ports instead of copy/pasting
them into each port Makefile. Also use the distro version of avr-gcc
for nano-every as it has been updated.

Signed-off-by: Keith Packard <keithp@keithp.com>
avr libc has changed how float and double stuff is managed; a couple of
minor changes are needed to cope.

Signed-off-by: Keith Packard <keithp@keithp.com>
This bootloader takes only 512 bytes of flash, leaving
plenty for snek to operate on all of the 32u4 targets.

Create a general-purpose atmega32u4 snek installer and
replace the single-device versions.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This uses the GCC memory space attribute so that the compiler will
automatically generate the correct memory access instructions instead
of requiring manual use of various progmem APIs. This both simplifies
the code and reduces its size.

Signed-off-by: Keith Packard <keithp@keithp.com>
The new version of GCC leaves more RAM available; take advantage of that
by increasing the heap size to 1kB and the value stack to 32 elements.

Signed-off-by: Keith Packard <keithp@keithp.com>
On the atmega4809, avr-libc doesn't set E2END to be the last offset,
rather it's the last address. Use EEPROM_SIZE instead, which seems
to be the size - 1.

Signed-off-by: Keith Packard <keithp@keithp.com>
A bunch of the register definitions names have changed.

Signed-off-by: Keith Packard <keithp@keithp.com>
The newer GCC version generates smaller code, so we can
enable the input builtins on all of the avr targets now.

Signed-off-by: Keith Packard <keithp@keithp.com>
With the latest GCC version, there's enough space in the ROM for the
boot loader, even with all of the previous -big specific functions
enabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
Make sure our custom strfromf function works correctly

Signed-off-by: Keith Packard <keithp@keithp.com>
Allows use of general blink program

Signed-off-by: Keith Packard <keithp@keithp.com>
Until debian's avr-libc gets updated, we'll need to use a custom version
while using debian's avr-gcc. This just points the includes and libraries
at a version installed in /opt/avr-libc for now.

Signed-off-by: Keith Packard <keithp@keithp.com>
This includes most of the math builtins except for hyperbolic trig,
error and gamma functions.

Signed-off-by: Keith Packard <keithp@keithp.com>
This chip has a tiny EEPROM block but lots of flash. Use flash to
store the program instead of EEPROM.

Signed-off-by: Keith Packard <keithp@keithp.com>
Wire up the new driver, including changing the installer to program
the fuses to reserve 4kB of flash.

Use a smaller set of math builtins to save a bit of space to make room.

Signed-off-by: Keith Packard <keithp@keithp.com>
Avoids having the lexer stuck in the comment loop when
the interpreter is supposed to be interrupted.

Signed-off-by: Keith Packard <keithp@keithp.com>
Use LED. Use new callsign.

Signed-off-by: Keith Packard <keithp@keithp.com>
Need to actuall fail if any of the sequence of commands fail.

Signed-off-by: Keith Packard <keithp@keithp.com>
The linux installer wants partially edited versions of this file so that
it can customize them while installing.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
@keith-packard keith-packard merged commit 746d0c2 into main Nov 21, 2024
2 checks passed
@keith-packard keith-packard deleted the update-avr branch November 21, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant