Commit Graph

28 Commits

Author SHA1 Message Date
Pol Henarejos
9777219ebb The other core needs to be paused. This is funny because it is not documented in anywhere. Lots of hours spent on this.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-19 00:55:45 +01:00
Pol Henarejos
189c095f1f Flash procedures shall be called from core 0.
We created an exclusive mechanism to share cached pages to write onto flash.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-18 00:17:43 +01:00
Pol Henarejos
702b8ee4ff Added neug task to main loop.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-14 23:44:23 +01:00
Pol Henarejos
1156734721 Rewritte random procedures in neug. Random bytes are obtained by using ROSC and FNV.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-14 23:43:20 +01:00
Pol Henarejos
9eaf877fe2 Playing with RNG. It seems to work. Needs further testing
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-10 18:08:32 +01:00
Pol Henarejos
f37a571ba3 Adding adc to cmake
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-10 18:08:07 +01:00
Pol Henarejos
240dc07fa5 Reducing debug level.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 23:52:46 +01:00
Pol Henarejos
eab3e5b73d The first time, the flash memory is full of garbage. It needs to be marked as empty.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 23:52:35 +01:00
Pol Henarejos
7c0321f4f3 Changing vid/pid to gnuk.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 22:36:46 +01:00
Pol Henarejos
f6a71c0689 Lots of fixes. At this moment flow between host-device works smoothly. opensc-tool -an needs further debug.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 22:36:26 +01:00
Pol Henarejos
3dd282ca0a Adding neug (NOT WORKING)
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 22:35:52 +01:00
Pol Henarejos
bc7990b89a Improving readability of debug payload
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 22:35:17 +01:00
Pol Henarejos
fd93f4779e Adding openpgp support.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 02:03:12 +01:00
Pol Henarejos
0af5685495 Adding the rest of files:
- ASM is disabled
- Neug needs full rewrite
- Flash is based on PiMoroni 4MB flash (needs adjust)

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-03 02:02:39 +01:00
Pol Henarejos
0445f587f7 Lots of fixes. At this time, the RP2040 is detected by opensc-tool -l. However, it sends continuously slot status.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-02 21:37:55 +01:00
Pol Henarejos
f7419c4b2f Adding routine for payload debug
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-02 20:28:22 +01:00
Pol Henarejos
9229b4b3d3 itf passed to vendord_open is larger than tusb_desc_interface.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-01-02 19:30:08 +01:00
Pol Henarejos
b217740e58 - Adding the rest of Gnuk USB/CCID methods.
- It runs the openpgp thread in the other core (core1) and leaves the main program/ccid/usb methods running in the core 0.
- At this moment it does not call openpgp_thread.
- Compiles but it needs further debug
2022-01-02 00:51:54 +01:00
Pol Henarejos
3169139d3d Adding a hack to prepare vendor open 2022-01-01 13:12:50 +01:00
Pol Henarejos
b69232dd55 Adding notify_slot_change 2022-01-01 13:10:58 +01:00
Pol Henarejos
366d59cbfa Starting to port GnuK 2022-01-01 12:57:53 +01:00
Pol Henarejos
0dfd5d29f3 Using vendor driver as background layout. However, it does not work since vendor_open() checks that the interface class equals to vendor_class. It must be bypassed somehow.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-31 03:49:29 +01:00
Pol Henarejos
0be9352f0d - Adding BOS
- VID/PID must be known by the host in order to load the CCID driver. If others are used, it may not work.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-31 03:47:51 +01:00
Pol Henarejos
0e67eaf659 Adding CCID driver
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-31 02:17:09 +01:00
Pol Henarejos
c8a2912616 Moving to TinyUSB. Low level API does not provide methods for larger packets. TinyUSB provides a complete interface for managing CCID.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-30 23:35:30 +01:00
Pol Henarejos
06e014531b Adding ccid structs
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-30 23:34:31 +01:00
Pol Henarejos
7785c8ff1c First commit. Attempting to emulate a CCID device. Not easy with RP2040
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2021-12-30 00:31:01 +01:00
Pol Henarejos
a2939d610c initial commit 2021-12-30 00:29:52 +01:00