Remap msys2 usb, fix USB port detection (#2301)
* Add AVRDUDE to MSYS2 setup * Remap detected USB port in MSYS2 to COM port
This commit is contained in:
		
							parent
							
								
									19b02bf267
								
							
						
					
					
						commit
						524053e3c0
					
				
					 2 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -183,6 +183,10 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size
 | 
			
		|||
		done; \
 | 
			
		||||
		echo ""; \
 | 
			
		||||
		echo "Detected controller on USB port at $$USB"; \
 | 
			
		||||
		if grep -q -s 'MINGW\|MSYS' /proc/version; then \
 | 
			
		||||
			USB=`echo "$$USB" | perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \
 | 
			
		||||
			echo "Remapped MSYS2 USB port to $$USB"; \
 | 
			
		||||
		fi; \
 | 
			
		||||
		sleep 1; \
 | 
			
		||||
		avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
 | 
			
		||||
	fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue