clock watchdog timeout when starting Nox Player - android-emulator

When I start Nox Player, the loading bar freezes at 45% and Windows shows a blue screen of death with an error _CLOCK_WATCHDOG_TIMEOUT. My system settings:
AMD Ryzen 7 5700G
Gigabyte x570 UD rev 1.0
Kingston Fury Renegade 3600
Be quiet 500W
BIOS updated to version F37c. the Amd Adrenalin has the latest drivers installed

Open BIOS, turn on virtualization

Related

Raspberry Pi CM4 UBoot NVME-access

Does anyone have a working UBoot config for accessing an NVME drive from UBoot running on a Raspberry Pi CM4?
I've compiled everything and UBoot is detecting my NVME correctly:
pci_bind_bus_devices: bus 1/pci_0:0.0: found device 0, function 0: find ret=-19
pci_find_and_bind_driver: Searching for driver: vendor=2646, device=2263
pci_find_and_bind_driver: Match found: nvme
pci_auto_config_devices: start
pci_auto_config_devices: device nvme#0
PCI Autoconfig: BAR 0, Mem, size=0x4000, address=0xc0000000 bus_lower=0xc0004000
pci_auto_config_devices: done
but it doesnt call nvme_uclass_post_probe() and therefore it doesnt create any block device.
Running the command "nvme scan" from the UBoot command line i'am getting a timeout in nvme_submit_sync_cmd(). -> ETIMEDOUT.
I'am using a Kingston A2000 SDD with the latest firmware "S5Z42109".
Does anyone have an idea?
Thanks.

stm32 factory bootloader possibly overwritten with openocd?

tl;dr: flashed firmware to 0x00000000 instead of 0x08000000, am I lost?
Hello,
my device is based on a STM32F103CBTx which came with a proprietary firmware and had readout protection on.
I connect to it with a ST-Link v2 SWDIO and SWCLK connected to PA13 and PA14 and this command:
sudo openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg
I don't remember how I removed flash protection, but it worked as the original firmware didn't work anymore. Then I created a simple hello world firmware which pulls up and down three gpios and flashed it. The gpios are pulled up and down in 700ms intervals.
After flashing, I can't connect with openocd anymore. I forgot to specify the offset, the manual says the offset defaults to 0 and as it worked, I suppose instead of the boot loader my shitty hello world is pulling up and down some random pins happily… Is this possible? All other threads I found say the boot loader is write protected.
This is the last contact I had:
> halt
halt
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0xfffffffe msp: 0xffffffdc
> flash write_image erase fw.hex
flash write_image erase fw.hex
auto erase enabled
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000003a msp: 0xffffffdc
wrote 4096 bytes from file fw.hex in 0.285697s (14.001 KiB/s)
> reset
reset
jtag status contains invalid mode value - communication failure
Polling target stm32f1x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Any directions highly appreciated.
Edit:
What I get now, also tried another st-link:
% sudo openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select '.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.244356
Error: init mode failed (unable to connect to the target)
in procedure 'init'
in procedure 'ocd_bouncer'
flashed firmware to 0x00000000 instead of 0x08000000, am I lost?
No, it doesn't matter at all, they are the same.
After reset, the MCU loads the word at address 0 in SP, and the next one at address 4 in PC. The BOOT0 and BOOT1 pins control which memory gets mapped to 0x00000000. Usually, BOOT0 is tied low, and flash memory at 0x08000000 gets mirrored at 0x00000000.
instead of the boot loader my shitty hello world is pulling up and down some random pins happily… Is this possible? All other threads I found say the boot loader is write protected.
The factory bootloader is indeed write protected, openocd can't overwrite it.
However, your application could have reconfigured the SWD pins, by writing a wrong value in GPIOA->CRH or AFIO->MAPR, thereby preventing openocd from working. It's the most common cause of this problem.
Fortunately, there is a way to recover.
Connect under Reset
If the reset pin of the controller is held low for a while when openocd is started, the application is prevented from starting, and messing up the GPIO configuration.
Openocd can do this automatically, when
It's told to do so, the line reset_config srst_only srst_nogate is present somewhere in the configuration script.
The MCU reset pin is connected to the debugger hardware, pin 15 on an official ST-Link/V2.
Or you can do it manually, by whatever means your board provides. If you are lucky, it has a reset button, if not, you must find a way to somehow ground the MCU reset pin.
Pull the reset pin low
Start openocd
Wait until the Info : Target voltage line appears. Maybe a second longer.
Release the reset pin.
It requires a bit of trial and error, you'll get better with practice.
Then you can flash your improved application, which carefully avoids reconfiguring the SWD pins.

openocd **Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED**

I am trying to setup a eclipse development environment to work with stm32f303 nucleo 32 board.
http://www.st.com/en/evaluation-tools/nucleo-f303k8.html
So far, the all the tools seems to be correctly installed and working: I have succefully compiled and started openocd debugger for stm32f4 discovery and when I connect stm32f303 nucleo 32 board and start openocd, the led on the board indicates that it is connected. (I have flashed the board.)
The thing is openocd get lost when I do step by step debugging and this seems related to the message openocd gives me when started (look for bold line):
Open On-Chip Debugger 0.9.0 (2015-05-19-12:09)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
**Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED**
Info : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.239293
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
Does someone know how to fix usb driver in that case, or it is possible that something else cause the problem?
In case you experience this issue on Linux, you have to configure udev rules to work with the device. Find the 99-openocd.rules included with the source distribution of openOCD under Contributions. Connect your ST-Link USB-device and run 'lsusb' from a terminal, it will list something like this:
Bus 004 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2
Notice the value behind ID, you want to check the 99-openocd.rules to see if there is a matching entry supporting the device, in the above case it's this one:
# STLink v2
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="664", GROUP="plugdev"
Copy this file to your /etc/udev/rules.d configuration directory and reboot your machine. Then try debugging again.
The OpenOCD distribution includes some libusb drivers, and recommends to run the zadig.exe tool to activate them. This will solve your problem.
http://zadig.akeo.ie/
As #silverdr mentioned in the comments, disconnecting the device and reconnecting it worked for me.

RPi3 with SenseHat and Yocto

I am currently working with building a Yocto Image for the RPi3 with the SenseHat installed.
The Yocto image consist of the following layers:
meta
meta-poky
meta-oe
meta-networking
meta-python
meta-raspberrypi
meta-java
an application-specific layer.
The application-specific layer is mainly tasked with loading the following kernel-modules:
i2c-dev
fb_sys_fops
syscopyarea
sysfillrect
sysimgblt
rpisense_core
rpisense_js
rpisense_fb
It also contains openssh, psplash, gcc, make, libiio, rtimulib and some other misc. packages.
My image boots nicely without the SenseHat mounted, but the boot-process stops before reaching the UART shell when it is mounted. It stays frozen until the system is reset by the watchdog.
Following is the last part of the UART output before the system freezes.
{...}
Populating dev cache
ALSA: Restoring mixer settings...
/usr/sbin/alsactl: load_state:1735: No soundcards found...
Tue Nov 1 10:01:54 UTC 2016
INIT: Entering runlevel: 5
Configuring network interfaces... [ 5.130327] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
udhcpc (v1.24.1) started
Sending discover...
[ 6.662428] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[ 6.688217] cfg80211: Calling CRDA to update world regulatory domain
Sending discover...
Sending select for 192.168.0.106...
Lease of 192.168.0.106 obtained, lease time 3600
/etc/udhcpc.d/50default: Adding DNS 192.168.0.20
/etc/udhcpc.d/50default: Adding DNS 192.168.0.40
done.
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd
[ 9.034713] NET: Registered protocol family 10
done.
Starting rpcbind daemon...done.
Starting advanced power management daemon: No APM support in kernel
(failed.)
Starting bluetooth
bluetoothd
Starting syslogd/klogd: done
* Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
[ 9.401783] Bluetooth: Core ver 2.20
[ 9.405528] NET: Registered protocol family 31
[ 9.410088] Bluetooth: HCI device and connection manager initialized
[ 9.416576] Bluetooth: HCI socket layer initialized
[ 9.421576] Bluetooth: L2CAP socket layer initialized
[ 9.426747] Bluetooth: SCO socket layer initialized
...done.
Starting Telephony daemon
[ 9.507315] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 9.512765] Bluetooth: BNEP filters: protocol multicast
[ 9.518098] Bluetooth: BNEP socket layer initialized
Starting Linux NFC daemon
[ 9.624816] nfc: nfc_init: NFC Core ver 0.1
[ 9.629241] NET: Registered protocol family 39
I shoould note that I have soldered three wires onto the UART pins:
RPi3 UART pins http://www.embeddedforu.com/wp-content/uploads/2015/06/Raspberry-pi-UART-connections_thumb.png
When the system is frozen, I can still ping the device, but SSH does not work.
Any idea what might be causing this behavior?
It turned out that the problem lay within the yocto local.conf-file. The following line was set:
ENABLE_I2C = "1"
This created a second i2c-driver, which lead to one of the crashing on boot.
For any googlers out there: This flag does not need to be set. Instead make sure that the i2c-dev kernel driver is loaded at boot.
I never used the bluetooth, but it seems the system doesn't freeze, you just lose UART data when Bluetooth connects.
From here:
On the rpi3, it is normal since the BCM2837 on the Raspberry Pi3 has 2 UARTs (as did its predecessors), however to support the Bluetooth functionality the fully featured PL011 UART was moved from the header pins to the Bluetooth chip and the mini UART made available on header pins 8 & 10.
This has a number of consequences for users of the serial interface.
The /dev/ttyAMA0 previously used to access the UART now connects to Bluetooth.
I would advise you to try again having in config.txt
dtoverlay=pi3-disable-bt
enable_uart=1
And if you really need bluetooth, use
dtoverlay=pi3-miniuart-bt
And for the ssh, add "openssh" in your image recipe, and dependencies to connect like wpa-supplicant (don't forget to configure it)

error in after lanching emulator

I successfully launched an emulator, but after displaying vitual device in system the following errors are occuring:
Renderer error: failed to create/resize pbuffer!!
draw: Could not use program error=0x505
draw: Could not use program error=0x505
draw: Could not use program error=0x501
draw: Could not glDrawElements() error=0x505
Failed to alloc 16777216 bytes for ReadBuffer
Suddenly, loading of virtual device stops. What should I do now?
I had same errors from two days, This is how I solved this issue
downloaded the appropriate system image(64 / 86 system)
allocated less memory(in my case it was 700mb) in avd manager while creating new device(my system has 4gb ram)
restarted emulator