Add a firmware directory, for those projects with firmware.
This commit is contained in:
parent
a7a60aa058
commit
b7bd6b2d8e
|
@ -0,0 +1,11 @@
|
|||
/* @P@/src/firmware/TopSource.c
|
||||
*
|
||||
* (c)2006, Laurence Withers. Released under the GNU GPL. See file
|
||||
* COPYING for more information / terms of license.
|
||||
*/
|
||||
|
||||
// project-wide includes here
|
||||
|
||||
/* options for text editors
|
||||
kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
*/
|
|
@ -0,0 +1 @@
|
|||
source src/firmware/build.firmware
|
|
@ -0,0 +1,36 @@
|
|||
# These are external variables, and shouldn't clash with anything else
|
||||
# FIRMWARE
|
||||
# FIRMWARE_BUILT
|
||||
#
|
||||
|
||||
if [ -z ${FIRMWARE_BUILT} ]
|
||||
then
|
||||
FIRMWARE="obj/@P@.hex"
|
||||
|
||||
echo "Building firmware ${FIRMWARE}..."
|
||||
|
||||
source src/firmware/build.monolithic
|
||||
|
||||
MODIFIED=0
|
||||
for test in ${MONOLITHIC_TESTS} ${SRC}
|
||||
do
|
||||
if [ ${test} -nt ${FIRMWARE} ]
|
||||
then
|
||||
MODIFIED=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${MODIFIED} -ne 0 ]
|
||||
then
|
||||
echo " Compiling"
|
||||
|
||||
do_cmd ${FWCC} ${FWCFLAGS} -o "${FIRMWARE}" ${SRC} || return 1
|
||||
|
||||
print_success "Firmware built"
|
||||
else
|
||||
print_success "Firmware up to date"
|
||||
fi
|
||||
|
||||
FIRMWARE_BUILT=1
|
||||
fi
|
|
@ -0,0 +1 @@
|
|||
source src/firmware/build.install-firmware
|
|
@ -0,0 +1,9 @@
|
|||
build_target firmware
|
||||
|
||||
# make paths (this is for Gentoo in particular)
|
||||
build_dir_tree "${HEXDIR}" || return 1
|
||||
|
||||
# install binary
|
||||
echo "Installing firmware into '${HEXDIR}'"
|
||||
install_file "${FIRMWARE}" "${HEXDIR}" 0644 || return 1
|
||||
print_success "Done"
|
|
@ -0,0 +1,15 @@
|
|||
# These are external variables, and shouldn't clash with anything else
|
||||
# FIRMWARE_MONOLITHIC
|
||||
#
|
||||
|
||||
if [ -z "${FIRMWARE_MONOLITHIC}" ]
|
||||
then
|
||||
SRC="obj/firmware.c"
|
||||
|
||||
MONOLITHIC_TESTS="src/firmware/build.firmware src/firmware/build.monolithic"
|
||||
MONOLITHIC_SOURCE="$(echo src/firmware/TopSource.c)"
|
||||
make_monolithic ${SRC} C || return 1
|
||||
|
||||
FIRMWARE_MONOLITHIC=1
|
||||
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${SRC}"
|
||||
fi
|
Loading…
Reference in New Issue