Home arrow Support arrow Forums

Luminary Micro Forums

dalewheat

Expert Boarder
Click here to see the profile of this user

2006/10/23 20:59

command line flash tool

Does a command line flash tool exist for either Windows or Linux? I am attempting to develop tool chains outside of Keil/uVision, using old-fasioned makefiles and the CodeSourcery GCC package.

Thanks

login or register to reply

LMI Eric

Moderator
Click here to see the profile of this user

2006/10/24 10:08

Re:command line flash tool

No, we don't have one available, although it may be something that we consider in the future.

login or register to reply

mthomas

Senior Boarder
Click here to see the profile of this user

2006/10/24 11:23

Re:command line flash tool

dalewheat wrote:
Does a command line flash tool exist for either Windows or Linux? I am attempting to develop tool chains outside of Keil/uVision, using old-fasioned makefiles and the CodeSourcery GCC package.

At least a possible solution for MS Windows: you can call Keil's uVision with command-line options for flash-programming. This call can be integrated in a "program-target" in the makefile. I have implemented this method in my gcc-port of the LMI-examples:

http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/index_cortex.html

Martin Thomas

login or register to reply

dalewheat

Expert Boarder
Click here to see the profile of this user

2006/10/25 17:36

Re:command line flash tool

Martin,

Thanks for the tip. I tried it and it works:

From a command line prompt:

keiluv3uv3 -f project.Uv2 -t"project_target"

...assuming you installed uVision in the default location (in the root directory - bleh). It also brings up the entire uVision GUI for the duration of the flashing.

My only question now is how to get it to flash a HEX or ELF file, instead of having to have a complete uVision project set up in parallel with a more traditional makefile-oriented project. I tried creating a dummy project containing only a HEX file but that doesn't work.

Thanks

Dale Wheat

login or register to reply

mthomas

Senior Boarder
Click here to see the profile of this user

2006/10/26 13:31

Re:command line flash tool

dalewheat wrote:
It also brings up the entire uVision GUI for the duration of the flashing.

Yes, as far as I know there is no command-line option to disable this (or it is not documented).

My only question now is how to get it to flash a HEX or ELF file, instead of having to have a complete uVision project set up in parallel with a more traditional makefile-oriented project. I tried creating a dummy project containing only a HEX file but that doesn't work.


So far I have only used the method for HEX-files. I don't know if ELF is also possible. You only need the files .uv2 and .opt created by uVision which basicly include the information about:
- target controller
- programming hardware
- programming algorithm
- file to be programmed
In the examples for the GNU-Toolchain http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/index_cortex.html
this is demonstrated: the two files are in the package and "re-used" by the makefiles.
The second part of a text I have written for another setup might help too: http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/winarmtests/h- jtag_flashing_preliminary.pdf

Martin Thomas

login or register to reply

linnix

Fresh Boarder
Click here to see the profile of this user

2007/02/21 16:59

Re:command line flash tool

Yes, openocd seems to work on Linux, but it needs a binary file on Linux.
I am working on a window tool to remote gdb the Keil hex file.
Will post it as soon as it's ready.

login or register to reply