Mon, 11 Mar 2024 15:35:36 +0100
Add links to sr.ht repos and add an image in the README file
59 | 1 | # Replacement front panel for the HP/Agilent 34970A - firmware |
2 | ||
71
d193c24a078a
Add links to sr.ht repos and add an image in the README file
David Douard <david.douard@sdf3.org>
parents:
59
diff
changeset
|
3 | |
d193c24a078a
Add links to sr.ht repos and add an image in the README file
David Douard <david.douard@sdf3.org>
parents:
59
diff
changeset
|
4 | ![HP34970A with new front panel](https://whatever.sdfa3.org/images/hp34970a/derivatives/large-photo/800w/finished.jpg) |
d193c24a078a
Add links to sr.ht repos and add an image in the README file
David Douard <david.douard@sdf3.org>
parents:
59
diff
changeset
|
5 | |
59 | 6 | This repository contains the firmware for the replacement front panel for the |
7 | HP 34970A acuisition unit described | |
8 | [here](https://whatever.sdfa3.org/hp-34970a-data-acquisition-unit-part-5.html) | |
9 | ||
71
d193c24a078a
Add links to sr.ht repos and add an image in the README file
David Douard <david.douard@sdf3.org>
parents:
59
diff
changeset
|
10 | The kicad project for the PCB design is [located here](https://git.sr.ht/~douardda/hp34970-pcb). |
d193c24a078a
Add links to sr.ht repos and add an image in the README file
David Douard <david.douard@sdf3.org>
parents:
59
diff
changeset
|
11 | |
59 | 12 | It is based on the [Mbed-os](https://os.mbed.com) framework and uses the |
13 | [platformio](https://platformio.org/) development environment. | |
14 | ||
15 | Make sure to have this later properly installed (I suggest you install it in a | |
16 | Python 3 virtualenv). | |
17 | ||
18 | The firmware has been developped using platformio version 5.0.3 and Mbed-os 6.2. | |
19 | ||
20 | ## Compilation | |
21 | ||
22 | It should be a simple matter of calling: | |
23 | ||
24 | ``` | |
25 | (pio3) ~/p/p/hp34970disp$ pio run -e fp_dfu | |
26 | [...] | |
27 | Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" | |
28 | RAM: [== ] 21.4% (used 14048 bytes from 65536 bytes) | |
29 | Flash: [== ] 22.9% (used 90040 bytes from 393216 bytes) | |
30 | ========================================== [SUCCESS] Took 28.13 seconds ========================================== | |
31 | ||
32 | Environment Status Duration | |
33 | ------------- -------- ------------ | |
34 | fp_dfu SUCCESS 00:00:28.129 | |
35 | ========================================== 1 succeeded in 00:00:28.129 ========================================== | |
36 | ||
37 | ``` | |
38 | ||
39 | Note: the `platformio.ini` provides 2 similar environments (`fp_dfu` and | |
40 | `fp_stlink`) which are identical but the `upload_protocol`. | |
41 | ||
42 | ## Uploading the firmware | |
43 | ||
44 | You can upload the firmware either via the (USB) DFU mode or the SWD/STLink | |
45 | port on the PCB. Note that the USB socket on the PCB does not power the board, | |
46 | so it must be already powered (which is typically when the board is connected | |
47 | to the main CPU board of the HP 34970A). | |
48 | ||
49 | In order to be able to upload the firware by DFU, the STM32 MCU on the front | |
50 | panel must be booted in DFU mode, which can be done by pressing the DFU button, | |
51 | then the RESET button while keeping the DFU pressed. | |
52 | ||
53 | The STLink upload method does not need the board o be booted in DFU mode. | |
54 | ||
55 | ``` | |
56 | (pio3) ~/p/p/hp34970disp$ pio run -e fp_dfu -t upload | |
57 | ``` | |
58 | ||
59 | or | |
60 | ||
61 | ``` | |
62 | (pio3) ~/p/p/hp34970disp$ pio run -e fp_stlink -t upload | |
63 | ``` | |
64 | ||
65 | ## Credits | |
66 | ||
67 | THis firmware uses a modified version of the [UniGraphic]() library and the | |
68 | [QEI]() library. | |
69 | ||
70 | ||
71 | ## Notes (deprecated) | |
72 | ||
73 | Use mbed 6 | |
26 | 74 | |
75 | For some reason I had to disable mbed-client-cli/ (multiple definition of `cmd' error at | |
76 | link time). | |
77 | Put a .mbedignore file in: | |
78 | ||
79 | $ cd /home/david/.platformio/packages/framework-mbed@6.51504.200716/features | |
80 | $ cat .mbedignore | |
81 | mbed-client-cli/* | |
82 | frameworks/mbed-client-cli/* | |
83 | ||
84 | see https://docs.platformio.org/en/latest/frameworks/mbed.html#ignoring-particular-components |