Skip to content

Commit

Permalink
Build metro-snek. Include it in linux and windows distributions
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Mar 25, 2019
1 parent 78f79f8 commit 4fbd13d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -22,7 +22,7 @@ ifeq ($(SNEK_OTHEROS),1)
SNEK_OTHEROS_DIR=linux windows
endif

SUBDIRS = posix snek-duino snekde doc examples $(SNEK_OTHEROS_DIR)
SUBDIRS = posix snek-duino metro-snek snekde doc examples $(SNEK_OTHEROS_DIR)

all:
+for dir in $(SUBDIRS); do (cd $$dir && make PREFIX=$(PREFIX) DESTDIR=$(DESTDIR)); done
Expand Down
2 changes: 1 addition & 1 deletion linux/Makefile
Expand Up @@ -21,7 +21,7 @@ include ../snek-install.defs
LINUX_DIST=snek-liniux-$(SNEK_VERSION).tar.bz2
LINUX_SH=snek-linux-$(SNEK_VERSION).sh
DESKTOP_FILES=../posix/snek.desktop.in ../snekde/snekde.desktop.in
FIRMWARE=../snek-duino/snek-duino.hex
FIRMWARE=../snek-duino/snek-duino-$(SNEK_VERSION).hex ../metro-snek/metro-snek-$(SNEK_VERSION).uf2
PROGS=../posix/snek ../snekde/snekde ../snek-duino/snek-duino-install.in
ICONS=../snek.svg
DOC=../doc/snek.pdf ../snek-duino/snek-duino-install.1 ../snekde/snekde.1
Expand Down
10 changes: 5 additions & 5 deletions snek-duino/Makefile
Expand Up @@ -24,14 +24,14 @@ SNEK_LOCAL_BUILTINS = snek-duino.builtin

include ../snek-install.defs

HEX=snek-duino.hex
HEX=snek-duino-$(SNEK_VERSION).hex
CC=avr-gcc
CFLAGS=-Os -DF_CPU=16000000UL -mmcu=atmega328p -I. -g -fno-jump-tables $(SNEK_CFLAGS)
LDFLAGS=-Wl,-uvfprintf -lprintf_flt -lm \
-Wl,--defsym -Wl,__TEXT_REGION_LENGTH__=0x8000 \
-Wl,--defsym -Wl,__DATA_REGION_LENGTH__=0x7a0 \
-Wl,--defsym -Wl,__EEPROM_REGION_LENGTH__=0x400 \
-Wl,-Map=snek-duino.map
-Wl,-Map=snek-duino-$(SNEK_VERSION).map

ISP = usbtiny
#ISP = avrisp2
Expand Down Expand Up @@ -62,10 +62,10 @@ ISP = usbtiny

all: $(HEX) snek-duino-install

snek-duino.hex: snek-duino
avr-objcopy -O ihex -R .eeprom snek-duino $@
snek-duino-$(SNEK_VERSION).hex: snek-duino-$(SNEK_VERSION)
avr-objcopy -O ihex -R .eeprom snek-duino-$(SNEK_VERSION) $@

snek-duino: $(SNEK_OBJ)
snek-duino-$(SNEK_VERSION): $(SNEK_OBJ)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
@awk '/__data_load_end/{printf("ROM used: %d bytes\n", strtonum($$1)); }' snek-duino.map

Expand Down
3 changes: 2 additions & 1 deletion windows/snek.cfg.in
Expand Up @@ -18,7 +18,8 @@ pypi_wheels=pyserial==3.4
windows-curses==1.0

files =../COPYING
../snek-duino/snek-duino.hex
../snek-duino/snek-duino-@SNEK_VERSION@.hex
../metro-snek/metro-snek-@SNEK_VERSION@.uf2

[Build]
installer_name=snek-windows-@SNEK_VERSION_DASH@.exe

0 comments on commit 4fbd13d

Please sign in to comment.