Without that the user was expected to either patch
the Makefiles or to get a toolchain with the arm-elf-
prefix.
Change-Id: I0c362cde7afd6de025e8fe2c1e9abe3d3a1e04a6
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Retrive previous PC from the stack before entering specific interrupt
handler routines. Allow user to trace where interrupt occured: e.g.
WatchDog and Spurious interrupt
Prior to this change, spurious interrupt would occur so much (observed
via gdb/remote debug) so it appears that the board stalled. Once a
custom spurious interrupt installed, the code continues after the
interrupt instead of re-entering the interrupt.
The codnition for flushing a req_ctx on UART idle is fixed to flush only
if
1) There has been no new data since last check, and
2) There are no req_ctx currently pending to be transmitted to USB, and
3) We did NOT just got a reset and waiting for ATR
I saw an ATR split in two different req_ctx prior, presumably flush
decided to send req_ctx after ATR but got a new character just before
sent). If we did get a RESET, let original logic decide to send the
req_ctx -- presumably when ATR data is fully received.
When any of the following events occur:
* VCC_PHONE off
* nRST
* RST
we tranmsit the current req_ctx, if there is data pending.
This ensures that for any successive data, the ATR flag in the next
req_ctx containing the data, not in the previous req_ctx. It also
ensures that the ATR is aligned at 0 offset in the new req_ctx, which is
an assumption the host software makes but the previous code didn't
ensure.
Furthermore, we introduce a periodic flushing of any pending but
incomplete req_ctx.
The old implementation has a big local_irq_save() / restore() around the
endpoint re-fill routine. This disables interrupts for a long time,
psossibly causing lost interrupts.
The new implementation works around this by disabling the USB (UDP)
interrupt only, rather than disabling all interrupts on the system.
These symbols are not referenced on an arm-elf gcc 4.7, they are
used when building with an arm-eabi gcc 4.7 and then cause linking
issues. The linking to libgcc can not be omitted as the irq code is
using ffs. Remove the EABI symbols. The alternative would be to
declare the EABI as weak inside the lib1funcs.
Link error:
multiple definition of `__udivsi3'
multiple definition of `__aeabi_uidiv'
Exported symbols:
nm lib/lib1funcs.o
00000000 t Ldiv0
00000010 T __div0
there is now a high-level command by which we can swithc the VCC
supply of the SIM cards.
For some reason, the _PASS variant (passing through the voltage from the
phone) doesn't seem to work reliably. It might be that we are draining
reverse current throught the LDO once we supply SIM power that way.
Add missing entry in Fi_table. It's apparently used as '64' in some
reader and 'unsupported' in some other. For simtrace I guess we should
consider it 64.
The FPF2005 has no reverse voltage blocker, this is why the 3.3V from
the LDO flows back into VCC_PHONE. It even damages the chip (so says the
datasheet) I corrected the double power source problem by disabling the
LDO (see patch), but still 1.8V does not work and 3.0-3.3V is used. I
have to look for other reasons.
Only send the ZLP if we send less data than was required/asked for
by the host and it is a multiple of the bMaxPacketSize0 (which is
hardcoded to 8 right now).
This is completing the change done in fe88b83e80 to
fix SIMtrace attached to OSX and not regress on windows.
Introduce another parameter to udp_ep0_send_data to specify the window
size (wLength) or if not available the default from USB 2.0 specification.
In case ram_app_entry() returns do not reset i to 32, otherwise we
will never reset the watchdog.
src/dfu/dfu.c:1077:7: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
src/dfu/dfu.c:1068:6: warning: shadowed declaration is here [-Wshadow]