For the majority of my projects, I write, compile, and upload through a USB connected Arduino (clone). however, every so often I need to program a raw device that doesn't have USB on it. So instead I use the ICSP pins to do that. Normally I do that by writing code in the Arduino IDE, compile it, then I will open the AS Device Programming window, load up the HEX file generated, and program the device that way. A few days ago I discovered that if I write my code in AS+VM and hit the Build (selected or solution) button in AS, and then click on Device Programming, in the Memories tab, it already has the elf file filled in for that sketch I just compiled. So I thought I could hit program right then and there ... and that's when the problems started: it doesn't work. What happens is, the device gets programmed just fine, but WHAT it's programmed with I don't know. Even if I change the selected .elf file for the .hex counter part, it's still not working. I tried a simple turn LED 13 on and off and I get nothing. To reiterate: In the Arduino IDE, I can write my code and compile it to create the needed elf or hex file. In AS, I can open Device Programming, select the generated hex file and program the raw device, no problem. If I do the same within AS+VM, I can build it to create the necessary elf and hex files, open Device Programming where the elf file is already selected for me and upload - however whatever it's uploading isn't working. Same thing if I change it to use the hex file instead. Am I doing something wrong here? I've made sure I have the proper device selected, the proper IDE version being used, fuses and lock bits are set right ... I don't know what else to look for.
|