Comments (14)
This is actually expected behaviour - you're connecting to a stopped emulation ("emulation" is all the interconnected machines). Stopped emulation = no time flow = cores do not execute instructions.
from renode.
What you can do is to add an "autostart" parameter to the gdb command:
cpu StartGdbServer 3333 true
This is not encouraged for multicore devices though
from renode.
When using something like openocd
on real hardware, issuing a continue
resumes the current core, and in fact openocd
will print out an error if the core begins executing on its own. That's obviously not an issue here.
Is the right thing to do to define a gdb script that remaps continue
to mon start; continue
? Or does the autostart
option automatically issue a start
whenever gdb issues continue
?
A separate issue was that I thought Renode had locked up completely, because I couldn't break into GDB at all, even if I disconnected and reconnected it.
from renode.
real hardware is always clocked. You could compare your case with a situation when you have a cpu that is clocked by an external oscillator and you've unsoldered it.
Having said that I think that what @PiotrZierhoffer suggested just forces this start so it should fix your problem.
from renode.
That's right, autostart causes the whole emulation to start.
And mon start
or start
in the Renode Monitor means "let's start the flow of virtual time"
from renode.
Ah, I see.
Would it make sense, then, to print a warning out when a user issues continue
via GDB and the emulation is stopped? Something like WARNING: Emulation is paused
.
Also, shouldn't the GDB connection at least respond to interrupts, even if time is paused? It seems to me that ^C^CThe target is not responding to interrupt requests.
is also a bug.
from renode.
I am pretty sure it could be improved to be more informative, sure.
from renode.
It looks like cpu StartGdbServer 3333 true
isn't a valid command, and when I change it to machine StartGdbServer 3333 true
it doesn't change the behavior at all:
(gdb) target remote localhost:3333
Remote debugging using localhost:3333
_start () at asm.S:27
27 in asm.S
(gdb) c
Continuing.
The target is not responding to interrupt requests.
Stop debugging it? (y or n)
from renode.
Sorry, it was supposed to be machine
of course. The behaviour should have changed, I will investigate that
from renode.
I forgot that this "autostart" is not as "auto" as you'd like it to be.
It actually requires you to call mon halt
, which, in fact, is similar to calling mon s
(equivalent to mon start
).
The reason for that is that this feature was part of a larger integration with Microchip's SoftConsole where we wanted to be able to autostart on first connection. It's not trivial to make the solution more general without over-complicating our state machine, because it has to address different scenarios, like user explicitly pausing time before first connection etc etc.
Defining a function for your use case would be the sensible option until we come up with a better approach. It will work well if you don't need to control time flow directly from Renode.
from renode.
What is the correct way to single-step from the reset vector? Currently I do stepi
from GDB, which locks up (as per the bug title), then alt-tab over to the Renode console and run start
. How would I accomplish this without needing to go between two windows?
from renode.
If you're connected to Renode via GDB, then mon s
followed by stepi
should do the trick.
from renode.
Won't mon s
start execution? Or does it start execution and then immediately halt the CPU?
This issue is more for the time I've spent trying to figure out what's going wrong, and why my simulation isn't working. I just did it again -- attach gdb, run continue
, and wait for the output.
I have a small patch inside the Gdb server that automatically starts the simulation when it's stopped and the user does a continue
, but am I right in assuming this lockup is intentional, and such a patch wouldn't be accepted?
from renode.
mon s
will start the time flow, but if gdb is connected, the CPU stays in single step mode until prodded with c
.
Regarding the patch - the lockup is intentional, but since it's not clear to the users, we'll have to rethink it. We need to take multinode/multicore setups into account here, but also make the simplest case easy to use. I'll try to put that in the loop and discuss possible solutions with the team.
from renode.
Related Issues (20)
- Read value from GPIO
- hi i am trying to run gdb for blinky which is using nordic-blinky-zephyr.elf and using nrf52840 board when i am trying gdb not working HOT 1
- Possibility to synchronize simulation time with real time HOT 1
- Feature Request: Ethernet Support for Cortex-A53 Linux in Renode HOT 1
- Documentation: How to add a custom C# peripheral and testing it ? HOT 1
- `InvalidOperationException` is thrown when invoking a method via reflection HOT 4
- wish: rtos awareness for GDB server HOT 2
- How to use buildroot with renode HOT 2
- Failed to Flash from the eMMC in the Icicle Kit Machine in Renode HOT 1
- Bug in Virtqueue implementation HOT 4
- CAN tools (Wireshark, candump, python-can) run directly from host shows invalid CAN ID while using SocketCAN-Bridge feature
- How to connect multiple AXI masters/slaves to a VerilatedPeripheral HOT 3
- STM32F103 (Bluepill) simulation with CAN bus HOT 2
- Support Needed: Add SD Card peripheral when it is connected to a SPI bus
- renode-test cli output shows status of skipped tests as failed HOT 1
- LTDC add 2 registers (LTDC_SRCR and LTDC_CDSR ) for stm32h7 support HOT 2
- Attempts to generate repl for Qualcomm Robotics RB5 failing
- Dotnet UI not working on Linux HOT 4
- Add STM32H7_PWR and RCC updates
- STM32F1 does not finish init code, hanging in `SystemClock_Config`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renode.