I have the Atmel ICE 7.0 studio installed and able to use the atprogram command line option to program my AVR board. I am now looking for a way to automate the process using C++ and not have to startup a StudioCommandPrompt and then call a batch file or enter each line to program my AVR device. Is there any URL to documentation to call the function directly or calling the atprogram within my C++ program.
Calling atprogram from a C++ program
Don't you just use std::system() or execve() or execl() or similar?
If you want to catch the stdout/stderr output then consider popen().
(while a dedicated C junkie if I want to write this kind of wrapper in this day and age I'd choose Python not C - it has all the popen() kind of stuff wrapped in the subprocess() class)
My current platform is Windows 7 64bit, I would be using system() for the call.
Then you already know the answer? In which case I must be missing the subtlety of what it is you are actually asking here?
I'm trying to call the atprogram directly without having to start the Studio Command Prompt shell to execute the atprogram code.
I'm sure I just missing some directory path to have my C++ program do the call.
${install dir}/atbackend/atprogram.exe ?
I have to agree with cliff, C++ seems like an odd choice...
Yes, the "${install dir}/atbackend/atprogram.exe ?" was the piece I needed to get everything working. thanks you for all the help.
Has AS7 lost the ability to program the chip directly like AS4 did without all that messing around?
Yep looks like it's gone, so much for progress. (ie Write Flash Memory Using Current Settings)
Are you looking for start without debugging? (Yes- it's not an intuitive name)