Commit Graph

41 Commits

Author SHA1 Message Date
Harald Welte 912b183b29 qmod: Use different Interface Strings for Modem1+2 / Modem 3+4
This makes it obvious in 'lsusb' and to other software on the USB host
which interface is for which of the modems.
2017-03-06 09:28:13 +01:00
Harald Welte 2363fa0327 Generate USB Strings from apps/*/usb_strings.txt files at compile time
This way we can skip the manually-crafted USB string definitions in the
dfu_desc.c and usb.c files.
2017-03-05 10:16:25 +01:00
Harald Welte adbe72a5ba Makefile: Define APPLICATION_foo BOARD_bar and ENVIRONMENT_baz #defines
This can help us with conditional code
2017-03-02 23:16:01 +01:00
Harald Welte edf9c9d322 Makefile: Optimize for size
This gets the dfu image down from 19 to 11 kBytes, with is well within
the 16kbyte limit for the DFU partition.
2017-02-27 23:24:22 +01:00
Harald Welte 37b6e41f84 move last few files from src_board / include_board 2017-02-27 23:20:38 +01:00
Harald Welte d09829dcc6 Remove newlib dependency, include own stdio/string/assert 2017-02-27 23:00:26 +01:00
Harald Welte d8a003dfd7 Structure build system to build for multiple boards/apps/environments 2017-02-27 22:18:45 +01:00
Harald Welte 3f5e3ddffc Change directory structure to align with Atmel softpack
This way we can easily check with 'diff' for differences in our code and
Atmel softpack.  Also, this layout is more suitable for building various
different firmware images (e.g. factory-test, dfu-loader, main
application) for a variety of different boards (simtrace, owhw, qmod).
2017-02-27 14:24:11 +01:00
Harald Welte 7ed6f3bc37 WIP: Introduce USB DFU code from my at91lib DFU port 2017-02-27 09:28:34 +01:00
Harald Welte aa3b867abb WIP: split main from board-speciic parts 2017-02-26 15:59:56 +01:00
Harald Welte a05ccc9103 build efc.o and flashd.o as part of build process 2017-02-26 15:51:10 +01:00
Harald Welte 6732248f71 Add support for board version reading via ADC 2017-02-10 19:19:48 +01:00
Harald Welte 987f59aa02 Import libosmocore timer infrastructure and use it for PERST
The PERST is thus no longer busy-waiting but starting a timer to release
the PERST after 1ms.
2017-02-04 14:58:45 +01:00
Harald Welte b41598b602 Introudce an include_libosmocore directory and move (updated) linuxlist there 2017-02-04 12:15:58 +01:00
Harald Welte 31f817c3ac Add support for controlling PERST of WWAN modems (on qmod) 2017-02-03 22:22:20 +01:00
Harald Welte 2819e9c131 wwan_led: Read + report status changes of WWAN LED inputs 2017-02-03 07:49:28 +01:00
Harald Welte 226b40aba4 WIP: bit-banging I2C support for EEPROM access on QMOD
for now, it just continuously reads the EEPROM bytes and dumps them to
the serial console for testing.
2016-08-21 19:33:24 +02:00
Harald Welte a02b641650 Add support for 'qmod' (quad-modem) board
You can compile the firmware for this new target using 'make
BOARD=qmod'.

The QMOD differs from simtrace+owhw in terms of low-level
initialization, as it has an external 12MHz clock at XIN, thus bypasses
the main oscillator and needs different PLL configuration.
2016-08-21 18:32:12 +02:00
Harald Welte 8ee15dbc2a read SAM3S unique serial number at start and print it 2016-03-20 16:00:39 +01:00
Harald Welte 2315e6ba07 ensure git version ends up in firmware image 2016-03-19 21:37:55 +01:00
Harald Welte 7abdb51f8f ringbuffer: Make ring buffer access irq-save
We have to temporarily disable nterrupts when performing rinbuffer
operations, as the ring buffer is used both from IRQ as well as process
context.
2016-03-16 22:22:54 +01:00
Harald Welte f672e9d63a req_ctx: Convert from hand-coded linked lists to linuxlist.h
This also removes the actual queuing code from req_ctx, and
leaves this to the caller.  Only tw out of the existing states actually
required the ordering requirement enforced by the qeue, and in the
future we will need to have per-endpoint queues anyway.  Both means it
is better to manage queues outside the req_ctx, and leve that as a pure
memory allocator.
2016-02-29 14:10:22 +01:00
Harald Welte ba0c688103 owhw: Make owhw/board.h the default for now
I will re-introduce simtrace2 hardware support later
2016-02-28 19:32:36 +01:00
Harald Welte 2a6d3afd6c re-introduce req_ctx buffers into the host communication 2016-02-28 19:29:14 +01:00
Harald Welte 54a7cec7bd Add card_emu_target.c to bind card_emu.c code into target firmware 2016-02-27 16:23:14 +01:00
Harald Welte 2d3371ed65 split board.h into generic part and simtrace-specific part 2015-11-30 11:59:03 +01:00
Harald Welte 9d3e38242c initial commit of more code towards card emulation
I couldn't help but to spend my sunday on working towards card
emulation, including
* various state machines in the target about ISO7816 states
* tc_etu timer import from simtrace1
* req_ctx import from simtrace1 (needs renaming and simplifiation)
* USB protocol description as cardemu_prot.h
* some host-based testing code to test the state machines

The code seems to work fine throughout card reset, sending ATR and
receiving the TPDU header of the first APDU, up to the point where it
marks the TPDU header as to-be-transmitted over th bulk-in endpoint.

Sending the ATR must be done inside the firmware for timing
requirements.

From that point onwards, the host needs to respond at the very least
with a procedure byte, and some indication whether or not the card
emulator should continue to transmit data (card->reader), or receive
data (reader->card).

The code is intentionally not hooked up yet with the USB logic nor with
the UART.  I want host-based testing completed before doing that.
2015-11-09 00:50:54 +01:00
Harald Welte 30a53f823a Move Fi/Di calculation functions to separate C file 2015-11-08 14:29:55 +01:00
Christina Quast 2c68f9c825 Makefile: Removed unused object file target tc_etu 2015-05-08 15:37:57 +02:00
Christina Quast 6246000b3a iso7816_uart.c: Do not compile 2015-05-03 14:18:59 +02:00
Christina Quast be235275fa Added not working PTS parsing to host communication 2015-05-02 17:56:32 +02:00
Christina Quast c63da3f6d5 Makefile: Check for already opened ttyUSBx
If two ttyUSBx interfaces are read from by ts at the same time,
some letters arrive at one terminal and others in the second one.
Therefore only one terminal should be open at all times.
2015-04-13 22:09:50 +02:00
Christina Quast 2b8a18bf3a Sniffer with ringbuf, works SOMETIMES
* Sniffer uses phone endpoints for communication and the ringbuffer
    routines the phone communication uses
* Most times the Usart1 interrupt is not triggered, and therefore
    no values are recorded
2015-04-12 09:31:36 +02:00
Christina Quast 5c6a299c71 phone.c: Sniffer bus config make switch 2015-04-11 20:03:14 +02:00
Christina Quast 4db82e092f ringbuffer implementation 2015-04-11 18:15:27 +02:00
Christina Quast e2dddd5885 Renamed simtrace_src to src_simtrace 2015-04-09 17:40:48 +02:00
Christina Quast 55cd8734be Makefile: 'make log' for debug dumps over serial 2015-04-08 00:12:17 +02:00
Christina Quast 4396fee97e Rename simtrace/ to simtrace_src 2015-04-07 21:12:53 +02:00
Christina Quast b6f77d390c Makefile: Compile silently and show code files used 2015-04-07 20:51:44 +02:00
Christina Quast 29c99b97af Makefile: Enabled iprintf, removed comment 2015-04-07 20:13:44 +02:00
Christina Quast 5a67c0fef3 Renamed main folder to firmware 2015-04-07 18:24:06 +02:00