PICkit 3 not recognised by Computer - microchip

I got a completely new PICkit 3, MPLAB X on a MacBook Pro and the PIC16F1827. I set up a new project with the xc8 compiler and, to my knowledge set up everything correctly. Then I connected my PICkit and thought that it would start downloading and flashing a new firmware.
Instead it just flashed the STATUS LED red and nothing happened. I have power on the PICkit and the connection is active.
This is what I get, when trying to start a debugging session:
I tried reinstalling MPLAB X and to switch the USB Cable, in case it was faulty. Any suggestions?

The fault was actually Apples System Integrity Protection, which prevented the installer from changing vital permissions of one installation folder. By now this has probably already been resolved in the new versions.
But in case anyone still needs it:
Reboot your mac into recovery mode.
Open the terminal.
Type csrutil disable #this disables the SIP on your machine
Reboot and install MPLAB X
Reboot into recovery again and reenable SIP (with csrutil enable)

Usually, when a tool is detected, the serial number appears below its name. I believe your PICkit3 is not being detected. Do you have it connected directly to the USB port on you computer? Sometimes they don't get recognized when connecting through USB hubs.

Related

"No ST-LINK connected!" issue with Nucleo-F413ZH

I'm trying to flash a basic LED blinking program to my Nucleo F413ZH board using the STM32CubeIDE, but whenever I try to debug it says:-
"No ST-LINK connected! Please connect ST-LINK and restart the debug
session."
The board has the PWR and COM LEDs blinking, meaning the USB I've connected to the board is providing power, I just can't upload any code.
I've tried using the ST-LINK upgrade firmware (https://www.st.com/en/development-tools/stsw-link007.html) to install new drivers as that's what some people online have suggested but the program won't respond once I've downloaded it, which seems to be a side issue of not registering connectivity.
I'm not sure whether this is an issue with drivers or if my hardware is busted. I'm using macOS Big Sur.
In Windows 10 this problem occurs as a result of an incorrect driver priority as pointed out in this post. Error in initializing ST-Link Device - Failed to connect to device perhaps this solution might point you in the right direction. I have set up several new M1 Mac Minis in the past few months for clients, Big Sur and the new M1 have several compatibility issues like slow network drive access and flashing screens, the Android M1 chip has dramatically less external connectivity which is why they went from 4 thunderbolt ports on the last intel Mac Mini to just 2. I would not be surprised if Big Sur is the core of the problem. Try a different computer if you have the opportunity.
I was also getting the same error on ubuntu system while using stm cube ide, with st-link v2 programmer.
blue led was continuously blinking.
but solved the error just by reconnecting the usb-extention-hub, now when connected blue led is on (no blink), and now i can program and debug the target.

Kernel debug two physical MacBook pro devices

I'm trying to kernel debug a physical Macbook pro device.
When my setup contains a VM, between a host MacOS and guest MacOS, its working with no problem using lldb -o "kdp-remote <guest_machine_ip>"
my boot-args on my remote (to debug) Macbook are:
user$ nvram boot-args
boot-args debug=0x44 kext-dev-mode=1 pmuflags=1 -v kcsuffix=debug
When i'm triggering kernel debug using either
sudo dtrace -w -n "BEGIN { breakpoint(); }"
or LEFT CMD + RIGHT CMD + PowerButton, the system is in halt mode, not responsive to anything (Mouse not moving, etc)
But when I'm trying to connect to the machine from the host using the lldb command provided earlier, it's not working.
I've made sure the machines can ping each other and I can set up a SSH connection.
To the best of my understanding, I had to user special Apple adapters (Real™ Ethernet adapter), so I'm using the following adapters to debug the remote machine:
https://www.apple.com/shop/product/MMEL2AM/A/thunderbolt-3-usb-c-to-thunderbolt-2-adapter
https://www.apple.com/shop/product/MD463LL/A/thunderbolt-to-gigabit-ethernet-adapter
The physical connections setup looks like that:
MacOS-Debugger --(USBC to Ethernet adapter)--> Ethernet cable <-- (ThunderBolt to Ethernet adapter) <-- (ThunderBolt3 to ThunderBolt2 adapter) <-- MacOS-debuggee
Generally for the debugging I used the following tutorial, which worked for VM debugging:
https://knight.sc/debugging/2018/08/15/macos-kernel-debugging.html, I didn't find the exact KDK version, but I don't think it should be the problem here
My debugger is BigSur, and my debugee is Catalina
Any ideas to what the problem may be will be helpful
Your hardware setup sounds fine. Note that you don't necessarily need a direct ethernet cable connection, you can use your normal office-/home-wide wired network, it's fine to have a switch (or even more than one) between debugger and target. The debugger machine can even be using wifi as long as it can reach the target's wired network connection that way, though it's not recommended. The Thunderbolt Ethernet interface need not be Apple branded, but its driver does need to include kernel debugging support. In practice, for example, I've successfully used the Ethernet port in a OWC brand Thunderbolt Dock as well. Using one of Apple's own adapters of course guarantees it will work.
If the boot-args on your target machine are the same as what you used in the VM, that's probably where your problem is coming from. You should specify the device to be used for kernel debugging, using the kdp_match_name= option. Use the ifconfig command in the Terminal to work out which of the listed devices is your Thunderbolt ethernet adapter (enX), possibly based on the IP address. en0 is typically wifi in Mac laptops, so you're usually looking for X > 0.
So you'll end up with something like kdp_match_name=en1 added to your boot-args. Make sure to reboot the machine cleanly before attempting a debugging session after updating the boot-args setting.
A few more comments:
kext-dev-mode=1
This option no longer has any effect. It only existed in OS X 10.10. You can remove it.
I didn't find the exact KDK version, but I don't think it should be the problem here
Having a KDK version that doesn't match the target's exact kernel binary UUID will not prevent a connection, but it will prevent you from doing any meaningful debugging as the memory layout of threads etc. will not be available.
My debugger is Big Sur, and my debuggee is Catalina
If you ever run Big Sur on your target, make sure to add wdt=-1 to your boot-args or the hung/crashed machine will reboot before you get a chance to connect with the debugger.

USB Serial reset every 15 minutes [Win 10]

I am developing on an ARM Mbed board which connects to my Windows laptop over USB. I've just moved to a new Dell laptop running Win 10 [from a Dell laptop running Win 7] and I find that the laptop resets my development board every 15 minutes.
There are two things that will cause the ARM Mbed board to reset:
powering down/up the USB connection
sending "break" via the USB serial driver.
When the reset occurs there is nothing of note in the Windows event logs. I have all of the "allow Windows to power me down" boxes unticked on the USB hubs in System devices and in the Control Panel power management options.
Does anyone have any suggestions on how I (a) debug what's going on or (b) fix/workaround the problem? I've not yet tried connecting via a powered USB hub, will do that next...
I had the same issue using a FRDM-K64F running mBed and communicating over a USB COM port to a Windows 7 Dell machine. The communication would sometimes drop out. As #Rob suggested, uninstalling the Dell Support Assist Agent completely fixed the issue.
Just adding this answer as it was very difficult to find any information using google.
Another note in support of this solution for google...
I have a Dell 5480 running Windows 10, and started using from ST Nucleo boards on it. I've used the exact same boards at work, with no problems. Every 15minutes or so the board was reset.
I tried disabling the Dell Support Assist services but this did not seem to fix the problem.
Removing the programs did make the Nucleo work.

Drivers installation problems (Acer Aspire Switch 10E)

My laptop model is SW3-16-15TV, I installed windows 10 home on it and I don't have sound, wi-fi, and other features... I found drivers for it here https://www.acer.com/ac/en/US/content/support-product/6460?b=1 . I download only this driver https://i.stack.imgur.com/8JXTL.png because contains all other drivers. I tried to install other drivers one by one but I can't. Some of them throw errors and some of them installed but nothing happend. For example I installed audio driver, but after I reboot my pc I don't have sound and the same problem. I entered in BIOS and from there I found laptop serial number and searched that drivers... When I want to run Platform Drivers Installer it throw me this error:
a system reboot is required to rollback changes made
I didn't know why it throw me this error :(
I found the how to fix drivers! Device Manager -> uninstalled driver (with yellow or red attention sign). Click on Browse my computer for... -> Browse driver path, check that checkbox and click Next !

Shutdown message while running the program in Cocos2d for MacOS X

Currently i'm developing a Cocos2d application for Mac OS X using xCode 4.2.1.So my problem is,sometimes while running the program the system get's stuck and show me a message like this- You need to restart your computer.Hold down the power button until it turns off.Then press the power button again. After receiving this message i can't proceed further without restarting the computer. What might be the problem behind this issue. Can anyone help me out.
What You get is called a kernel panic.
Resolution
Restart your Mac with a Safe Boot and see if the kernel panic happens
again
In most cases, kernel panics are not caused by an issue with your Mac.
They are most likely caused by an issue external to your Mac. If the
kernel panic doesn't happen again within a few weeks, you don't need
to troubleshoot further.
Depending on the model of Mac you have, restart one of these ways:
• Press and hold the Power button for several seconds to turn off your Mac. Then, press the Power button to startup your Mac.
• If you have a Restart button, press it.
As soon as your Mac starts up, hold down the Shift key to start up with a Safe Boot into Safe Mode. Note: If you are using a third-party
external keyboard and cannot start with a Safe Boot, try using an
Apple keyboard instead.
If your Mac has a kernel panic starting up, or while in Safe Mode, jump to the "Troubleshooting a recurring kernel panic" section of this
article.
If your Mac starts up without a kernel panic after a Safe Boot, restart your Mac by choosing Apple Menu > Restart…, then let it start
up normally. Run Software Update and install all available updates
until Software Update reports "Your software is up to date". Mac OS X
updates improve the tolerance for external issues such as malformed
network packets. For most kernel panics, this is all you have to do.
Note: It is possible, although very unlikely, that something on your network is sending your Mac malformed network packets which could cause recurring kernel panics. If the hardware and software on your Mac checks out as OK, check the devices on your network. Make sure your router's firmware is up-to-date, and that the router is not malfunctioning. Refer to your router's manufacturer for service and support.
And You also can try to find the problem in kernel.log. Go to the console app in the utilities folder and then type this:
tail -f /var/log/kernel.log
It will print kernel.log file to Your console.
More information:
Kernel Logs from the Command Line in Mac OS X.
How to log a kernel panic.
Kernel Panic.

Resources