Commit Graph

1088 Commits

Author SHA1 Message Date
Jared Boone
a98ada0cb7 Extract FrequencyStepView from FrequencyOptionsView.
...for use in capture app.
2016-07-19 10:47:15 -07:00
Jared Boone
77291b4e31 On PortaPack shutdown, init HackRF CPLD to EEPROM bitstream. 2016-07-18 11:32:14 -07:00
Jared Boone
4b7fa9f411 CPLD: Add XC2C64A method to init from EEPROM contents. 2016-07-18 11:31:21 -07:00
Jared Boone
c0b9761fe5 Move CPLD management into PortaPack::init(). 2016-07-18 11:30:45 -07:00
Jared Boone
5390c45e04 Fix Python 2 vs 3 breakage relating to hex().
In Python 2, hex() of large ints has a "L" on the end.
2016-07-17 16:16:13 -07:00
Jared Boone
3f3fe3bb67 JTAG: Report if HackRF CPLD bitstream matches released version.
TODO: Could be better reporting (CRC?), and could not pause while checking CPLD EEPROM, and could offer a means to program the bitstream if it doesn't match...
2016-07-17 15:56:24 -07:00
Jared Boone
204408d288 JTAG: Load HackRF CPLD bitstream into SRAM from firmware image.
No further concerns about the HackRF CPLD having an ancient bitstream on it! At least in PortaPack mode...
2016-07-17 15:54:02 -07:00
Jared Boone
c8b1a8fbf6 JTAG: Add functions to check EEPROM, load SRAM of HackRF CPLD. 2016-07-17 15:52:58 -07:00
Jared Boone
1d58f05163 JTAG: Auto-generate HackRF CPLD data from SVF. 2016-07-17 15:50:36 -07:00
Jared Boone
cd3a91b3af JTAG: HackRF CPLD SVF file for embedding in firmware. 2016-07-17 15:48:02 -07:00
Jared Boone
51c114405b JTAG: Tool that generates C++ files from XC2C64A SVF data. 2016-07-17 15:46:12 -07:00
Jared Boone
4cc356f325 JTAG: Code to manage HackRF CPLD interactions. 2016-07-17 15:45:00 -07:00
Jared Boone
71c7f543c5 JTAG: Add TAP state management.
Not all that happy with the implementation, but it's doing the job for now.
2016-07-17 15:44:30 -07:00
Jared Boone
c0f4fbe32d JTAG: Add GPIO definitions for HackRF CPLD. 2016-07-16 14:06:58 -07:00
Jared Boone
22143c9543 JTAG: Remove unused methods. 2016-07-13 11:02:13 -07:00
Jared Boone
18fe30136e JTAG: Move Target interface to separate header. 2016-07-11 09:39:02 -07:00
Jared Boone
6917ffe1e3 JTAG: Clean up definition of Target interface. 2016-07-11 09:16:47 -07:00
Jared Boone
ad4a68f90a CMake: Generate portapack_cpld_data.cpp from SVF via tool. 2016-07-05 12:45:31 -07:00
Jared Boone
7bcde54050 Tool for generating CPLD bitstreams in C++ arrays, from SVF file. 2016-07-05 12:33:15 -07:00
Jared Boone
740edc4d49 Remove PortaPack CPLD checksum display.
No point in calculating or showing, since full compare against desired bits is done at every startup -- way better than a CRC, and if it fails tries to program. If programming fails, the PortaPack panics and LED flashes.
2016-07-05 12:08:56 -07:00
Jared Boone
3ed1d9e24a CPLD: Method to calculate bitstream CRC32. 2016-07-05 12:06:51 -07:00
Jared Boone
df825807d6 CRC: Rearrange public methods to reduce user error.
If you can access process_bits() without considering RevIn value, you will likely not get the CRC value you're expecting! Put RevIn check where it belongs, in process_bits().
2016-07-05 11:57:57 -07:00
Jared Boone
42190b9587 CMake: Fix ldscript dependencies. 2016-07-03 18:48:39 -07:00
Jared Boone
0899c48735 Remove linker map generation, other unnecessary(?) flags. 2016-07-03 18:33:36 -07:00
Jared Boone
b6fe392512 CMake: Improve dependencies, how output files are managed/cleaned.
I almost think I understand CMake, now. Almost.
2016-07-03 18:32:50 -07:00
Jared Boone
45ca3cf7e6 CMake: reduce intermediate targets, add script dependencies. 2016-07-03 11:32:21 -07:00
Jared Boone
53434f3789 Fix Python2 string type error. 2016-07-02 18:15:39 -07:00
Jared Boone
c52f5fa26c Expose static EventDispatcher to stop main loop.
Used to fix reboot into HackRF firmware.
2016-07-02 16:38:01 -07:00
Jared Boone
57293bc5eb Clear application message queue after baseband is shut down. 2016-07-02 16:19:41 -07:00
Jared Boone
30efa53956 Clear M4->M0 interrupt before M4 image is loaded.
...out of an abundance of caution.
2016-07-02 16:15:43 -07:00
Jared Boone
34e45412d1 Dumb baseband-running state tracking to ease use of baseband API. 2016-07-02 16:12:36 -07:00
Jared Boone
b2d5e47308 Clear baseband message at end of shutdown().
Allow baseband to shut down completely before shutdown message is acknowledged.
2016-07-02 16:02:50 -07:00
Jared Boone
dbd0c17c2f Clear baseband message for non-shutdown messages. 2016-07-02 16:02:03 -07:00
Jared Boone
eac4cf678a Capture M4 chDbgPanic msg, show in application. 2016-07-02 15:33:03 -07:00
Jared Boone
97ba19af24 Change M4 loader to use image tags.
Also finish moving HackRF binary to tagged image region.
2016-07-01 10:37:22 -07:00
Jared Boone
0e62876578 Add types for tagged data chunks in SPI flash. 2016-07-01 10:32:52 -07:00
Jared Boone
f683980052 Generate and append terminator chunk to basebands image. 2016-06-30 19:37:32 -07:00
Jared Boone
c3d81f1496 Add HackRF factory firmware to basebands image. 2016-06-30 19:37:05 -07:00
Jared Boone
61f954dbeb Tweak make_image_chunk to produce empty chunk when argc == 2. 2016-06-30 19:36:23 -07:00
Jared Boone
184eb9eb0d Utility to strip HackRF firmware DFU header. 2016-06-30 19:35:51 -07:00
Jared Boone
01833ccb83 Write all baseband binaries into tagged image file. 2016-06-30 16:45:41 -07:00
Jared Boone
f4c897946b Add top-level CMake file. 2016-06-30 15:59:36 -07:00
Jared Boone
97760a2f9d Remove GNU Make files, now using CMake to build firmware. 2016-06-30 12:04:10 -07:00
Jared Boone
cf5ac441ae Add CMake firmware build system. 2016-06-30 12:02:43 -07:00
Jared Boone
500a651bcf Give Processors a run() function.
So main() can call it, start a Processor linked in to the baseband binary.
2016-06-30 11:53:58 -07:00
Jared Boone
1a5f3a4422 Give new Processor to EventDispatcher. 2016-06-25 11:14:28 -07:00
Jared Boone
525e72ac86 Move Baseband/RSSI threads into Processors. 2016-06-25 11:12:22 -07:00
Jared Boone
74c8429f75 Take processor as argument to BasebandThread.
Remove lots of dependency on specific processors.
Reduce state by removing processor switching from BasebandThread.
2016-06-25 10:57:16 -07:00
Jared Boone
bb32ef5321 Bracket BasebandThread loop with enable/disable code. 2016-06-25 10:53:16 -07:00
Jared Boone
9188bb9ee9 Remove thread pointer checking. 2016-06-24 15:46:53 -07:00
Jared Boone
f8a473d56b Change baseband, RSSI threads to be more RAII. 2016-06-24 15:34:49 -07:00
Jared Boone
2b7e763619 Don't check EventDispatcher::thread_event_loop before using.
If static methods are getting called, variable is already set.
2016-06-24 15:27:23 -07:00
Jared Boone
9444d21c12 Remove baseband stats tracking code.
It was half-baked, and is getting in the way of a major refactoring.
2016-06-24 15:24:26 -07:00
Jared Boone
d41c6ee36a Simplify app->baseband message handling.
No need for a FIFO when all messages are intended to be synchronous.
2016-06-24 14:16:45 -07:00
Jared Boone
61325e4696 Enable M4 interrupt from M0 only when expected. 2016-06-24 13:44:40 -07:00
Jared Boone
e263420ea3 Enable M4 interrupt on M0 core only when M4 image is running. 2016-06-24 11:32:24 -07:00
Jared Boone
c7497577a0 Make all app->baseband messages synchronous.
No idea why they shouldn't be...
2016-06-24 11:31:41 -07:00
Jared Boone
303bfeaafc Run baseband image per application.
First step toward having separate baseband images per app or function.
2016-06-24 11:30:54 -07:00
Jared Boone
ac0bdc35a6 Set TPMS app initial focus. 2016-06-23 22:11:47 -07:00
Jared Boone
fead46cc46 Fix state management in Capture mode.
Don't alter ReceiverModel modulation/mode when capturing.
2016-06-23 12:03:47 -07:00
Jared Boone
1010e6a234 Remove unused DMA Handler types. 2016-06-22 11:22:28 -07:00
Jared Boone
3cdce88e5d TPMS: Allow band selection: 315 or 433.92 (~434) MHz. 2016-06-21 15:36:57 -07:00
Jared Boone
b34512e3d6 Eliminate a buffer_t copy/duplication. 2016-06-21 15:23:51 -07:00
Jared Boone
003ce4990d Move CaptureThread::static_fn into .cpp. 2016-06-21 12:15:57 -07:00
Jared Boone
264c19b312 Rename CaptureThread message, callback method, handle success. 2016-06-21 12:05:55 -07:00
Jared Boone
81d4e59aeb Add CaptureThread success_callback. 2016-06-21 11:53:07 -07:00
Jared Boone
4ffb05212e Pass error_callback by value. 2016-06-21 11:52:05 -07:00
Jared Boone
0e33d7e5d0 Refresh UIRecordVide status display when appropriate. 2016-06-21 11:35:41 -07:00
Jared Boone
44fb66b4f9 Rename UIRecordView::on_tick_second() -> update_status_display(). 2016-06-21 11:35:15 -07:00
Jared Boone
19e5e111a9 Move UIRecordView::set_sampling_rate to .cpp. 2016-06-21 11:33:23 -07:00
Jared Boone
59aa99c8ff Whoops, use events_flag(), not events_flag_isr(). 2016-06-21 11:19:22 -07:00
Jared Boone
320d979924 Simplify CaptureThread error callback functions. 2016-06-21 11:13:58 -07:00
Jared Boone
cfaa44b02a Send CaptureThread error into app-local message queue. 2016-06-21 11:04:10 -07:00
Jared Boone
76c5fe96af Use app-local queue for messages coming from application.
Messages are now deferred until application thread call stack unwinds, events are checked.
2016-06-21 11:00:42 -07:00
Jared Boone
dbe735233a Add app-local MessageQueue. 2016-06-21 10:57:44 -07:00
Jared Boone
7023616808 Move MessageQueue locations in SharedMemory structure. 2016-06-21 10:56:00 -07:00
Jared Boone
9f95eb90a3 Shrink baseband queue size, 2^12 -> 2^11. 2016-06-21 10:55:24 -07:00
Jared Boone
c990963298 Expose filesystem_error code. 2016-06-21 10:54:13 -07:00
Jared Boone
420adea180 Move capture start/stop into baseband API.
Hide more calls to baseband/shared memory.
2016-06-20 10:52:59 -07:00
Jared Boone
6bd191349a Hide MessageHandlerMap.
Definitely didn't belong in message.hpp, saw no reason to expose it outside translation unit (.cpp file).
2016-06-19 22:56:06 -07:00
Jared Boone
f731366248 Hide some M0 EventDispatcher event masks. 2016-06-19 11:41:38 -07:00
Jared Boone
dbc2a5c9ea Hide CaptureThread event mask, only used internally. 2016-06-19 11:20:45 -07:00
Jared Boone
0da48b099c Add RF amp field to TPMS, capture modes. 2016-06-06 10:34:39 -07:00
Jared Boone
9190fe7e4f Move common code to LNA/VGA field widgets. 2016-06-06 10:27:33 -07:00
Jared Boone
5ee035fbb3 Move RF amp control code into new class. 2016-06-06 10:13:36 -07:00
Jared Boone
a0e7fdf90b TPMS: Add gain controls. 2016-06-06 09:50:48 -07:00
Jared Boone
a475daeeea TPMS: Validate checksum for OOK 8k192 Schrader. 2016-06-02 23:09:55 -07:00
Jared Boone
9628815da7 TPMS: Validate checksum for the OOK 8k4 Schrader variant. 2016-06-02 22:22:22 -07:00
Jared Boone
4734790518 Rework phase detector.
Simplify calculation of gate masks.
Use entire symbol period to compute symbol value.
Correct error sign based on symbol value.
2016-06-01 15:22:21 -07:00
Jared Boone
36eefa46e7 Improve OOK phase advance algorithm.
Now independent of samples/symbol, adjusts up to 1/8 of a cycle per symbol.
2016-06-01 15:20:23 -07:00
Jared Boone
57767004a2 TPMS: Comments, more descriptive declarations. 2016-05-30 11:28:22 -07:00
Jared Boone
a52d0fbd81 Rename format_manchester/ManchesterFormatted to "[sS]ymbols". 2016-05-30 11:24:59 -07:00
Jared Boone
3d22222689 Extract DecodedSymbol from ManchesterDecoder. 2016-05-30 11:23:13 -07:00
Jared Boone
05b55f2696 TPMS: Extract packet readers. 2016-05-27 13:41:56 -07:00
Jared Boone
e7aaf0e8cf Format TPMS signal type details in log file. 2016-05-25 18:03:43 -07:00
Jared Boone
04c472e802 Push SignalType inside tpms::Packet. 2016-05-25 17:58:32 -07:00
Jared Boone
83e4aec49c Hack to paint over last options view when none should be visible. 2016-05-25 11:39:03 -07:00
Jared Boone
6a294e7d0e Shameful hack to hide RecordView when sampling_rate == 0.
Switch visibility of child widgets -- UI fields/controls vs. a black rectangle. TODO: Fix painting and state management, which right now is just terrible.
2016-05-25 11:33:23 -07:00
Jared Boone
ff57b3c8cb Add Color-only constructor to ui::Rectangle widget. 2016-05-25 11:32:06 -07:00
Jared Boone
38b374506e More TPMS variable/enum renaming. 2016-05-23 18:02:25 -07:00