Skip to content

v0.0.28

Choose a tag to compare

@github-actions github-actions released this 02 Oct 07:31
· 385 commits to main since this release

0.0.28

  • (EN) oep pins suggests the lines it found as probe.config labels (<slot>.nrst, <slot>.power_hi, host-development-guide §8.1) and an output idle for the power channel, instead of a slot reset_channel (not adopted: oep-spec v1-open-proposals §10); --save writes the slot and the labels.
  • (JA) oep pins は見つけた線を probe.config の label(<slot>.nrst、<slot>.power_hi、host 開発ガイド §8.1)と、電源の channel の出力の idle として案内する(スロットの reset_channel は採らなかった: oep-spec v1-open-proposals §10)。--save はスロットと label を書く。
  • (EN) Idle modes 3 / 4 (oep-spec 5013ffb / 7b3c319; registry synced, hash 050ffee525722713: idle_mode output_low 3, output_high 4). config.Idle takes output-low / output-high (output_low / output_high too, normalised to the hyphen form like pull-up), and oep config idle <probe> <ch> output-high offers them. config.find_line(hst_or_items, name, slot=None) finds a target's labelled line (nrst, power_hi, power_lo, config.LINE_NAMES; host-development-guide §8.1): <slot>.<name> first, then the bare name only while the settings hold at most one slot; with several slots and no slot given, or one label on two channels, it raises config.AmbiguousLine listing the candidates; None when there is none. The fake: an output idle drives its level while the channel is free, refused unsupported on Endpoint.input_only channels; every release (plan_release, a channel leaving a replaced plan - it used to keep the old channels' gpio modes - the lease lapse, force) goes to the idle state, and a gpio channel in both the old and the new plan keeps its state and drive; a gpio line a plan takes keeps that state until its first set (a read sees the idle level); at boot the idle states are applied before the plans and the at-boot attach (they came after the attach).
  • (JA) idle の mode 3 / 4(oep-spec 5013ffb / 7b3c319。registry を写し直した、hash 050ffee525722713: idle_mode の output_low 3、output_high 4)。config.Idle が output-low / output-high を受ける(output_low / output_high も。pull-up と同じくハイフンの形にそろえる)。oep config idle <probe> <ch> output-high でも選べる。config.find_line(hst_or_items, name, slot=None) は target の label の付いた線(nrst、power_hi、power_lo、config.LINE_NAMES。host-development-guide §8.1)を探す: <スロット>.<名前> を先に、無ければ名前だけ(設定のスロットが 1 つ以下のときだけ)。スロットが 2 つ以上で slot を渡さないときと、1 つの label が 2 つの channel にあるときは、候補を並べた config.AmbiguousLine を上げる。無ければ None。fake: 出力の idle は channel が空いている間その level で駆動し、Endpoint.input_only の channel では unsupported で断る。解放はどの道でも(plan_release、置き換えた plan から外れる channel - これまでは古い channel の gpio の mode が残っていた - lease の失効、force)空きの状態に戻り、古い plan にも新しい plan にもある gpio の channel は状態と駆動を保つ。plan が取った gpio の線は最初の set までその状態を保つ(read は idle の level を見る)。起動では idle を plan と at boot の attach より先に掛ける(これまでは attach の後だった)。
  • (EN) oep pins <probe> [--power CH] [--exclude CH,...] [--wire swio|rvswd|swd] [--steps ...] [--save] [--json] (module pins, PinFinder): finds where a target is wired on a probe whose pins the host chooses. Steps: classify every gpio channel from 16 reads under pull-up, both pulls, then pull-down (floating / pulled-up / driven-high / driven-low / active; with --power the target is read switched off first and the channels that read otherwise "follow power"); hold each floating / pulled-up channel low (open drain) while an active channel is watched (the watch lasts 3 x the longest lull of the running activity, 0.3-1 s); scan the wire over the floating / pulled-up channels only (rvswd / swd: pairs, at most 600); attach (halt), name the family by target_id and read a CH32V00x's option bytes (NRST on or off; read only); confirm the reset line by attach under reset (dpc = reset vector); print a suggested slot (reset_channel as a comment while config.Slot has none) and write it only with --save. Driven / active channels are never driven, scanned or held, the power channel is touched only with --power, every plan is released at the end, the run stays under 60 s. A new gpio plan lets every pin of the old one go first (the power channel too), so with --power each new plan is followed by a clean power cycle. On the ESP32-P4 with a CH32V003 (power GPIO5): SWIO 19 and NRST 4 found untold in 7-8 s, 6 runs of 6; the idle-high UART (22 / 23) is classified driven and left alone, the app's output 21 active.
  • (JA) oep pins <probe> [--power CH] [--exclude CH,...] [--wire swio|rvswd|swd] [--steps ...] [--save] [--json](モジュール pins、PinFinder): ピンを host が選ぶ probe で、target がどこにつながっているかを探す。段: gpio のすべての channel を pull-up、両方の pull、pull-down の順に 16 回ずつ読んで分ける(floating / pulled-up / driven-high / driven-low / active。--power では先に target の電源を切って読み、違って読めた channel を「電源に従う」とする)。floating / pulled-up の channel を 1 本ずつオープンドレインで low に保ち、active の channel を見る(見る長さは走っている時の最長の静かな間の 3 倍、0.3〜1 秒)。floating / pulled-up の channel だけで線を scan する(rvswd / swd は組で 600 組まで)。attach(halt)して target_id で系統を見て、CH32V00x なら option bytes で NRST の有無を読む(読むだけ)。リセットをかけながらの attach(dpc = リセットのベクタ)でリセットの線を確かめる。スロットの行を勧め(config.Slot に無い間 reset_channel はコメント)、--save のときだけ書く。driven / active の channel は駆動も scan も保持もしない、電源の channel は --power のときだけ触る、最後に plan をすべて解く、全体は 60 秒以内。gpio の plan を新しくすると前の plan のピンが(電源の channel も)いったん離れるので、--power では新しい plan のたびにきれいに電源を入れ直す。ESP32-P4 と CH32V003(電源 GPIO5)で、SWIO 19 と NRST 4 を指定なしで 7〜8 秒で見つけた(6 回中 6 回)。idle-high の UART(22 / 23)は driven として触らず、アプリの出力 21 は active。
  • (EN) targets: what the host knows per target family in one table, FAMILIES (wire, target_id match on the WCH DMI 0x7F value, reset vector, an option-byte NRST reader, max_speed / idle_clock, notes): ch32v00x (swio, ids 0x002-0x007 in the top 12 bits, v00x_nrst: 0x1FFFF800 word0 USER bits[4:3] = RST_MODE, 11 = PD7 is a GPIO), ch32x035 (rvswd, 0x035, idle_clock high), ch32l103 (rvswd, 1 MHz, idle_clock low; id not recorded), ch32v203 (idle_clock low; id not recorded). identify(target_id), by_name(), describe_id(). oep-spec docs/target-scan-notes.ja.md records the sources.
  • (JA) targets: host が target の系統ごとに知っていることを 1 つの表 FAMILIES に(線、WCH DMI 0x7F の値での target_id の照合、リセットのベクタ、NRST を option で読む関数、max_speed / idle_clock、注): ch32v00x(swio、上位 12 ビットが 0x002〜0x007、v00x_nrst: 0x1FFFF800 の word0 の USER bits[4:3] = RST_MODE、11 = PD7 は GPIO)、ch32x035(rvswd、0x035、idle_clock high)、ch32l103(rvswd、1 MHz、idle_clock low。id は未記録)、ch32v203(idle_clock low。id は未記録)。identify(target_id)、by_name()、describe_id()。出典は oep-spec の docs/target-scan-notes.ja.md。
  • (EN) riscv.Wire.find_reset_line(..., pins=None): it returned [] on the ESP32-P4 with the CH32V003's real NRST among the candidates. Root cause: it attached without pins; on a wire whose pins the host chooses (role_channels) such an attach only joins the wire's one live connection, and the first try's detach closed that connection, so every later attach was rejected unavailable - and a rejection was taken for "not a reset line" and skipped. Now pins is passed to every attach (None: the pins of the wire's one live connection), a connection that was there before the search is left open, only unsupported or an unavailable naming the channel skips it, any other rejection is raised. On the P4: [4] over 48 candidates with tries=3 in 4.2 s, with and without a plain attach first. Hold time is not the cause: an attach under reset through 4 stopped at dpc 0 with 1, 2, 5, 10 and 20 ms holds, 3 of 3 each (RST_MODE 10, the 12 ms window).
  • (JA) riscv.Wire.find_reset_line(..., pins=None): ESP32-P4 と CH32V003 で、本物の NRST が候補にあるのに [] を返した。原因: pins を付けずに attach していた。ピンを host が選ぶ線(role_channels)では、pins の無い attach はその線の唯一の生きた接続に加わるだけで、1 回目の試しの detach がその接続を閉じた後は、どの attach も unavailable で断られ、断りを「リセットの線ではない」と読んで飛ばしていた。今は毎回の attach に pins を付け(None ならその線の唯一の生きた接続のピン)、探す前からあった接続は閉じない。飛ばすのは unsupported と、その channel を名指しした unavailable だけで、ほかの断りは例外にする。P4 で 48 候補、tries=3 で [4](4.2 秒)。先に普通の attach をしてあってもなくても同じ。保持時間は原因ではない: 4 でリセットをかけながらの attach は 1、2、5、10、20 ms の保持でどれも 3 回中 3 回 dpc 0(RST_MODE 10、12 ms の窓)。
  • (EN) The fake: Endpoint.gpio_world(channel, mode) (a test hook: the level an input-mode read sees, from the lines outside) and FakeTarget.reset_line (an attach under reset through any other channel halts where the hart ran, off the vector). tests/test_pins.py runs oep pins against a P4-shaped profile with a V003-like world.
  • (JA) fake: Endpoint.gpio_world(channel, mode)(試験の hook: 入力の mode の読みが見る外の線のレベル)と FakeTarget.reset_line(ほかの channel でリセットをかけながら attach すると、hart は走っていた所で止まり、ベクタに来ない)。tests/test_pins.py が P4 の形の profile と V003 らしい外の線で oep pins を動かす。
  • (EN) Registry synced to oep-spec 75ca9ee (hash 3861100e11fb3b22): oep.fixture.i2c-target describe max_stretch_us (0x41, u32). The fake follows fixture §3 / §4 as 75ca9ee closed them: an i2c-target / spi-target plan holds each role exactly once on distinct channels (a missing role, a role twice or two roles on one channel -> malformed, before held_by_settings); the mode-1 wait survives a frame (armed stays 1 until the next arm_rx / reset / configure / plan release); an address-only write counts nothing in any mode; read_rx in state 0 is unavailable cause 6 on both targets; a 0-bit SPI transfer (spi_transfer(..., bits=0), or empty MOSI) counts nothing and the arm keeps waiting, and the queued data is bits / 8 rounded up, capped at length. p4-x035 declares max_stretch_us 100000 and stretch refuses more as unsupported (the fixed endpoint.STRETCH_MAX_US is gone); esp32-v003 (no features bit1) declares none. fixture.I2cTarget gains max_length, max_clock_hz, features, queue_depth and max_stretch_us (None when not declared; features 0), fixture.SpiTarget the same but max_stretch_us, read once from describe. tests/hw i2c_target records declared.max_stretch_us.
  • (JA) registry を oep-spec 75ca9ee に合わせた(hash 3861100e11fb3b22): oep.fixture.i2c-target の describe に max_stretch_us(0x41、u32)。fake を 75ca9ee で埋まった fixture §3 / §4 に合わせた: i2c-target / spi-target の plan は各 role をちょうど 1 つずつ別々の channel で持つ(role が欠ける、2 つある、2 つの role が同じ channel は malformed。held_by_settings より先)。mode 1 の待ちはフレームを受けても終わらない(次の arm_rx / reset / configure / plan を解くまで armed は 1)。アドレスだけの書き込みはどの mode でも何も数えない。state 0 の read_rx は両 target で unavailable cause 6。0 ビットの SPI 転送(spi_transfer(..., bits=0)、または MOSI が空)は何も数えず arm は待ち続ける。積む data は bits / 8 の切り上げで length で止める。p4-x035 は max_stretch_us 100000 を宣言し、それを超える stretch は unsupported(固定の endpoint.STRETCH_MAX_US は無くした)。esp32-v003(features bit1 なし)は宣言しない。fixture.I2cTarget に max_length、max_clock_hz、features、queue_depth、max_stretch_us(宣言が無ければ None、features は 0)、fixture.SpiTarget に max_stretch_us 以外の同じものを足した(describe から 1 回読む)。tests/hw の i2c_target は declared.max_stretch_us を記録する。
  • (EN) tests/hw spi_target: with no controller wired, an arm must stay armed (0 transactions, 0 errors) and a second arm is refused unavailable, as fixture §4 says. The check was loosened for phantom CS-edge transactions the probe counted; oep-probe-arduino a3dcabd stopped counting a CS edge without SCK. ATOM with the probe at ac80e07: 12 passed.
  • (JA) tests/hw の spi_target: コントローラーをつないでいないとき、arm は armed のまま(transactions 0、errors 0)で、2 回目の arm は unavailable で断られること(fixture §4 のとおり)。probe が CS の縁だけで数えていた幻の転送のために緩めていた確かめを元に戻した(oep-probe-arduino a3dcabd で SCK の無い CS の縁を数えなくなった)。probe ac80e07 の ATOM で 12 passed。
  • (EN) The fake probe runs oep.fixture.i2c-target and oep.fixture.spi-target (oep-spec oep-if-fixture §3 / §4); it only declared them before, so tests/hw i2c_target / spi_target failed on fake-esp32-v003 and now pass. The plan takes SDA / SCL and SCK / MOSI / MISO / CS with the gpio / uart checks, plus role_channels per role and an exact channel_group (core §7.4); configure / arm_rx / arm / preload_tx / read_rx (TLV ns) / status (lock-free) / reset / stretch (features bit1 only, else unknown_operation) with the refusals in core §4.3's order; a plan change puts the target back to state 0. Declared: p4-x035 i2c max_length 128, max_clock_hz 1 MHz, features 0b11, queue_depth 8; spi max_length 64, 3 MHz, features 0b1 (LSB first), queue_depth 8. esp32-v003 i2c 16, 100 kHz, features 0b01, queue_depth 4; spi (two channel_groups) 32, 3 MHz, features 0, queue_depth 4. No bus controller: test hooks Endpoint.i2c_write / i2c_read / spi_transfer run one transaction (queued, consumed, overflow, not armed - transactions and errors counted). fake.with_stand_in(probe) adds the fn with the stand-in operations the session tests used the esp32-v003 i2c-target for.
  • (JA) 偽の probe が oep.fixture.i2c-target と oep.fixture.spi-target(oep-spec oep-if-fixture §3 / §4)を動かす。これまでは宣言だけで、fake-esp32-v003 の tests/hw の i2c_target / spi_target は落ちていた。今は通る。plan は SDA / SCL と SCK / MOSI / MISO / CS を、gpio / uart と同じ確かめに、role ごとの role_channels と channel_group の完全一致(core §7.4)を足して受ける。configure / arm_rx / arm / preload_tx / read_rx(TLV ns)/ status(ロック不要)/ reset / stretch(features bit1 のときだけ。ほかは unknown_operation)。断りは core §4.3 の順。plan が変わると target は state 0 に戻る。宣言: p4-x035 の i2c は max_length 128、max_clock_hz 1 MHz、features 0b11、queue_depth 8。spi は 64、3 MHz、features 0b1(LSB 先)、queue_depth 8。esp32-v003 の i2c は 16、100 kHz、features 0b01、queue_depth 4。spi(channel_group 2 つ)は 32、3 MHz、features 0、queue_depth 4。バスの controller は無い: 試験の hook Endpoint.i2c_write / i2c_read / spi_transfer が 1 回のトランザクションを起こす(積む、取り出す、あふれ、未 arm。transactions と errors を数える)。セッションの試験が esp32-v003 の i2c-target を代わりに使っていた仮の操作の fn は fake.with_stand_in(probe) が足す。
  • (EN) tests/hw covers the interfaces it did not yet, each skipping when the probe does not list it, after uart and before port_speed: capture (oep.fixture.logic: a one-shot at the lowest declared rate over 10 ms on the two free channels, pulled up then down through fixture gpio planned on the same pins - all ones, then all zeros; sample count, timing within the declared uncertainty, generation +1 per start), capture_analog (one-shot on a free ADC channel, widest frontend; the pull bands are judged only when the probe lets gpio share the pin), capture_group (logic + analog bound and started together, both read back, the tracks' offsets from the group's start_ns), i2c_target / spi_target (configure, status, a preloaded queue / an armed transaction, reset, release - no bus controller, so floating-line glitches are recorded, not judged), console (with OEP_HW_TARGET: open with mechanism dmseq on the wire connection, read 1 s, close). OEP_HW_ANALOG, OEP_HW_I2C, OEP_HW_SPI name channels. ATOM, firmware 0.0.27: logic 400 kHz w 8, 4000 / 4000 ones then 0 / 4000 on both pins, done 24 ms after start for a 10 ms window, 4 KB read in 0.38 s; analog 20 kHz s 16 b 12, the floating pin at 2.8 / 4095; the group's tracks start 25 µs (logic) and 516 µs (analog) after the group; the analog refuses to share its pin with gpio (unavailable, as oep-if-capture §1.2 allows) and an idle pull-up on it reads only 137 mV mean once the ADC owns the pad; the SPI target counts 1-2 phantom transactions on its floating SCK / CS right after an arm.
  • (JA) tests/hw に、まだ無かった interface の試験を足した(probe が list に出さなければ skip。uart の後、port_speed の前): capture(oep.fixture.logic: 空き 2 チャネルで、同じピンに plan した fixture gpio で pull-up → pull-down し、宣言の最低のレートで 10 ms のワンショット。全部 1、次に全部 0。サンプル数、宣言の不確かさの内の時間、start ごとに世代 +1)、capture_analog(空きの ADC チャネルでいちばん広い frontend のワンショット。pull の帯は probe が gpio とピンを共有させるときだけ判定)、capture_group(ロジックとアナログを bind して一緒に start、両方読み出し、組の start_ns からの各トラックのずれ)、i2c_target / spi_target(configure、status、preload の列 / arm した転送、reset、release。バスに controller は無いので浮いた線のグリッチは記録して判定しない)、console(OEP_HW_TARGET のとき: 線の connection に mechanism dmseq で open、1 秒読む、close)。OEP_HW_ANALOG、OEP_HW_I2C、OEP_HW_SPI でチャネルを指定できる。ATOM、firmware 0.0.27: ロジック 400 kHz w 8、両ピンとも 4000 / 4000 が 1、次に 0 / 4000、10 ms の窓に対し start の 24 ms 後に done、4 KB の読み出しに 0.38 秒。アナログ 20 kHz s 16 b 12、浮いたピンは 2.8 / 4095。組のトラックは組の 25 µs(ロジック)と 516 µs(アナログ)後に始まる。アナログは gpio とのピンの共有を断り(unavailable。oep-if-capture §1.2 が許す)、その上の idle の pull-up は ADC がパッドを持つと平均 137 mV しか読めない。SPI の target は arm の直後、浮いた SCK / CS で 1〜2 の幻の転送を数える。
  • (EN) tests/hw port_speed: the run fails only when no candidate passes; a candidate that fails the guide's verdict is recorded (passed_rates / failed_rates). The ATOM's bridge puts 1500000 over the threshold in some runs (11-14 % on one flow against a 2-5 % baseline) while 500000 passes every time - a fact about that bridge, not about the probe or the client.
  • (JA) tests/hw の port_speed: 通る候補が 1 つも無いときだけ落とす。ガイドの判定に落ちた候補は記録に残す(passed_rates / failed_rates)。ATOM の変換は 1500000 が回によって閾値を超え(基準 2〜5 % に対し 1 つの流し方で 11〜14 %)、500000 は毎回通る。probe や client ではなく変換の性質。

Repository: https://github.com/Open-Embedded-Probe/oep-client-python

Full Changelog: v0.0.27...v0.0.28