Commit Graph

414 Commits

Author SHA1 Message Date
Eric Betts 2b6913aae3 Merge branch 'main' into feat-improve-sec1210 2026-03-07 12:47:19 -08:00
Eric Betts 810f143242 ufbt format 2026-03-07 12:47:04 -08:00
CinderSocket 5789b21ca0 refactor(ccid,t1): introduce typed protocol state and named constants 2026-03-07 12:44:23 -08:00
CinderSocket 2d11e90d77 Format SAM and read-path updates 2026-03-07 00:31:31 -08:00
CinderSocket 4ffc656a23 Improve SAM read state handling and failure recovery 2026-03-07 00:27:56 -08:00
CinderSocket 29861150a2 Fix SAM read session state handling 2026-03-07 00:07:38 -08:00
CinderSocket 0c8e6c6f82 Add trace logging 2026-03-07 00:02:01 -08:00
CinderSocket 27a61555b1 refactor(ccid,t1): introduce typed protocol state and named constants 2026-03-06 23:03:57 -08:00
Eric Betts 9a00e1e515 Remove seader_uart_set_baudrate
FAP: Build and lint / ufbt: Build for release branch (push) Failing after 0s
2026-03-03 21:34:56 -08:00
Eric Betts 8e9d8f968f Clean up unused counters 2026-03-03 21:30:07 -08:00
Eric Betts 5c26fde1fa Clean up application.fam by cheating
FAP: Build and lint / ufbt: Build for release branch (push) Failing after 0s
2026-03-03 19:00:21 -08:00
Eric Betts 2b97c253fa replace uintptr_t 2026-03-03 18:50:23 -08:00
Eric Betts cd08e7d31b Merge pull request #29 from cindersocket/feat-memory-optimization-followup
feature: memory-optimization follow-up.
2026-03-03 18:49:44 -08:00
CinderSocket 7e25fe7787 Revert "chore: narrow PR to ASN.1 skeleton introduction"
This reverts commit ef630e74de.
2026-03-03 18:20:14 -08:00
Eric Betts ddc56fe133 convert seader_process_success_response_i to use stack ref #29 2026-03-03 18:16:14 -08:00
Eric Betts 0d4cb54545 seader_worker_card_detect asn on the stack ref #29 2026-03-03 18:08:57 -08:00
Eric Betts ec8e3fb113 seader_ccid_XfrBlockToSlot updates ref #29 2026-03-03 18:02:26 -08:00
Eric Betts ffb26c3f1c seader_send_t1_scratchpad ref #29 2026-03-03 17:50:50 -08:00
Eric Betts 8a35bb2253 Add MAX_FRAME_HEADERS ref #29 2026-03-03 17:23:54 -08:00
Eric Betts c7e2bea0f2 update calloc ref #29 2026-03-03 17:23:05 -08:00
Eric Betts 7dddfb5a32 fix build ref #29 2026-03-03 17:19:38 -08:00
Eric Betts e3035b3659 Increase uart buffer ref #29 2026-03-03 17:16:02 -08:00
Eric Betts 835d0b991f Merge pull request #28 from cindersocket/feat-memory-optimization
FAP: Build and lint / ufbt: Build for release branch (push) Failing after 0s
Feat: memory optimization
2026-03-03 13:21:33 -08:00
CinderSocket ef630e74de chore: narrow PR to ASN.1 skeleton introduction 2026-03-03 13:07:29 -08:00
CinderSocket eefd0e52c6 style: apply ufbt formatting fixes 2026-03-03 12:54:29 -08:00
CinderSocket 836f91fad7 fix: enhance scratchpad safety and optimize memory handling
- Strengthened scratchpad bounds validation and ensured pointer range checks.
- Improved memory management with fallback allocation and robust cleanup.
- Adjusted SEADER_UART_RX_BUF_SIZE to 300 for better headroom.
- Added safeguards against frame/header underflows in scratchpad handling.
- Ensured proper alignment for UART worker and zero-copy transmission paths.
2026-03-03 12:44:41 -08:00
CinderSocket 132dc1860a feat: optimize ASN.1 memory usage and implement zero-copy transmission
- Strip unused XER, PER, and OER codec support via persistent skeleton gating.
- Refactor high-frequency ASN.1 logic to use stack allocation.
- Implement zero-copy transmission path using 32-byte header offset in UART TX buffer.
- Correct CCID header initialization and DER encoding buffer size calculation.
- Add ASN_DISABLE_* macros to application.fam for consistent gating across builds.
2026-03-03 12:44:41 -08:00
CinderSocket 0a9bdf9f5e refactor: optimize ASN.1 usage to reduce memory overhead and heap churn 🚀
* Faster Memory Handling: Moved most ASN.1 objects from heap allocation to stack allocation. This reduces allocator pressure and fragmentation. 📉
* Smarter Cleanup: Updated cleanup to use a targeted path. Internal data is cleared only where needed, reducing overhead. 🧹
* Cleaner Initialization: Switched to C99-style initializers ({0}) for idiomatic zero-init before encoder use.

Refs: https://github.com/cindersocket/seader/issues/2
2026-03-03 12:44:41 -08:00
CinderSocket 3998719a1e chore: optimize ASN.1 footprint and fix sam_api calloc bug 📉
The app was definitely carrying some extra weight that we didn't need.

* Stripped the Bloat: I fully gated out the OER, PER, and XER support libraries. Even though some generation flags were there, the actual library code was still being linked. I also removed the random_fill logic since we aren't using it.
* Big Wins: The binary is now 7 KB smaller 📉. I verified this by checking the symbol table—all those extra codec functions are officially gone.
* Bug Fix: I found a pretty serious issue in sam_api.c where the local calloc was just a wrapper for malloc and wasn't actually zeroing out memory. I added a memset fix so we don't run into any weird non-deterministic crashes. 🛠️
* Stack Optimization: Since the ASN.1 path is much leaner now, I was able to safely drop the stack size in application.fam from 5 KB to 3 KB.

Refs: https://github.com/cindersocket/seader/issues/2
2026-03-03 12:44:41 -08:00
Eric Betts 8d7e1edd62 fix build
FAP: Build and lint / ufbt: Build for release branch (push) Failing after 0s
2026-03-02 08:48:38 -08:00
Eric Betts 7ae926abe9 Regenerate asn1 c files
FAP: Build and lint / ufbt: Build for release branch (push) Failing after 0s
2026-03-02 08:26:13 -08:00
Eric Betts 4f67250871 Merge pull request #27 from cindersocket/cindersocket-uhf-schema
Update seader.asn1
2026-03-02 08:25:28 -08:00
CinderSocket b70568d34a Update seader.asn1
Add reverse engineered U90 packet details
2026-03-01 22:05:30 -08:00
Eric Betts b5636c2e8f typo
FAP: Build and lint / ufbt: Build for release branch (push) Failing after 2m34s
2026-02-26 17:50:18 -08:00
Eric Betts 1cdfb8d92e link to SAMadams 2026-02-26 17:49:09 -08:00
Eric Betts 57064e1506 Bump to v4.0 2026-01-16 19:13:49 -08:00
Eric Betts b09007364b better ifsc/ifsd handling 2026-01-15 20:35:33 -08:00
Eric Betts 1dae66fd7a longer version decoding 2026-01-15 20:33:42 -08:00
Eric Betts ba27cbb0e2 extended boolean for apdu generation 2026-01-15 20:33:42 -08:00
Eric Betts 9e26ebc0db ccid power off and make power on use auto 2026-01-15 20:33:42 -08:00
Eric Betts 87001f4ab6 improve ccid error details 2026-01-15 20:33:42 -08:00
Eric Betts e789006493 Add new ATR 2026-01-15 12:53:26 -08:00
Eric Betts 6f6432e86e Remove ebay and rfideas for buying sam 2026-01-05 14:17:17 -08:00
Eric Betts b541f52b76 Change definition to implicit 2026-01-04 11:19:15 -08:00
Eric Betts 06f3274c40 SE vs SR in UI 2025-11-07 18:13:51 -08:00
Eric Betts 1c428e46d8 better method name 2025-11-07 08:19:40 -08:00
Eric Betts 3bc108e766 Remove Archodex Agent 2025-11-04 16:49:40 -08:00
Eric Betts b0d4a87042 Add Archodex Agent 2025-11-04 16:47:04 -08:00
Eric Betts 7a2165c603 Define for baud rate 2025-10-18 17:24:54 -07:00
Eric Betts f6182bd51d add git submodules to make and readme 2025-10-01 19:46:26 -07:00