mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 14:01:54 +00:00
Cortex-M3 and Cortex-M4 are not using exactly the same instruction set. Cortex-M3 is using ARMv7-M ISA which is a subset of the ARMv7E-M used by the Cortex-M4 core (even though the delta is small). Let's restrict each core to the right subset of instruction by pushing the -mcpu/-march configuration in the chip specific area. Note: GCC 4.8 is now using the full ARMv7E-M instruction set and will emit "undefined instruction" on Cortex-M3 without this patch. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chromium:314194 TEST=build *and* run on Spring and Link. Change-Id: I2f9b87fec689e8d1097809cab437a2bd32dfa194 Reviewed-on: https://chromium-review.googlesource.com/175487 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
30 lines
872 B
Makefile
30 lines
872 B
Makefile
# -*- makefile -*-
|
|
# Copyright (c) 2013 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.
|
|
#
|
|
# LM4 chip specific files build
|
|
#
|
|
|
|
# LM4 SoC has a Cortex-M4F ARM core
|
|
CORE:=cortex-m
|
|
# Allow the full Cortex-M4 instruction set
|
|
CFLAGS_CPU+=-march=armv7e-m -mcpu=cortex-m4
|
|
|
|
# Required chip modules
|
|
chip-y=clock.o gpio.o hwtimer.o jtag.o system.o uart.o
|
|
|
|
# Optional chip modules
|
|
chip-$(CONFIG_ADC)+=adc.o chip_temp_sensor.o
|
|
chip-$(CONFIG_EEPROM)+=eeprom.o
|
|
chip-$(CONFIG_FANS)+=fan.o
|
|
chip-$(CONFIG_FLASH)+=flash.o
|
|
chip-$(CONFIG_I2C)+=i2c.o
|
|
chip-$(CONFIG_LPC)+=lpc.o
|
|
chip-$(CONFIG_PECI)+=peci.o
|
|
# pwm functions are implemented with the fan functions
|
|
chip-$(CONFIG_PWM)+=pwm.o fan.o
|
|
chip-$(CONFIG_SPI)+=spi.o
|
|
chip-$(CONFIG_WATCHDOG)+=watchdog.o
|
|
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
|