-
Notifications
You must be signed in to change notification settings - Fork 123
Uploading: File not found #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It seems to be necessary to delete the "preferences.txt" file. |
Ok, after removing "preferences.txt" I can flash the code, but when I choose "export compiled binary" I get this "Der Sketch verwendet 126496 Bytes (48%) des Programmspeicherplatzes. Das Maximum sind 262144 Bytes. |
Damn, after closing and starting the IDE again, the first error appears again. |
Fix:
Remove:
or when you want to keep the disassembly:
Note the removed "with_bootloader" lines (which does not exist when you choose "No Bootloader" and I added a ">nul" to supress "1 file copied" output. "delete_merged_output" has been removed since with these lines the compiled code will not be copied into the sketch folder. I recommend to remove the block completely because the disassembly still exists in the temp folder and can be picked up there if required. Still testing... But looks good. Problem exists in 2,0.4 and 2.0.5 |
I'm pretty sure this is an issue with the IDE itself. I tried to reproduce this myself, and "my" IDE always used the ATtiny13/MicroCore platform.txt file when I uploaded using a programmer. I cleared the cache and removed preferences.txt, and that solved my issue. Note that if the IDE uses the MegaCore platform.txt file, there will always be a |
Aha! You'll have to make sure you chose a programmer that's bundled with MegaCore, for instance, USBasp (MegaCore). If not, it will use platform.txt from another package. In my case, I was previously working with MicroCore when I suddenly switched over to MegaCore without changing the programmer. In the preferences.txt file, the selected programmer was:
Which pretty much is the root of the problem. In your case, try selecting a programmer in the list that has MegaCore in its name: |
Clearing the cache only solved the problem one time until the IDE has been restarted and the bootloader option was switched on, compiled, and switched off again. There is definitely not always a *with_bootloader.hex file. In my case it creates no *with_bootloader.hex file when "No bootloader" is selected. When you check the platform.txt you will see that I use a STK500 programmer and definitely can reproduce the error. |
Yes, I use the MegaCore:stk500. |
btw: When I remove the ".with_bootloader" it removes the correct file (of course). So this line must be disabled (removed). The disassembly part is ok when you like an additional file in the sketch home. Otherwise the "copy" line should also be removed, the disassembly can be picked up in the temp folder. |
What IDE version are you using? I just tried to compile a sketch on both my Mac and my Windows computer using IDE 1.8.13. I'm not able to reproduce the issue. A *.with_bootloader.hex is always generated (in the temp folder, the path can be found if you look at the compiler output). Can you try to explain what I should do in order to reproduce it, and not to fix it? |
1.8.13 |
This is from 2.0.5 (and 2.0.4), taken from the repo:
Do you see the difference between "program" (with ".with_bootloader" and "upload"? So "upload" should work, but "program" does not. This is from 2.0.2 where it worked fine:
Acc. the creation of both files. Yes, I remember that I got two files a long time ago when I used the bootloader upload, but didn't get this when I used the ISP upload for a long time now. |
It's not that I don't believe you. It's just that I'd like to figure out what the root cause is; Why *.with_bootloader.hex files aren't created when you compile without bootloader. You see, *.with_bootloader.hex has a purpose. It lets you upload using your programmer without wiping the bootloader, as long as a bootloader option is selected in the Tools menu. All my cores use this file, and it has never been reported before. Does the *.with_bootloader.hex file gets generated if you select Bootloader: Yes (UART0)? |
No, when I check the logs I see that the compiler uses the option no_bootloader and uart0.
|
Here is the output with the modified files (I shortened the output a little bit, used MegaCore:avr:2560:bootloader=uart0)
|
I checked the MegaCore (with my patch) with a smaller code and I get two files now (with_bootloader and w/o). Please note that my code is 255kb big, so there is no room left for a bootloader. I think the linker will not create the file because it is not possible. I also compared the platform.txt (MegaCore) with Arduino original file and the "with_bootloader" in program.pattern is definitely wrong: |
OK, I'm able to reproduce the issue. The large sketch size is the key here. It turns out that *.with_bootloader.hex isn't generated if the compiled binary is larger than 65536 bytes. This also affects MightyCore as well. @per1234 is this a known issue with the IDE / Arduino CLI? That [sketchname.ino].with_bootloader.hex isn't generated for large sketches? |
The ".with_bootloader" part is created by "\Arduino\arduino-builder.exe". So this is why I could not be able to find it somewhere else ;) |
The bug where *.with_bootloader.hex wasn't generated has been fixed in the latest hourly build. You can download this and give it a try. From my understanding, it won't be too long before IDE 1.8.14 is released. With this, I'm probably not going to do anything about this "bug", since it's really the IDE's fault, not MegaCore. |
Agree, regarding the "Save HEX/Disassembly" part. Nevertheless In yours you have added ".with_bootloader" in |
Yes, they should; I did explain this earlier. It's there because you can upload using a programmer and still not wipe the bootloader as you do on the official boards if you have selected a bootloader option in the Tools menu (UART0..UART3). |
This IDE bug has been fixed in the latest 1.8.15 IDE version. |
vrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Users\STEPHA
1\AppData\Local\Temp\arduino_build_647158/xxx.ino.with_bootloader.hex"1\AppData\Local\Temp\arduino_build_647158/xxx.ino.with_bootloader.hex: No such file or directoryavrdude: can't open input file C:\Users\STEPHA
avrdude: read from file 'C:\Users\STEPHA~1\AppData\Local\Temp\arduino_build_647158/xxx.ino.with_bootloader.hex' failed
avrdude done. Thank you.
Bootloader is set to: No Bootloader
The text was updated successfully, but these errors were encountered: