Exemple #1
0
        public void Start(ITransport transport)
        {
            if (_running)
            {
                return;
            }
            _state       = State.None;
            _target      = ATServiceProvider.GetService <STargetService, ITargetService>();
            _debugTarget = _target.GetCurrentTarget();

            _pc       = 0;
            _ramSpace = _debugTarget.Device.GetAddressSpace("data");

            _events.DebugLeave    += EventsOnDebugLeave;
            _events.DebugEnter    += EventsOnDebugEnter;
            _events.MemoryChanged += EventsOnMemoryChanged;
            _events.Start(_debugTarget);

            _server.SetTransport(transport);
            _server.UnknownData      += ServerOnUnknownData;
            _server.DebuggerAttached += ServerDebuggerAttached;
            // Start the debug server
            _server.Start();
            _output.Activate(Output.SDSerialOutputPane);

            DebugStateChanged?.Invoke();
            _running = true;
        }