| CARVIEW |
emhell: Embedded shell
Modules
[Index] [Quick Jump]
Flags
Automatic Flags
| Name | Description | Default |
|---|---|---|
| hgdb | Build hgdb | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- emhell-0.1.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1, 0.1.1.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | attoparsec, base (>=4 && <5), bytestring, data-default-class, data-svd (>=0.1.1), directory, emhell, haskeline, hgdbmi (>=0.3), hocd (>=0.1.2.0), lens, optparse-applicative, prettyprinter, prettyprinter-ansi-terminal, repline (>=0.4.0.0 && <0.5), text, transformers, unix [details] |
| License | BSD-3-Clause |
| Copyright | (c) 2020 sorki <srk@48.io> |
| Author | sorki <srk@48.io> |
| Maintainer | sorki <srk@48.io> |
| Uploaded | by srk at 2024-01-03T11:16:47Z |
| Category | Embedded |
| Home page | https://github.com/DistRap/emhell |
| Bug tracker | https://github.com/DistRap/emhell/issues |
| Source repo | head: git clone git://github.com/DistRap/emhell.git |
| Distributions | NixOS:0.1.1.0 |
| Executables | hocd, hgdb, emhell |
| Downloads | 166 total (5 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-11-29 [all 3 reports] |
Readme for emhell-0.1.1.0
[back to package description]emhell
Embedded development could be hell without a good tooling!
Applications
emhell
emhell is a SVD (System View Description) register browser
Commands
-
:set- Set register field (for example:set uart4.brr.div_mantissa = 0x123).Since
emhellhas no backend, it simply renders the altered register.
hocd
hocd is a register viewer utilizing OpenOCD as a backend
using hocd
Commands
-
:set- Set register field (for example:set gpioa.odr.odr5 = 1).Alters current register value with hexadecimal field value and writes new register value to memory.
-
:halt- Halts target -
:reset- Resets target -
:resume- Resumes execution -
:step- Single-steps target -
:version- Print OpenOCD version
hgdb
hgdb is a register viewer and a GDB frontend,
built on top hgdbmi
Inspecting registers
To use arm-none-eabi-gdb with BlackMagicProbe
available via /dev/bmp launch hgdb in following manner
hgdb --arm --bmp /dev/bmp --svd stm32f407.svd
You can then inspect registers via REPL using their names (tab completion available) delimited by comma, e.g.
λ> scb.scr
Register SCR
- System Control Register
- Address 0xE000ED10 (including offset 0x10)
0000000004
0x00000004
0b00000000000000000000000000000100
0b0000 0000 0000 0000 0000 0000 0000 0000 0100
Bit 2 SLEEPDEEP
+-------+---------+-+---------+-----------+-+
|◦[26:0]|SEVONPEND|◦|SLEEPDEEP|SLEEPONEXIT|◦|
+-------+---------+-+---------+-----------+-+
| 0 | 0 |0| 1 | 0 |0|
+-------+---------+-+---------+-----------+-+
Command line options
-e | --exbehaves likegdb --ex--svdspecifies SVD file to load on start--filecan be used to load image to Gdb on start-a | --armto usearm-none-eabi-gdb--bmp DEVfor use with BlackMagicProbe over UART--bmphosted HOST:PORTfor use with PC hosted BlackMagicProbe (blackmagic_stlinkv2binary)--remotegdb HOST:PORTfor use with remotely running GDB server over TCP (could be OpenOCD provided one)
For full list refer to hgdb --help
Commands
:set- Set register value (for example:set gpioa.odr.odr5 = 1).:svd- Load SVD file, can be used instead of--svdarguments or to change current SVD file:file- Load file to Gdb
All other REPL commands are forwarded to GDB as CLI input.
Build
Using Cabal
git clone https://github.com/DistRap/emhell
cabal build
Using Nix
nix-build
Notes
The interface is not final and will probably change. With more recent Gdb than
currently available on distributions we could also do completion for function names
and variables (requires -symbol-list-functions and -symbol-list-variables).