mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
added DPT-Board to makefile and boards
This commit is contained in:
parent
227e2065d8
commit
46c58247b8
26
Makefile
26
Makefile
@ -35,6 +35,7 @@
|
||||
# NRF51822DK=1
|
||||
# NRF52832DK=1 # Ultra low power BLE (bluetooth low energy) enabled SoC. Arm Cortex-M4f processor. With NFC (near field communication).
|
||||
# CARAMBOLA=1
|
||||
# DPTBOARD=1 # DPTechnics IoT development board with BlueCherry.io IoT platform integration and DPT-WEB IDE.
|
||||
# RASPBERRYPI=1
|
||||
# BEAGLEBONE=1
|
||||
# ARIETTA=1
|
||||
@ -453,6 +454,18 @@ USE_FILESYSTEM=1
|
||||
USE_GRAPHICS=1
|
||||
USE_NET=1
|
||||
|
||||
else ifdef DPTBOARD
|
||||
EMBEDDED=1
|
||||
BOARD=DPTBOARD
|
||||
DEFINES += -DDPTBOARD -DSYSFS_GPIO_DIR="\"/sys/class/gpio\""
|
||||
LINUX=1
|
||||
OPENWRT_UCLIBC=1 # link with toolchain libc (uClibc or musl)
|
||||
FIXED_OBJ_NAME=1 # when defined the linker will always produce 'espruino' as executable name, for packaging in .ipk, .deb,
|
||||
USE_FILESYSTEM=1
|
||||
USE_GRAPHICS=1
|
||||
USE_NET=1
|
||||
endif
|
||||
|
||||
else ifdef LCTECH_STM32F103RBT6
|
||||
EMBEDDED=1
|
||||
SAVE_ON_FLASH=1
|
||||
@ -1283,6 +1296,11 @@ export STAGING_DIR=$(TOOLCHAIN_DIR)
|
||||
export CCPREFIX=$(TOOLCHAIN_DIR)/mipsel-openwrt-linux-
|
||||
endif
|
||||
|
||||
ifdef DPTBOARD
|
||||
export STAGING_DIR=$(shell cd ~/breakoutopenwrt/staging_dir/toolchain-*/bin;pwd)
|
||||
export CCPREFIX=$(STAGING_DIR)/mips-openwrt-linux-
|
||||
endif
|
||||
|
||||
ifdef RASPBERRYPI
|
||||
ifneq ($(shell uname -m),armv6l)
|
||||
# eep. let's cross compile
|
||||
@ -1324,8 +1342,12 @@ targets/linux/main.c \
|
||||
targets/linux/jshardware.c
|
||||
LIBS += -lm # maths lib
|
||||
LIBS += -lpthread # thread lib for input processing
|
||||
ifdef OPENWRT_UCLIBC
|
||||
LIBS += -lc
|
||||
else
|
||||
LIBS += -lstdc++
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef NUCLEO
|
||||
WRAPPERSOURCES += targets/nucleo/jswrap_nucleo.c
|
||||
@ -1449,7 +1471,11 @@ $(PLATFORM_CONFIG_FILE): boards/$(BOARD).py scripts/build_platform_config.py
|
||||
$(Q)python scripts/build_platform_config.py $(BOARD)
|
||||
|
||||
compile=$(CC) $(CFLAGS) $< -o $@
|
||||
ifdef FIXED_OBJ_NAME
|
||||
link=$(LD) $(LDFLAGS) -o espruino $(OBJS) $(LIBS)
|
||||
else
|
||||
link=$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
endif
|
||||
# note: link is ignored for the ESP8266
|
||||
obj_dump=$(OBJDUMP) -x -S $(PROJ_NAME).elf > $(PROJ_NAME).lst
|
||||
obj_to_bin=$(OBJCOPY) -O $1 $(PROJ_NAME).elf $(PROJ_NAME).$2
|
||||
|
||||
47
boards/DPTBOARD.py
Normal file
47
boards/DPTBOARD.py
Normal file
@ -0,0 +1,47 @@
|
||||
#!/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;
|
||||
info = {
|
||||
'name' : "DPT-Board",
|
||||
'default_console' : "EV_USBSERIAL",
|
||||
'binary_name' : 'espruino_%v_dpt_board',
|
||||
};
|
||||
chip = {
|
||||
'part' : "DPTBOARD",
|
||||
'family' : "LINUX",
|
||||
'package' : "",
|
||||
'ram' : -1,
|
||||
'flash' : -1,
|
||||
'speed' : -1,
|
||||
'usart' : 1,
|
||||
'spi' : 1,
|
||||
'i2c' : 1,
|
||||
'adc' : 0,
|
||||
'dac' : 0,
|
||||
};
|
||||
# left-right, or top-bottom order
|
||||
board = {
|
||||
};
|
||||
devices = {
|
||||
};
|
||||
|
||||
board_css = """
|
||||
""";
|
||||
|
||||
def get_pins():
|
||||
pins = pinutils.generate_pins(0,27)
|
||||
|
||||
return pins
|
||||
Loading…
x
Reference in New Issue
Block a user