From d318b5cfc1a0312697739576d35cc1a190d88849 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 1 Apr 2017 12:23:24 -0600 Subject: first rough cut at skeleton of code for pnpservo .. altos boots and runs --- src/pnpservo-v1/flash-loader/.gitignore | 2 ++ src/pnpservo-v1/flash-loader/ao_pins.h | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/pnpservo-v1/flash-loader/.gitignore create mode 100644 src/pnpservo-v1/flash-loader/ao_pins.h (limited to 'src/pnpservo-v1/flash-loader') diff --git a/src/pnpservo-v1/flash-loader/.gitignore b/src/pnpservo-v1/flash-loader/.gitignore new file mode 100644 index 00000000..86ebb7f2 --- /dev/null +++ b/src/pnpservo-v1/flash-loader/.gitignore @@ -0,0 +1,2 @@ +ao_product.h +lambdakey* diff --git a/src/pnpservo-v1/flash-loader/ao_pins.h b/src/pnpservo-v1/flash-loader/ao_pins.h new file mode 100644 index 00000000..4b788f67 --- /dev/null +++ b/src/pnpservo-v1/flash-loader/ao_pins.h @@ -0,0 +1,37 @@ +/* + * Copyright © 2013 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#ifndef _AO_PINS_H_ +#define _AO_PINS_H_ + +#include + +/* Pin 5 on debug connector */ + +#define AO_BOOT_PIN 1 +#define AO_BOOT_APPLICATION_GPIO stm_gpioa +#define AO_BOOT_APPLICATION_PIN 15 +#define AO_BOOT_APPLICATION_VALUE 1 +#define AO_BOOT_APPLICATION_MODE AO_EXTI_MODE_PULL_UP + +/* USB */ +#define HAS_USB 1 +#define AO_USB_DIRECTIO 0 +#define AO_PA11_PA12_RMP 1 + +#endif /* _AO_PINS_H_ */ -- cgit v1.2.3 From 9f451db9889cd578c3032356fd2aa4b5ed45878d Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sun, 2 Apr 2017 15:47:31 -0600 Subject: capture pnpservo makefiles too --- src/pnpservo-v1/Makefile | 72 +++++++++++++++++++++++++++++++++++ src/pnpservo-v1/flash-loader/Makefile | 8 ++++ 2 files changed, 80 insertions(+) create mode 100644 src/pnpservo-v1/Makefile create mode 100644 src/pnpservo-v1/flash-loader/Makefile (limited to 'src/pnpservo-v1/flash-loader') diff --git a/src/pnpservo-v1/Makefile b/src/pnpservo-v1/Makefile new file mode 100644 index 00000000..8606b1ae --- /dev/null +++ b/src/pnpservo-v1/Makefile @@ -0,0 +1,72 @@ +# +# AltOS build +# +# + +include ../stmf0/Makefile.defs + +INC = \ + ao.h \ + ao_arch.h \ + ao_arch_funcs.h \ + ao_boot.h \ + ao_pins.h \ + ao_product.h \ + ao_task.h \ + stm32f0.h \ + Makefile + +ALTOS_SRC = \ + ao_boot_chain.c \ + ao_interrupt.c \ + ao_product.c \ + ao_romconfig.c \ + ao_cmd.c \ + ao_config.c \ + ao_task.c \ + ao_led.c \ + ao_dma_stm.c \ + ao_stdio.c \ + ao_mutex.c \ + ao_panic.c \ + ao_timer.c \ + ao_usb_stm.c \ + ao_flash_stm.c + +PRODUCT=PNPservo-v1 +PRODUCT_DEF=-DPNPSERVO +IDPRODUCT=0x000a + +CFLAGS = $(PRODUCT_DEF) -I. $(STMF0_CFLAGS) -Os -g + +LDFLAGS=$(CFLAGS) -L$(TOPDIR)/stmf0 -Wl,-Tlambda.ld + +PROGNAME=pnpservo-v1 +PROG=$(PROGNAME)-$(VERSION).elf +HEX=$(PROGNAME)-$(VERSION).ihx + +SRC=$(ALTOS_SRC) ao_pnpservo.c +OBJ=$(SRC:.c=.o) + +all: $(PROG) $(HEX) + +$(PROG): Makefile $(OBJ) lambda.ld altos.ld + $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS) + +$(OBJ): $(INC) + +ao_product.h: ao-make-product.5c ../Version + $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@ + +load: $(PROG) + stm-load $(PROG) + +distclean: clean + +clean: + rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx + rm -f ao_product.h + +install: + +uninstall: diff --git a/src/pnpservo-v1/flash-loader/Makefile b/src/pnpservo-v1/flash-loader/Makefile new file mode 100644 index 00000000..3283380c --- /dev/null +++ b/src/pnpservo-v1/flash-loader/Makefile @@ -0,0 +1,8 @@ +# +# AltOS flash loader build +# +# + +TOPDIR=../.. +HARDWARE=pnpservo-v1 +include $(TOPDIR)/stmf0/Makefile-flash.defs -- cgit v1.2.3