Merge branch 'master' into HTTPS

This commit is contained in:
Gordon Williams 2015-11-18 15:15:07 +00:00
commit ee898b0a81
6 changed files with 102 additions and 9 deletions

View File

@ -26,6 +26,7 @@
# HYSTM32_24=1 # HY STM32 2.4 Ebay boards
# HYSTM32_28=1 # HY STM32 2.8 Ebay boards
# HYSTM32_32=1 # HY STM32 3.2 VCT6 Ebay boards
# HYTINY_STM103T=1 # HY-TinySTM103T by Haoyu (hotmcu.com)
# STM32VLDISCOVERY=1
# STM32F3DISCOVERY=1
# STM32F4DISCOVERY=1
@ -217,6 +218,15 @@ STLIB=STM32F10X_MD
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md.o
OPTIMIZEFLAGS+=-Os # short on program memory
else ifdef HYTINY_STM103T
EMBEDDED=1
USE_GRAPHICS=1
SAVE_ON_FLASH=1
BOARD=HYTINY_STM103T
STLIB=STM32F10X_MD
PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f1/lib/startup_stm32f10x_md.o
OPTIMIZEFLAGS+=-Os # short on program memory
else ifdef MAPLERET6_STM32
EMBEDDED=1
USE_NET=1

89
boards/HYTINY_STM103T.py Normal file
View File

@ -0,0 +1,89 @@
#!/bin/false
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers
#
# Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
#
# 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;
import json;
info = {
'name' : "Haoyu HY-TinySTM103T",
'link' : [ "http://www.hotmcu.com/stm32f103tb-arm-cortex-m3-development-board-p-222.html" ],
'variables' : 1020,
'binary_name' : 'espruino_%v_hytiny_stm103t.bin',
};
chip = {
'part' : "STM32F103TBT6",
'family' : "STM32F1",
'package' : "VFQFPN36",
'ram' : 20,
'flash' : 128,
'speed' : 72,
'usart' : 2,
'spi' : 1,
'i2c' : 1,
'adc' : 2,
'dac' : 0,
'saved_code' : {
'address' : 0x08000000 + ((128-6)*1024),
'page_size' : 1024, # size of pages
'pages' : 6, # number of pages we're using
'flash_available' : 128-6 # 6 used for code
},
};
devices = {
# 'OSC' : { 'pin_1' : 'D0',
# 'pin_2' : 'D1' },
'LED1' : { 'pin' : 'A1' },
'USB' : { 'pin_disc' : 'A0',
'pin_dm' : 'A11',
'pin_dp' : 'A12'
},
};
# left-right, or top-bottom order
board = {
'left' : [ '3.3','A3','A4','A5','A6','A7','B0','B1','B2','A8','A9','A10','A11','A12','GND' ],
'right' : [ 'GND','A2','A1','A0','RST','ISP','A14','A13','B7','B6','B5','B4','B3','A15','5V' ],
'bottom' : [ '3.3','A9','A10','A13/SWDIO','A14/SWCLK','GND' ],
};
board["_css"] = """
#board {
width: 290px;
height: 533px;
left: 300px;
background-image: url(img/HYTINY_STM103T.jpg);
}
#boardcontainer {
height: 730px;
}
#left {
top: 20px;
right: 290px;
}
#right {
top: 20px;
left: 290px;
}
#bottom {
top: 540px;
left: 45px;
}
.leftpin { height: 32px; }
.rightpin { height: 32px; }
.bottompin { width: 28.5px; }
""";
def get_pins():
pins = pinutils.scan_pin_file([], 'stm32f103xb.csv', 6, 10, 11)
return pinutils.only_from_package(pinutils.fill_gaps_in_pin_list(pins), chip["package"])

View File

@ -21,7 +21,7 @@ info = {
'default_console' : "EV_SERIAL1",
'default_console_tx' : "B6",
'default_console_rx' : "B7",
'variables' : 4000, # FIXME - RAM was lowered for AES test
'variables' : 5100,
'bootloader' : 1,
'binary_name' : 'espruino_%v_pico_1r3.bin',
'binaries' : [

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

@ -1,4 +1,4 @@
LFBGA100,LQFP48,TFBGA64,LQFP64,VFQFPN36,,Name,Type,IO,After Reset,Default,Remap
LFBGA100,LQFP48,TFBGA64,LQFP64,LQFP100,VFQFPN36,Name,Type,IO,After Reset,Default,Remap
A3,0,,0,1,0,PE2,I/O,FT,PE2,TRACECK,
B3,0,,0,2,0,PE3,I/O,FT,PE3,TRACED0,
C3,0,,0,3,0,PE4,I/O,FT,PE4,TRACED1,

1 LFBGA100 LQFP48 TFBGA64 LQFP64 LQFP100 VFQFPN36 Name Type IO After Reset Default Remap
2 A3 0 0 1 0 1 0 PE2 I/O FT PE2 TRACECK
3 B3 0 0 2 0 2 0 PE3 I/O FT PE3 TRACED0
4 C3 0 0 3 0 3 0 PE4 I/O FT PE4 TRACED1

View File

@ -20,13 +20,7 @@ FILE=$1
# just a random check...
MAXSIZE=`grep FLASH_AVAILABLE_FOR_CODE gen/platform_config.h | sed "s/[^0-9]*\([0-9][0-9]*\).*/\1/"`
DU=du
if [ "$(uname)" == "Darwin" ]; then
DU=gdu
fi
ACTUALSIZE=$(${DU} -b "$FILE" | cut -f 1)
ACTUALSIZE=$(wc -c < "$FILE")
if [ $ACTUALSIZE -gt $MAXSIZE ]; then
echo FAIL - size of $ACTUALSIZE is over $MAXSIZE bytes