microbit: Integrate support for transparent gcc compiles

Custom CMakefile added to microbit-dal to automatically assemble the correct
version of CortexContextSwitch.s accordiong to the current build target.
This commit is contained in:
Joe Finney 2015-09-02 18:54:31 +01:00
parent cbaec38d06
commit f616011ac1
2 changed files with 4 additions and 0 deletions

View file

@ -27,11 +27,15 @@ set(YOTTA_AUTO_MICROBIT-DAL_CPP_FILES
"DynamicPwm.cpp"
"MicroBitPin.cpp"
"MicroBitSerial.cpp"
"MicroBitHeapAllocator.cpp"
)
if(CMAKE_COMPILER_IS_GNUCC)
file(REMOVE "CortexContextSwitch.s")
configure_file("CortexContextSwitch.s.gcc" "CortexContextSwitch.s" COPYONLY)
else()
file(REMOVE "CortexContextSwitch.s")
configure_file("CortexContextSwitch.s.armcc" "CortexContextSwitch.s" COPYONLY)
endif()
set(YOTTA_AUTO_MICROBIT-DAL_S_FILES