* WIP: Getting coresight to work
* Fixing Coresight protocol and interrupt forwarding TO QEmu
* WIP interrupts fixing my own mistakes
* Added interrupt state transfer
* Reactivated interrupt forwarding, works with timer but the alarm runs out of sync so it only works for a couple of seconds
* Fixing crash due to protocol shutdown order
interrupt protocol depends on memory
* Fixed issues with memory protocols
* Fixed IVT setup in interrupt protocol
* WIP: Added interrupt recording plugin and protocol, not complete
* WIP: Fixed the stub to include an end of buffer flag
* Interrupt recording protocol and plugin v1
* Interrupt recording protocol cleanup
* Added rudimentary support for ARM Cortex M4 (without FPU registers)
* Interrupt recording without manipulating main loop control flow
* WIP: USB rehosting
* Updated interrupt messages to include the IRQ-Address
* IRQ fixing
* IRQ fixing; Reordering of setup code and removal of IRQ init because it might not complete before the first IRQ fires
* IRQ message passing fixes
* Allow plugins to get configuration parameters at load time
* Switch to trace approach for interrupt rehosting, to capture quickly firing interrupts
* Allow avatar peripherals to know on what target they got called
* WIP: Prevent interrupt interleaving
* Fixed wrong program counter
* WIP: picow-blink rehosting, runs much further but crashes because it runs a re-init of the CYW43
* Allow OpenOCD target to have a gdb binary for symbols
* WIP HAL calling
* WIP HAL calling step 2
* WIP HAL calling step 2- THIS IS BROKEN AF
* Finally a working version
* First working HAL implementation for send-uart
* Make HALCaller config more expressive
* Made HAL calls more generic, allow for up more arguments, allow void function returns, allow pointer/mem bocks for function return
* OpenOCD protocol, rework raw memory read/write for higher performance in memory transfers
* Trigger HAL Exit after Hardware reset is complete
* Make protocol usable as a signaled target continue protocol
* WIP: PICOW rehosting
* WIP: Software interrupt rehosting support by using the hardware in the loop as the only source of interrupts
* WIP: USB rehosting, cleanup of software interrupt stuff
* Cleanup interrupt recording
* HAL only deal with interrupt protocol if present
* HALCaller rename to HWRunner
* HWRunner OpenOCD fix; WiFi experiments final
* HWRunner naming cleanup
* Interrupt Recorder naming cleanup
* Interrupt Forwarding naming cleanup
* Cleanup and fixup of refactorings
* INTFowrader & HWRunner summary
* Final cleanup
* Remove union types for type hint
Union in type hint is introduced with PEP 604 in python 3.10.
However, we aim to support python 3.6.
* Remove crashing log
* Remove crashing log line when using pypanda
---------
Co-authored-by: Florian Albrecht <[email protected]>
Co-authored-by: rawsample <[email protected]>
The parsing assumes a 4 lines header, which is removed and assumes to blank line.
However, it appears to have blank lines in the output, which causes index out of range errors.
Solution: 1) splitting on the last part of the header "objfile" to remove unwanted header lines, and then ignoring the blank lines while parsing.
This PR adds support for using UNIX sockets for GDB connections instead
of TCP.
One aspect I didn't consider was where the sockets should be created by
default since I use is not None to detect if UNIX should be used. Maybe
sockets should be automatically placed in the avatar2 output directory
(which should be unique per instance), but this would require more
invasive changes to the KWArgs for transport selection.
Co-authored-by: Grant Hernandez <[email protected]>
Co-authored-by: sampl <[email protected]>
* Fixed version checking for pygdbmi
* Fix checks on shutdown to avoid "AttributeError: 'GDBProtocol' object has no attribute '_communicator'"
Co-authored-by: Matt Borgerson <[email protected]>
Co-authored-by: Jelle Nauta <[email protected]>
Co-authored-by: sampl <[email protected]>
* New action to publish on release the python package on Pypi
* Migrate tests to unittest and pytest
* Rework the CI pipeline to build and test on 3 python versions (3.7, 3.8 and 3.9)
* Rename Dockerfile into avatar2.Dockerfile
Co-authored-by: mariusmue <[email protected]>
* OpenOCDTarget: don't check for script existence
The OpenOCD protocol supports passing multiple scripts if a list is
passed. However, the OpenOCD target checked the path to the script using
`os.path.exists`, which does not handle lists of paths.
Furthermore, OpenOCD can search for scripts in other locations that
avatar2 does not have knowledge about, for example if a search path is
passed using `-s` in `additional_args`, or the global scripts path.
* RemoteMemoryProtocol: Handle ImportError on darwin
Darwin doesn't have mqueue.h, so the posix_ipc dependency raises an
ImportError when remote_memory.py tries to import MessageQueue.
For now, just fail gracefully, and don't add a rmp to a qemu_target if
RemoteMemoryProtocol can't be imported.
When using Pypanda/QEMU/Panda with avatar and the POSIX memory queues, if for some reason the memory queue isn't unlinked before the process exits (for example due to a crash), then /dev/mqueue can completely fill up leading to this error message due to ULIMIT:
```
qemu: qemu_avatar_mq_open_read: No space left on device
```
This technically will only happen if the TX/RX queue names are changing, such as when changing the `name` field of the target being spawned to include an identifier, such as PID
```
ls /dev/mqueue
EMU34129_tx_queue EMU41915_tx_queue EMU44523_tx_queue
EMU36565_rx_queue EMU42910_rx_queue EMU45457_rx_queue
...
```
It seems error prone to have to rely on a process itself to clean up at atexit, if it never makes it there. A quick fix is to immediately unlink the queue after it has been connected to by Avatar and after it is created by QEMU. This assumes the queue is for a single connection pair and it will not be reusable as it has been unlinked. Unclear if other clients of remote memory will have issue with this, but since Avatar only supports opening an existing queue instead of creating one, I believe this works out.
* Fix version check of pydbmi
* bugfix in pypanda CI testcase
* Allow docker login in CI to fail
The login was introduced to work around rate limiting for docker pulls
on dockerhub. However, the required tokens/env variables are not present
for pull requests, resulting into the CI failing. Hence, we now allow
this to be failing, and may need to manually restart CI builds for PRs.
* fix typos
* skip executable check for pypanda target
* v1.4.4: Update Changelog and setup.py
Co-authored-by: sampl <[email protected]>
Some clients already configure logging and avatar2 will hijack the logging config leading to duplicate output. Give clients the option to disable this behavior.
* Check for active PyPanda target during shutdown
* Call super destructor for PyPanda target
Otherwise RemoteMemory /dev/mqueue items never get deleted.
* Conditional support for pc in remote memory accesses to pyperipherals
Only if all registered read and write handler support pc, it is
forwarded from the message
* black autoformatting
* qemu_target: logfile kwarg is absolute
* black autoformatting
* Update setup.py and changelog
* fix cached_property import according to pyversion
* allow inlining of pyperipherals into qemu via API
* unicorn_caller plugin
* wrapper for add_hook
* adjust unicorn_caller import path
* Flags for transfer state rather than absolute bools
* allow avatar-reference to be dictifyable
* added overwrite option to memory ranges
* working version of mr-overwriting
* bugfix for overwrite option
* Rename memory region on overwrite to shorter name
QEMU has a memory name limit of 255. Memory regions with many splits can
create names that exceed this, leading to conflicts.
* additional debugging output
* Add pypanda add_hook function and testcase
The CI test is currently not working due to a bug on PANDAs hooking
infrastructure, which is investigated in parallel. Once fixed, the CI
test should work as expected.
* Bump version and updated changelog
Co-authored-by: Grant Hernandez <[email protected]>