mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-16 18:11:22 +00:00
Move OS files to a CPU specific directory
Preparatory work to introduce a second SoC : 3/5 We split the drivers files which contain SoC specific drivers from the OS files which only depend the actual CPU core. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run EC firmware on BDS and test a few commands on the console. Change-Id: I598f8b23e074da9bd6b0e2ce6689c1075fe854f0
This commit is contained in:
6
Makefile
6
Makefile
@@ -28,6 +28,7 @@ CPPFLAGS+=$(foreach t,$(_tsk_cfg),-D$(t))
|
||||
# Get build configuration from sub-directories
|
||||
include board/$(BOARD)/build.mk
|
||||
include chip/$(CHIP)/build.mk
|
||||
include core/$(CORE)/build.mk
|
||||
include common/build.mk
|
||||
include test/build.mk
|
||||
include util/build.mk
|
||||
@@ -35,11 +36,12 @@ include util/build.mk
|
||||
objs_from_dir=$(foreach obj,$(2), $(out)/$(1)/$(obj))
|
||||
|
||||
# Get all sources to build
|
||||
all-y=$(call objs_from_dir,chip/$(CHIP),$(chip-y))
|
||||
all-y=$(call objs_from_dir,core/$(CORE),$(core-y))
|
||||
all-y+=$(call objs_from_dir,chip/$(CHIP),$(chip-y))
|
||||
all-y+=$(call objs_from_dir,board/$(BOARD),$(board-y))
|
||||
all-y+=$(call objs_from_dir,common,$(common-y))
|
||||
all-y+=$(call objs_from_dir,test,$($(PROJECT)-y))
|
||||
dirs=chip/$(CHIP) board/$(BOARD) common test util
|
||||
dirs=core/$(CORE) chip/$(CHIP) board/$(BOARD) common test util
|
||||
includes=include $(dirs)
|
||||
|
||||
include Makefile.rules
|
||||
|
||||
@@ -59,7 +59,7 @@ qemu-tests: $(qemu-test-targets)
|
||||
|
||||
$(out)/firmware_image.lds: common/firmware_image.lds.S
|
||||
$(call quiet,lds,LDS )
|
||||
$(out)/%.lds: chip/$(CHIP)/ec.lds.S
|
||||
$(out)/%.lds: core/$(CORE)/ec.lds.S
|
||||
$(call quiet,lds,LDS )
|
||||
|
||||
$(out)/%.bin: $(out)/%.obj
|
||||
|
||||
@@ -25,7 +25,7 @@ CFLAGS_WARN=-Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
CFLAGS_DEBUG= -g
|
||||
CFLAGS_INCLUDE=$(foreach i,$(includes),-I$(i) )
|
||||
CFLAGS_DEFINE=-DOUTDIR=$(out) -DCHIP=$(CHIP) -DTASKFILE=$(PROJECT).tasklist \
|
||||
-DBOARD=$(BOARD) -DBOARD_$(BOARD)
|
||||
-DBOARD=$(BOARD) -DBOARD_$(BOARD) -DCORE=$(CORE)
|
||||
CPPFLAGS=$(CFLAGS_DEFINE) $(CFLAGS_INCLUDE)
|
||||
CFLAGS=$(CPPFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEBUG) $(CFLAGS_WARN)
|
||||
BUILD_CFLAGS=$(CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
# LM4 chip specific files build
|
||||
#
|
||||
|
||||
# CPU specific compilation flags
|
||||
CFLAGS_CPU=-mcpu=cortex-m4 -mthumb -Os -mno-sched-prolog
|
||||
# LM4 SoC has a Cortex-M4 ARM core
|
||||
CORE:=cortex-m
|
||||
|
||||
chip-y=init.o panic.o switch.o task.o timer.o pwm.o i2c.o adc.o jtag.o
|
||||
chip-y=pwm.o i2c.o adc.o jtag.o
|
||||
chip-y+=clock.o gpio.o system.o lpc.o uart.o power_button.o
|
||||
chip-y+=flash.o watchdog.o eeprom.o temp_sensor.o hwtimer.o
|
||||
chip-$(CONFIG_TASK_KEYSCAN)+=keyboard_scan.o
|
||||
|
||||
11
core/cortex-m/build.mk
Normal file
11
core/cortex-m/build.mk
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
#
|
||||
# Cortex-M4 core OS files build
|
||||
#
|
||||
|
||||
# CPU specific compilation flags
|
||||
CFLAGS_CPU=-mcpu=cortex-m4 -mthumb -Os -mno-sched-prolog
|
||||
|
||||
core-y=init.o panic.o switch.o task.o timer.o
|
||||
@@ -18,7 +18,7 @@ MEMORY
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
OUTDIR/chip/CHIP/init.o (.text)
|
||||
OUTDIR/core/CORE/init.o (.text)
|
||||
*(.text*)
|
||||
#ifdef COMPILE_FOR_RAM
|
||||
} > IRAM
|
||||
Reference in New Issue
Block a user