From a41e806fe8da502f2b3438b03317abf71c37bed8 Mon Sep 17 00:00:00 2001 From: ARMinARM Date: Sun, 28 Sep 2014 22:31:09 +0000 Subject: [PATCH] ARMinARM board --- Makefile | 12 ++++++++++ boards/ARMINARM.py | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 boards/ARMINARM.py diff --git a/Makefile b/Makefile index edfa22b877..5562a1ebc8 100755 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ # LPC1768=1 # beta # LCTECH_STM32F103RBT6=1 # LC Technology STM32F103RBT6 Ebay boards # ARDUINOMEGA2560=1 +# ARMINARM=1 # Or nothing for standard linux compile # # Also: @@ -263,6 +264,17 @@ EMBEDDED=1 BOARD=ARDUINOMEGA2560 ARDUINO_AVR=1 OPTIMIZEFLAGS+=-Os +else ifdef ARMINARM +EMBEDDED=1 +USE_NET=1 +USE_GRAPHICS=1 +USE_FILESYSTEM=1 +SAVE_ON_FLASH=1 +BOARD=ARMINARM +DEFINES+=-DESPRUINOBOARD +STLIB=STM32F10X_HD +PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_hd.o +OPTIMIZEFLAGS+=-O3 else ifdef CARAMBOLA EMBEDDED=1 BOARD=CARAMBOLA diff --git a/boards/ARMINARM.py b/boards/ARMINARM.py new file mode 100644 index 0000000000..2388bf8cc1 --- /dev/null +++ b/boards/ARMINARM.py @@ -0,0 +1,57 @@ +#!/bin/false +# This file is part of Espruino, a JavaScript interpreter for Microcontrollers +# +# Copyright (C) 2013 Gordon Williams +# Adapted for ARMinARM board by Rik Teerling +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# ---------------------------------------------------------------------------------------- +# This file contains information for a specific board - the available pins, and where LEDs, +# Buttons, and other in-built peripherals are. It is used to build documentation as well +# as various source and header files for Espruino. +# ---------------------------------------------------------------------------------------- + +import pinutils; +info = { + 'name' : "ARMinARM addon board for Raspberry Pi B+", + 'link' : [ "https://www.onandoffables.com/" ], + 'variables' : 3250, + 'binary_name' : 'espruino_%v_ARMinARM.bin', +}; +chip = { + 'part' : "STM32F103RET6", + 'family' : "STM32F1", + 'package' : "LQFP64", + 'ram' : 64, + 'flash' : 512, + 'speed' : 72, + 'usart' : 5, + 'spi' : 3, + 'i2c' : 2, + 'adc' : 3, + 'dac' : 2, +}; +devices = { + 'OSC' : { 'pin_in' : 'D0', + 'pin_out' : 'D1' }, + 'OSC_RTC' : { 'pin_in' : 'C14', + 'pin_out' : 'C15' }, + 'LED1' : { 'pin' : 'B0' }, + 'BTN1' : { 'pin' : 'A0' }, + 'USB' : { 'pin_disc' : 'C13', + 'pin_dm' : 'A11', + 'pin_dp' : 'A12' }, + 'SD' : { 'pin_cs' : 'D2', + 'pin_di' : 'B15', + 'pin_do' : 'B14', + 'pin_clk' : 'B13' }, +# 'BLUETOOTH' : { 'pin_tx' : 'A9', +# 'pin_rx' : 'A10' }, +}; + +def get_pins(): + pins = pinutils.scan_pin_file([], 'stm32f103xe.csv', 6, 10, 11) + return pinutils.only_from_package(pinutils.fill_gaps_in_pin_list(pins), chip["package"])