Skip to content

Latest commit

 

History

History
89 lines (85 loc) · 9.63 KB

diagnostics.md

File metadata and controls

89 lines (85 loc) · 9.63 KB

Diagnostic codes

Stable identifiers produced by the core (SPEC-001 §7). Each has a severity default and a subject.

Every diagnostic in a report carries a phase: load for what loading the project found (netlist checks, missing images, probes), run for what the simulation raised. A run's reset forgets the run's own diagnostics and keeps the load's, so embsim run --json, scenario reports and diagnostics.forbid see both; loading another project forgets them all. embsim validate reports the load's and those of the circuit settled at its first instant (firmware not run).

Each message is in English; in JSON a record also carries messages.fr, the same message in French (SPEC-001 §7), which the workbench shows when its language is French.

Code Default severity Subject Meaning
schema.parse error file a description is not valid JSON
schema.unknown_field error file, node a description contains a field its schema does not define
schema.missing_field error file, node a required field is absent
schema.type error file, node a field has the wrong type or an out-of-range value
schema.version error file unsupported schema_version
catalog.not_found error id a referenced component, board or MCU is not in any library
catalog.pin_unknown error instance, pin a net references a pin the component does not have
catalog.pin_twice error instance, pin a pin appears in two nets
catalog.composite_depth error id composites nest deeper than 8 levels
catalog.model_unsupported error id a composite is used where only a primitive can be
catalog.port_missing warning id, pin a composite has no port for one of its pins
catalog.instantiate error id a component could not be instantiated
fidelity.tier_missing error id the session policy needs a fidelity tier the model does not declare
analog.param_out_of_range error instance, param a parameter is outside its declared range
net.contention warning net two drivers of equal strength disagree (two opposing weak pulls are a divider and are not reported)
net.floating_input warning pin an input sampled a net with no driver and no pull
net.unknown_input warning pin an input sampled X
net.power_short error net two supplies with different nominal voltage on one net
net.unconnected_required_pin warning pin a required pin is unconnected
sched.delta_overflow fatal targets zero-delay propagation exceeded max_delta_cycles
sched.time_overflow error component a delay overflows the time horizon
sched.queue_full fatal the event queue capacity was exceeded
analog.no_convergence error (fatal in strict) nodes the operating point or a step did not converge
analog.step_failure fatal island consecutive step rejections exceeded the limit
analog.timestep_too_small fatal device the step fell below h_min
analog.singular_topology error node a floating node or inconsistent sources
analog.implicit_supply info pin a pull or bridge used the family's nominal supply
analog.implicit_ground info node an island with no ground reference was given one
analog.supply_driven info net a power pin's net is driven by a component, so its ideal supply is not added
analog.overvoltage, analog.overcurrent warning device a declared absolute maximum exceeded
island.requires_electrical error instance a component has no functional model under functional policy
mcu.no_firmware info (warning for an input) board a board has no firmware: its MCU's pins stay inputs; an input to it has nowhere to go
mcu.no_image warning board the firmware's image file is missing: the core is held in reset until one is loaded
mcu.stale_image warning board an ELF image is older, by more than a minute, than a source file its line tables name: it was built before that source last changed (embsim run --build rebuilds it first)
mcu.irq_storm warning component one exception was entered again and again, more often than once per 400 core cycles over 10 ms: what raises it stays set (a flag its handler does not clear, a level-triggered input held active); the message names the interrupt and its peripheral's status registers as they read
project.no_connect error project no_connect names a pin no part or board has
project.no_connect_wired warning pin a pin no_connect lists is on a net after all
perf.hot_net info net one net's edges explain most of the run's analog steps: each re-solves its island (embsim run --circuit-profile shows the rest)
perf.island_size warning net a busy logic line is joined to a large analog island only through a resistor to a supply rail (a pull-up drawn to the board's 3V3): each edge solves the whole island; emblink/pull_up to the rail's voltage keeps the line on its own with the same levels
mcu.image error board the image could not be loaded (not ELF or HEX, wrong machine, outside memory)
mcu.register_file error board the MCU's register description is missing or invalid
mcu.model_missing info board, peripheral a peripheral is bound to a model this build does not have: its registers still hold values
mcu.unsupported_access warning board, register, pc the first access to a peripheral with registers and no model
mcu.clock_gated warning board, register, pc an access to a peripheral whose clock is off: reads 0, writes ignored
mcu.bus_error warning board, address, pc nothing answered an access: the core takes a bus fault
mcu.held_in_reset warning board, register, pc an access to a peripheral its reset controller holds in reset (the RP2040's RESETS): reads its reset values, writes ignored
mcu.usb_fifo warning board an STM32 OTG core's FIFOs as the program placed them: an IN endpoint's FIFO overlapping the receive FIFO or past the 320 words of FIFO RAM, or the receive FIFO read before GRXSTSP took a packet's status
usb.dfu warning component a USB host part's DFU download stopped: the device's status, a request it refused, an image outside its memory layout or a read-only segment, a file it could not read
usb.enumeration warning component a USB host part could not enumerate the device on its cable: the request that failed and why (a STALL, no answer, 5 s); its log has the steps
mcu.usb_boot warning or info board the RP2040 goes to its USB boot (the program called reset_to_usb_boot, a warning; BOOTSEL held at reset, info): the RPI-RP2 drive on its USB cable
mcu.uf2_written info board every block of a UF2 file copied onto the RP2040's USB boot drive is in flash: the part reboots into it
mcu.no_boot2 warning board the RP2040's bootrom finds no boot2 with a good CRC in flash: the part waits in its USB boot (the RPI-RP2 drive)
mcu.rescue info board the RP2040 was reset by its Rescue DP (a probe set the Rescue DP's CDBGPWRUPREQ, then cleared it): its bootrom halts in its dead loop for the debugger to take over
mcu.watchdog_reset info board the watchdog reset the chip (the RP2040's counter reached 0 or CTRL.TRIGGER; the FE310's comparator fired with wdogrsten)
mcu.low_power_reset info board an STM32F4 entered Stop or Standby while its option bytes' nRST_STOP or nRST_STDBY is 0: the part resets instead (LPWRRSTF)
mcu.easydma_range warning board, peripheral an nRF52840 EasyDMA buffer outside Data RAM: nothing is moved
mcu.locked_write warning board, register, pc a write to a PIC32's OSCCON while SYSKEY's unlock sequence has not been written, or to a byte of a PIC24's OSCCON without its own unlock sequence: ignored, as on the part (the first one)
mcu.trap warning board, pc a PIC24 trap (an address, stack or math error, an oscillator failure): the core takes its vector; the first ten are reported
mcu.boot_mode warning board BOOT0 selects system memory, which is not modelled
mcu.stack_overflow error board with the stack analysis on (--stack, analysis.start({stack: true})), the main stack went past its limit (the link's __stack_limit, or into .data and .bss): the stack pointer, the limit and where it came from, the instruction and its function; once a reset, the run goes on
mcu.fault error board with the fault report on (--faults, analysis.start({faults: true})), the core took a fault: what it was (a HardFault and why, the address), the instruction and its function and line, the handler; the whole report in analysis.faults
analysis.unavailable warning board coverage or the profile was on, and a reloaded project's board cannot be measured (no firmware, no function symbols)
mcu.exit info board the firmware exited through semihosting, with its status
mcu.lockup error board the core locked up (a fault with nowhere to go)
input.rejected warning component a component refused an input
probe.invalid error probe a probe's target has an unknown kind (with a suggestion) or names nothing on the bench: the project does not load
project.image_missing error board embsim run: a board's firmware image cannot be read; the run stops at load (exit 2) unless --allow-no-image
io.read error file a file could not be read
ext.budget_exceeded error instance a Lua evaluation exceeded its instruction budget
limit.exceeded fatal limit a configured capacity was exceeded