mraardvark / pyupdi

Python UPDI driver for programming "new" tinyAVR and megaAVR devices
MIT License
212 stars 73 forks source link

" ihex too large for flash" #60

Open shyhkaelo opened 4 years ago

shyhkaelo commented 4 years ago

I built a project and compiled it, the program used 520 bytes showed in MPLAB X IDE But when I executed pyupdi to download my code, terminal replied the information " ihex too large for flash " 截圖 2020-07-07 上午1 31 29

maciejap commented 4 years ago

Can you add here this ihex?

mraardvark commented 4 years ago

I wonder if its because MPLAB bakes the fuse values into the hexfile at a high offset...?

edenraf commented 3 years ago

A year later...did anyone find a reason for this or a fix? I have the same issue. MPLAB IDE tells me I'm using a few % and then pyupdi says its too big. I am using a mega808. I have successfully programmed using a simple blinky code. Then I started using Microchip code configurator but now it is "too big". I attached my hex (as txt) if that helps. uvsnus2.X.production.txt

mraardvark commented 3 years ago

Same thought - MPLAB is putting fuses in the hexfile at a huge offset, and pyupdi is not fuse-aware. I recommend to use pymcuprog which is properly maintained Give it a try at least: pip install pymcuprog

edenraf commented 3 years ago

Same thought - MPLAB is putting fuses in the hexfile at a huge offset, and pyupdi is not fuse-aware. I recommend to use pymcuprog which is properly maintained Give it a try at least: pip install pymcuprog

Hey thanks for the reply. I'll check it out. I am trying to simply program with it but I have no luck. Is this correct? pymcuprog write -d mega808 -t UART -u COM10 -f myfile.hex

I get the answer: Connecting to any UART pyedbglib.hidtransport.hidtransportbase - ERROR - No CMSIS-DAP devices found. Unable to connect to USB device

edenraf commented 3 years ago

Same thought - MPLAB is putting fuses in the hexfile at a huge offset, and pyupdi is not fuse-aware. I recommend to use pymcuprog which is properly maintained Give it a try at least: pip install pymcuprog

Hey thanks for the reply. I'll check it out. I am trying to simply program with it but I have no luck. Is this correct? pymcuprog write -d mega808 -t UART -u COM10 -f myfile.hex

I get the answer: Connecting to any UART pyedbglib.hidtransport.hidtransportbase - ERROR - No CMSIS-DAP devices found. Unable to connect to USB device

For anyone else facing the problem of not reading the documentation well, I did this and it worked pymcuprog ping -d atmega808 -t uart -u com10

mraardvark commented 3 years ago

ah, case sensitive...