[Snek] [keith-packard/snek] 8d0493: Only all NL as statement terminator

Keith Packard noreply at github.com
Wed Nov 20 22:39:11 PST 2024


  Branch: refs/heads/update-avr
  Home:   https://github.com/keith-packard/snek
  Commit: 8d0493f0b18c800a997892e568a7f29319a25682
      https://github.com/keith-packard/snek/commit/8d0493f0b18c800a997892e568a7f29319a25682
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M snek-gram.ll

  Log Message:
  -----------
  Only all NL as statement terminator

Remove END as a possible terminator for a list of simple statements.

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

fixup-gram


  Commit: 5b828a9f5c8717177116533fbaf779c384a5d1d6
      https://github.com/keith-packard/snek/commit/5b828a9f5c8717177116533fbaf779c384a5d1d6
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/samd21/uf2conv.py

  Log Message:
  -----------
  chips/samd21: Fix regex usage in uf2conv.py

Was using \s for whitespace instead of \\s

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


  Commit: 6a716e4ec805f6513b8e0c20a5a2dfcf4c012979
      https://github.com/keith-packard/snek/commit/6a716e4ec805f6513b8e0c20a5a2dfcf4c012979
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/samd21/snek-gpio.c

  Log Message:
  -----------
  chips/samd21: save/restore neopixel list across alloc

If the snek_alloc call ends up running snek_collect, then
the incoming list might have moved.

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


  Commit: 563dc29aff0d91931a2b661174af89e32c951d0a
      https://github.com/keith-packard/snek/commit/563dc29aff0d91931a2b661174af89e32c951d0a
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/samd21/snek-gpio.c

  Log Message:
  -----------
  chips/samd21: minor cleanup in snek-gpio.c

Use already-computed 'list_size' value.

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


  Commit: 99c475be9a0cc2d0fd1b11e9d1a645595f439208
      https://github.com/keith-packard/snek/commit/99c475be9a0cc2d0fd1b11e9d1a645595f439208
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M ports/narrow-1284/snek-narrow-1284-math.builtin

  Log Message:
  -----------
  ports/narrow-1284: Clean up smaller math builtin list

Provide alias for 'pow', clean up inf and nan definitions.

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


  Commit: 62f83b8a80d5371be98f9d323f81e856628fc1bb
      https://github.com/keith-packard/snek/commit/62f83b8a80d5371be98f9d323f81e856628fc1bb
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/atmega/snek-atmega.defs
    M chips/avr/snek-avr.defs
    M ports/duemilanove/Makefile
    M ports/grove/Makefile
    M ports/mega/Makefile
    M ports/nano-every/Makefile
    M ports/narrow-1284/Makefile

  Log Message:
  -----------
  Move AVR compile options to chips defs files

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 at keithp.com>


  Commit: 8946b402a0cef007a41a5298838ab6181989faa5
      https://github.com/keith-packard/snek/commit/8946b402a0cef007a41a5298838ab6181989faa5
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/atmega/snek-atmega-math.h
    M snek-atof.c

  Log Message:
  -----------
  chips/atmega: Adapt to more recent avr libc

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 at keithp.com>


  Commit: 71c8e1bf75e67afd59495b92058724a52b8a0461
      https://github.com/keith-packard/snek/commit/71c8e1bf75e67afd59495b92058724a52b8a0461
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    A .gitmodules
    M Makefile
    M ports/itsybitsy5v/.gitignore
    M ports/itsybitsy5v/Makefile
    A ports/itsybitsy5v/snek-atmega32u4-install.1
    A ports/itsybitsy5v/snek-atmega32u4-install.in
    R ports/itsybitsy5v/snek-itsybitsy-install.1
    R ports/itsybitsy5v/snek-itsybitsy-install.in
    M ports/uduino/Makefile
    R ports/uduino/snek-uduino-install.1
    R ports/uduino/snek-uduino-install.in
    A ubaboot

  Log Message:
  -----------
  Switch atmega32u4 devices to ubaboot

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 at keithp.com>


  Commit: 47b84e4e96bb35cee35bcd2457bd48e1034bbbac
      https://github.com/keith-packard/snek/commit/47b84e4e96bb35cee35bcd2457bd48e1034bbbac
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M ports/uduino/ao-pins.h

  Log Message:
  -----------
  uduino: Remove unused defines in ao-pins.h

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


  Commit: 37405b0111f42909b276b8475ecc3abcf761c6a0
      https://github.com/keith-packard/snek/commit/37405b0111f42909b276b8475ecc3abcf761c6a0
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M ao/ao-product.c
    M ao/ao-usb.h
    M chips/atmega/snek-328p.c
    M chips/atmega/snek-atmega-serial.c
    M chips/atmega/snek-atmega.h
    M chips/avr/ao-arch.h
    M chips/avr/ao-snek-avr.c
    M chips/avr/ao-usb-avr.c
    M chips/avr/snek-avr.h
    M chips/qemu/snek-qemu.h
    M chips/samd21/ao-arch.h
    M ports/ev3/snek-ev3.h
    M ports/mega/snek-mega.c
    M ports/nano-every/snek-nano-every.c
    M ports/narrow-1284/snek-narrow-1284.c
    M ports/posix/snek-posix.h
    M snek-atof.c
    M snek-builtin.py
    M snek-code.c
    M snek-error.c
    M snek-exec.c
    M snek-frame.c
    M snek-lex.c
    M snek-memory.c
    M snek-name.c
    M snek-ssd1315.c
    M snek.h

  Log Message:
  -----------
  Use __flash for AVR code instead of PROGMEM

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 at keithp.com>


  Commit: d3f2152c88cb4e08130cb0df3ef399c63aad14fa
      https://github.com/keith-packard/snek/commit/d3f2152c88cb4e08130cb0df3ef399c63aad14fa
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/atmega/snek-328p.builtin

  Log Message:
  -----------
  atmega328p: Increase pool and value stack

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 at keithp.com>


  Commit: a08acd0fece37a8d287baa93f9cd0c7fbae2e3d3
      https://github.com/keith-packard/snek/commit/a08acd0fece37a8d287baa93f9cd0c7fbae2e3d3
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/atmega/snek-atmega-eeprom.c

  Log Message:
  -----------
  chips/atmega: Handle EEPROM that doesn't start at 0

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 at keithp.com>


  Commit: 4faa63e3f1f1bf1767986d2620e089ff17b0397e
      https://github.com/keith-packard/snek/commit/4faa63e3f1f1bf1767986d2620e089ff17b0397e
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/atmega/snek-atmega-serial.c

  Log Message:
  -----------
  chips/atmega: Support newer avr-libc

A bunch of the register definitions names have changed.

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


  Commit: 692d605acf11ce723500198316d9950ab193cfa9
      https://github.com/keith-packard/snek/commit/692d605acf11ce723500198316d9950ab193cfa9
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M chips/atmega/snek-atmega.defs
    M chips/avr/snek-avr.defs
    A chips/avr/strfromg.c
    M ports/duemilanove/Makefile
    M ports/grove/Makefile
    M ports/grove/snek-grove.builtin
    M ports/lilypad/Makefile
    M ports/mega/Makefile
    M ports/nano-every/Makefile
    M ports/narrow-1284/Makefile
    M snek-pow.c

  Log Message:
  -----------
  Enable more features due to newer avr-gcc version

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 at keithp.com>


  Commit: 1490362d5e2d52c37c4de0c52c322c921c2916d9
      https://github.com/keith-packard/snek/commit/1490362d5e2d52c37c4de0c52c322c921c2916d9
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    R ports/duemilanove-big/.gitignore
    R ports/duemilanove-big/Makefile
    R ports/duemilanove-big/snek-duemilanove-big-install.1.in
    R ports/duemilanove-big/snek-duemilanove-big-install.in
    R ports/lilypad-big/.gitignore
    R ports/lilypad-big/Makefile
    R ports/uno-big/.gitignore
    R ports/uno-big/Makefile
    M snek-install.defs

  Log Message:
  -----------
  Remove -big versions of ATmega328p ports

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 at keithp.com>


  Commit: 31a64e730cc6d9a14f96752c3f4561461669e497
      https://github.com/keith-packard/snek/commit/31a64e730cc6d9a14f96752c3f4561461669e497
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    A chips/avr/Makefile
    A chips/avr/dtoa.h
    A chips/avr/ftoa_engine.c
    A chips/avr/strfromg-test.c
    A chips/avr/strfromg.h

  Log Message:
  -----------
  chips/avr: Add test for strfromg

Make sure our custom strfromf function works correctly

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


  Commit: 6c20d6206465a7c492c2eb2faeefa2368b62fbfc
      https://github.com/keith-packard/snek/commit/6c20d6206465a7c492c2eb2faeefa2368b62fbfc
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M ports/nano-every/snek-nano-every.builtin

  Log Message:
  -----------
  ports/nano-every: Define LED constant

Allows use of general blink program

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


  Commit: e6a13d4a9804169e3d50fe119f1537f1b4be0d1f
      https://github.com/keith-packard/snek/commit/e6a13d4a9804169e3d50fe119f1537f1b4be0d1f
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M ports/nano-every/Makefile

  Log Message:
  -----------
  ports/nano-every: Use custom avr-libc

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 at keithp.com>


  Commit: dfb6bae0bdfc1801144bbd2052b9fa647081e6df
      https://github.com/keith-packard/snek/commit/dfb6bae0bdfc1801144bbd2052b9fa647081e6df
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    R ports/mega/snek-mega-math.builtin
    A snek-math-small.builtin
    M snek-math.c

  Log Message:
  -----------
  Add smaller set of math builtins

This includes most of the math builtins except for hyperbolic trig,
error and gamma functions.

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


  Commit: 977425b23c4cb9a4427fbed091945e37de4282eb
      https://github.com/keith-packard/snek/commit/977425b23c4cb9a4427fbed091945e37de4282eb
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    A chips/atmega/snek-atmega-flash.c
    M chips/atmega/snek-atmega-serial.c
    M chips/atmega/snek-atmega-time.c
    M chips/atmega/snek-atmega.defs
    M chips/atmega/snek-atmega.h

  Log Message:
  -----------
  chips/atmega: Add flash writing code for ATmega4809

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 at keithp.com>


  Commit: 3e20a77c6afcd91eb7544dfa5d68e9948da82003
      https://github.com/keith-packard/snek/commit/3e20a77c6afcd91eb7544dfa5d68e9948da82003
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M ports/nano-every/Makefile
    M ports/nano-every/snek-nano-every-install.in
    M ports/nano-every/snek-nano-every.builtin
    M ports/nano-every/snek-nano-every.c

  Log Message:
  -----------
  ports/nano-every: Use the new ATmega4809 flash driver for storage

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 at keithp.com>


  Commit: 9b4256aa4c4348d30b9c0c2ed1ce140128c6454c
      https://github.com/keith-packard/snek/commit/9b4256aa4c4348d30b9c0c2ed1ce140128c6454c
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M snek-lex.c

  Log Message:
  -----------
  Stop processing comment when ^C is seen

Avoids having the lexer stuck in the comment loop when
the interpreter is supposed to be interrupted.

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


  Commit: 84e5f124d52984e36a9f6cfd602c4a94ac14b7a7
      https://github.com/keith-packard/snek/commit/84e5f124d52984e36a9f6cfd602c4a94ac14b7a7
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M examples/morse.py

  Log Message:
  -----------
  examples: Update morse example

Use LED. Use new callsign.

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


  Commit: 916cbb21c1905200492d7ea94a4a206f2760eb0f
      https://github.com/keith-packard/snek/commit/916cbb21c1905200492d7ea94a4a206f2760eb0f
  Author: Keith Packard <keithp at keithp.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M .github/Dockerfile

  Log Message:
  -----------
  .github: Modify Dockerfile to force package reload

Get the new version of lola

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


Compare: https://github.com/keith-packard/snek/compare/ede11ba43852...916cbb21c190

To unsubscribe from these emails, change your notification settings at https://github.com/keith-packard/snek/settings/notifications


More information about the Snek mailing list