FreeCalypso > hg > freecalypso-tools
view loadtools/Makefile @ 497:74610c4f10f7
target-utils: added 10 ms delay at the end of abb_power_off()
The deosmification of the ABB access code (replacement of osmo_delay_ms()
bogus delays with correctly-timed ones, which are significantly shorter)
had one annoying side effect: when executing the poweroff command from
any of the programs, one last '=' prompt character was being sent (and
received by the x86 host) as the Calypso board powers off. With delays
being shorter now, the abb_power_off() function was returning and the
standalone program's main loop was printing its prompt before the Iota chip
fully executed the switch-off sequence!
I thought about inserting an endless tight loop at the end of the
abb_power_off() function, but the implemented solution of a 10 ms delay
is a little nicer IMO because if the DEVOFF operation doesn't happen for
some reason in a manual hacking scenario, there won't be an artificial
blocker in the form of a tight loop keeping us from further poking around.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 25 May 2019 20:44:05 +0000 |
parents | 90d7c360a614 |
children | 0dd2c87c1b63 |
line wrap: on
line source
CC= gcc CFLAGS= -O2 PROGS= fc-iram fc-loadtool fc-xram fc-compalram fc-buzplay INSTALL_PREFIX= /opt/freecalypso INSTBIN=${INSTALL_PREFIX}/bin INSTCONF=${INSTALL_PREFIX}/loadtools INSTHELP=${INSTALL_PREFIX}/helpfiles EXTRA_OBJ= compalload.o COMPALRAM_OBJS= compalload.o compalram.o defpath.o ttypassthru.o IRAM_OBJS= defexitstub.o defpath.o flashstubs.o hexdecode.o hwparam.o \ romload.o secondprog.o sertool.o srecreader.o ttypassthru.o \ ${EXTRA_OBJ} LOADTOOL_OBJS= crc32tab.o defpath.o flashops.o flcmplboot.o flmain.o flmisc.o \ flprogbin.o flprogsrec.o flutil.o hexdecode.o hwparam.o \ labaud.o ltdispatch.o ltdump.o ltexit.o lthelp.o ltmain.o \ ltmisc.o ltpassthru.o ltscript.o romload.o srecreader.o \ tpinterf.o tpinterf2.o tpinterf3.o ${EXTRA_OBJ} XRAM_OBJS= chainload.o clmain.o defexitstub.o defpath.o flashstubs.o \ hexdecode.o hwparam.o initscript.o labaud.o romload.o \ secondprog.o srecreader.o tpinterf.o ttypassthru.o ${EXTRA_OBJ} BUZPLAY_OBJS= bpdispatch.o bpmain.o buzplay.o defpath.o flashstubs.o \ hexdecode.o hwparam.o labaud.o ltexit.o ltpassthru.o romload.o \ srecreader.o tpinterf.o ${EXTRA_OBJ} LIBSERIAL= ../libserial/libserial.a all: ${PROGS} fc-compalram: ${COMPALRAM_OBJS} ${LIBSERIAL} ${CC} ${CFLAGS} -o $@ ${COMPALRAM_OBJS} ${LIBSERIAL} fc-iram: ${IRAM_OBJS} ${LIBSERIAL} ${CC} ${CFLAGS} -o $@ ${IRAM_OBJS} ${LIBSERIAL} fc-loadtool: ${LOADTOOL_OBJS} ${LIBSERIAL} ${CC} ${CFLAGS} -o $@ ${LOADTOOL_OBJS} ${LIBSERIAL} fc-xram: ${XRAM_OBJS} ${LIBSERIAL} ${CC} ${CFLAGS} -o $@ ${XRAM_OBJS} ${LIBSERIAL} fc-buzplay: ${BUZPLAY_OBJS} ${LIBSERIAL} ${CC} ${CFLAGS} -o $@ ${BUZPLAY_OBJS} ${LIBSERIAL} install: mkdir -p ${INSTBIN} install -c ${PROGS} ${INSTBIN} mkdir -p ${INSTCONF} install -c -m 644 scripts/* ${INSTCONF} mkdir -p ${INSTHELP} install -c -m 644 loadtool.help ${INSTHELP} clean: rm -f *.o *.out *errs ${PROGS}