I am creating a .elf file from Arduino for MK20DX256VLH7 and when
burning through Ulink2 via SWD mode using Keil Uversion5 its getting
downloaded properly but not getting expected result.
As I know Keil burns .axf file but .axf is also ELF format. Below
is the link kindly verify.
Kindly let me know where I am going wrong or what steps I need to
take to get the expected output.
Even I have .hex file from Arduino if in case it needed.
So use the debugger, step into the code, until you understand what
and how it is not working.
Compilers only flag syntax errors, the U-LINK is only going to
flag download errors.
Errors in functionality come down to what you're telling the
processor to do.
But When the same program if I burn through Arduino It works
I'm not exactly sure what you are trying to achieve, and with what
If I was trying to trouble-shoot a problem where the same .ELF
programmed differently between two tools, I'd look at the data that
ended up on the device in both cases, see what was different, and
then examine/analyze the .ELF to understand if the structures
contained there-in were in error or conflict with how each of the
tool chains normally generates their output.
That it "doesn't work" at this level doesn't tell me much about
what is not working, or why. Stepping through the code and seeing
what it does/doesn't do would be far more illuminating.
The Keil chain provides a SAVE function within it's debugger to
save the device content to a .HEX, and it also has a FromELF tool to
examine .ELF/.AXF files.
just I am compiling Code for teensy 3.2 which is based on
MK20DX256VLH7 in Teensyduino and trying to burn generated .elf file
through Keil via Ulink2.
Ok, and what is precluding you from stepping through the executing
code once you download it, and figuring out why it is deviating from
May be if all you are using Keil for is the ULink downloader, then
you need to discuss/review the problem with PJRC, and on their
Review the .ELF file, and its contents, with respect to what the
processor is expecting in terms of code, and code placement.
View all questions in Keil forum