Commit 4662fe30 authored by Damien George's avatar Damien George
Browse files

leon: Put SPARC/RTEMS dir/settings in common makefile.

parent d732bacf
......@@ -38,6 +38,22 @@ LEON specific directories:
leon-for-tests/ a version of MicroPython for running LEON tests
leon-tests/ the LEON tests
================================================================================
Prerequisites
================================================================================
To build and run the code you will need:
- make, bash, and Python (2.6+ or 3.3+)
- a local/host C compiler and linker (usually gcc et al)
- a cross compiler for SPARC V8 (eg sparc-rtems-gcc)
- the RTEMS library (eg rtems-4.8)
It is assumed that the host C compiler is in your path.
The location of the SPARC compiler and the RTEMS library are configured in the
leon-common/mkenv.mk file.
================================================================================
Building
================================================================================
......
# This file is part of the MicroPython port to LEON platforms
# Copyright (c) 2015-2016 George Robotics Limited
#
# Provided to the European Space Agency as part of the project "Porting of
# MicroPython to LEON platforms", contract number 4000114080/15/NL/FE/as.
#
# This file contains common settings to build for LEON2 using RTEMS
# the toolchain needs two things:
# - the sparc-rtems compiler (TOOL_BASE)
# - the precompiled RTEMS library (RTEMS_BASE)
TOOL_BASE = /home/notroot/Download/rtems-4.8/bin
RTEMS_BASE = /home/notroot/Download/rtems-4.8/sparc-rtems/leon2
# cross compiler settings
CROSS_COMPILE = $(TOOL_BASE)/sparc-rtems-
LD = $(CROSS_COMPILE)gcc
OBJDUMP = $(CROSS_COMPILE)objdump
# RTEMS lib needs
GCCSPECS = -B$(RTEMS_BASE)/lib/ -specs bsp_specs -qrtems
# C flags for RTEMS
CFLAGS += $(GCCSPECS)
CFLAGS += -I$(RTEMS_BASE)/lib/include
# LD flags for RTEMS
LDFLAGS += $(GCCSPECS)
LDFLAGS += -L$(RTEMS_BASE)/lib
......@@ -6,7 +6,7 @@
#
# This Makefile builds an example of a LEON port with a VM manager.
# the location of the MIcroPython LEON support code
# the location of the MicroPython LEON support code
LEON_COMMON = leon-common
LEON_COMMON_FROM_HERE = ../$(LEON_COMMON)
......@@ -18,25 +18,12 @@ QSTR_DEFS = $(LEON_COMMON_FROM_HERE)/qstrdefsport.h
# include py core make definitions
include ../py/py.mk
# the toolchain needs two things:
# - the sparc-rtems compiler: (TOOL_BASE)
# - the precompiled RTEMS (RTEMS_BASE)
TOOL_BASE = /home/notroot/Download/rtems-4.8/bin
RTEMS_BASE = /home/notroot/Download/rtems-4.8/sparc-rtems/leon2
CROSS_COMPILE = $(TOOL_BASE)/sparc-rtems-
LD = $(CROSS_COMPILE)gcc
OBJDUMP = $(CROSS_COMPILE)objdump
# RTEMS lib needs
GCCSPECS = -B$(RTEMS_BASE)/lib/ -specs bsp_specs -qrtems
# include LEON common makefile settings
include $(LEON_COMMON_FROM_HERE)/mkenv.mk
INC =
INC += -I. -I.. -I$(BUILD) -I$(LEON_COMMON_FROM_HERE)
INC += -I$(RTEMS_BASE)/lib/include
CFLAGS =
CFLAGS += $(GCCSPECS)
CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT) -mcpu=v8
# Use this to optimise the static hash tables
......@@ -49,10 +36,6 @@ else
CFLAGS += -Os -DNDEBUG
endif
LDFLAGS =
LDFLAGS += $(GCCSPECS)
LDFLAGS += -L$(RTEMS_BASE)/lib
LIBS = -lm
SRC_C = \
......
......@@ -6,7 +6,7 @@
#
# This Makefile builds an example of a minimal LEON port.
# the location of the MIcroPython LEON support code
# the location of the MicroPython LEON support code
LEON_COMMON = leon-common
LEON_COMMON_FROM_HERE = ../$(LEON_COMMON)
......@@ -18,25 +18,12 @@ QSTR_DEFS = $(LEON_COMMON_FROM_HERE)/qstrdefsport.h
# include py core make definitions
include ../py/py.mk
# the toolchain needs two things:
# - the sparc-rtems compiler: (TOOL_BASE)
# - the precompiled RTEMS (RTEMS_BASE)
TOOL_BASE = /home/notroot/Download/rtems-4.8/bin
RTEMS_BASE = /home/notroot/Download/rtems-4.8/sparc-rtems/leon2
CROSS_COMPILE = $(TOOL_BASE)/sparc-rtems-
LD = $(CROSS_COMPILE)gcc
OBJDUMP = $(CROSS_COMPILE)objdump
# RTEMS lib needs
GCCSPECS = -B$(RTEMS_BASE)/lib/ -specs bsp_specs -qrtems
# include LEON common makefile settings
include $(LEON_COMMON_FROM_HERE)/mkenv.mk
INC =
INC += -I. -I.. -I$(BUILD) -I$(LEON_COMMON_FROM_HERE)
INC += -I$(RTEMS_BASE)/lib/include
CFLAGS =
CFLAGS += $(GCCSPECS)
CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT) -mcpu=v8
# Use this to optimise the static hash tables
......@@ -49,10 +36,6 @@ else
CFLAGS += -Os -DNDEBUG
endif
LDFLAGS =
LDFLAGS += $(GCCSPECS)
LDFLAGS += -L$(RTEMS_BASE)/lib
LIBS = -lm
SRC_C = \
......
......@@ -6,7 +6,7 @@
#
# This Makefile builds an example of a minimal LEON port.
# the location of the MIcroPython LEON support code
# the location of the MicroPython LEON support code
LEON_COMMON = leon-common
LEON_COMMON_FROM_HERE = ../$(LEON_COMMON)
......@@ -18,25 +18,12 @@ QSTR_DEFS = $(LEON_COMMON_FROM_HERE)/qstrdefsport.h
# include py core make definitions
include ../py/py.mk
# the toolchain needs two things:
# - the sparc-rtems compiler: (TOOL_BASE)
# - the precompiled RTEMS (RTEMS_BASE)
TOOL_BASE = /home/notroot/Download/rtems-4.8/bin
RTEMS_BASE = /home/notroot/Download/rtems-4.8/sparc-rtems/leon2
CROSS_COMPILE = $(TOOL_BASE)/sparc-rtems-
LD = $(CROSS_COMPILE)gcc
OBJDUMP = $(CROSS_COMPILE)objdump
# RTEMS lib needs
GCCSPECS = -B$(RTEMS_BASE)/lib/ -specs bsp_specs -qrtems
# include LEON common makefile settings
include $(LEON_COMMON_FROM_HERE)/mkenv.mk
INC =
INC += -I. -I.. -I$(BUILD) -I$(LEON_COMMON_FROM_HERE)
INC += -I$(RTEMS_BASE)/lib/include
CFLAGS =
CFLAGS += $(GCCSPECS)
CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT) -mcpu=v8
# Use this to optimise the static hash tables
......@@ -51,10 +38,6 @@ endif
CFLAGS += $(CFLAGS_EXTRA)
LDFLAGS =
LDFLAGS += $(GCCSPECS)
LDFLAGS += -L$(RTEMS_BASE)/lib
LIBS = -lm
SRC_C = \
......
......@@ -4,9 +4,9 @@
# Provided to the European Space Agency as part of the project "Porting of
# MicroPython to LEON platforms", contract number 4000114080/15/NL/FE/as.
#
# This Makefile builds the LEON port used for running the test suite.
# This Makefile builds an example of a LEON port with multiple tasks.
# the location of the MIcroPython LEON support code
# the location of the MicroPython LEON support code
LEON_COMMON = leon-common
LEON_COMMON_FROM_HERE = ../$(LEON_COMMON)
......@@ -18,25 +18,12 @@ QSTR_DEFS = $(LEON_COMMON_FROM_HERE)/qstrdefsport.h
# include py core make definitions
include ../py/py.mk
# the toolchain needs two things:
# - the sparc-rtems compiler: (TOOL_BASE)
# - the precompiled RTEMS (RTEMS_BASE)
TOOL_BASE = /home/notroot/Download/rtems-4.8/bin
RTEMS_BASE = /home/notroot/Download/rtems-4.8/sparc-rtems/leon2
CROSS_COMPILE = $(TOOL_BASE)/sparc-rtems-
LD = $(CROSS_COMPILE)gcc
OBJDUMP = $(CROSS_COMPILE)objdump
# RTEMS lib needs
GCCSPECS = -B$(RTEMS_BASE)/lib/ -specs bsp_specs -qrtems
# include LEON common makefile settings
include $(LEON_COMMON_FROM_HERE)/mkenv.mk
INC =
INC += -I. -I.. -I$(BUILD) -I$(LEON_COMMON_FROM_HERE)
INC += -I$(RTEMS_BASE)/lib/include
CFLAGS =
CFLAGS += $(GCCSPECS)
CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT) -mcpu=v8
# Use this to optimise the static hash tables
......@@ -49,10 +36,6 @@ else
CFLAGS += -Os -DNDEBUG
endif
LDFLAGS =
LDFLAGS += $(GCCSPECS)
LDFLAGS += -L$(RTEMS_BASE)/lib
LIBS = -lm
SRC_C = \
......
......@@ -6,7 +6,7 @@
#
# This Makefile builds the LEON port used for running the test suite.
# the location of the MIcroPython LEON support code
# the location of the MicroPython LEON support code
LEON_COMMON = leon-common
LEON_COMMON_FROM_HERE = ../$(LEON_COMMON)
......@@ -18,25 +18,12 @@ QSTR_DEFS = $(LEON_COMMON_FROM_HERE)/qstrdefsport.h
# include py core make definitions
include ../py/py.mk
# the toolchain needs two things:
# - the sparc-rtems compiler: (TOOL_BASE)
# - the precompiled RTEMS (RTEMS_BASE)
TOOL_BASE = /home/notroot/Download/rtems-4.8/bin
RTEMS_BASE = /home/notroot/Download/rtems-4.8/sparc-rtems/leon2
CROSS_COMPILE = $(TOOL_BASE)/sparc-rtems-
LD = $(CROSS_COMPILE)gcc
OBJDUMP = $(CROSS_COMPILE)objdump
# RTEMS lib needs
GCCSPECS = -B$(RTEMS_BASE)/lib/ -specs bsp_specs -qrtems
# include LEON common makefile settings
include $(LEON_COMMON_FROM_HERE)/mkenv.mk
INC =
INC += -I. -I.. -I$(BUILD) -I$(LEON_COMMON_FROM_HERE)
INC += -I$(RTEMS_BASE)/lib/include
CFLAGS =
CFLAGS += $(GCCSPECS)
CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT) -mcpu=v8
# Use this to optimise the static hash tables
......@@ -49,10 +36,6 @@ else
CFLAGS += -Os -DNDEBUG
endif
LDFLAGS =
LDFLAGS += $(GCCSPECS)
LDFLAGS += -L$(RTEMS_BASE)/lib
LIBS = -lm
SRC_C = \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment