How to get Xboot to make and compile using winxp

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After spending hours trying to get bandtanks bootloader to work I decided to also give xboot a try. I read the instructions and it all seemed easy until I tried the make instruction. (this was after I copied the file into the same directory as the makefile)

Quote:
Then type "make [file].conf.mk". This will copy [file].conf.mk to config.mk,
generate config.h, compile the whole package, and generate xboot.hex, which
can be downloaded with any programming cable capable of programming AVR chips

And winxp spat out
Quote:
F:\Projects\XMega_Boot\xboot>make x64a3u.conf.mk
The system cannot find the path specified.
cp x64a3u.conf.mk config.mk
process_begin: CreateProcess(NULL, cp x64a3u.conf.mk config.mk, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [x64a3u.conf.mk] Error 2

After trying all sorts of changes I could only wonder why is it that so far the bootloaders I have used that work are all the ones without source code. All of those with source seem to have been written by people using Linux and are posted with instructions that dont work in windows. I then search On freaks to find people with similar problems who eventualy get it right but then dont show the rest of the world what they did to get it right... end of rant :cry:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well your first job is to resolve "The system cannot find the path specified. ". You need to work out what path it cannot find. make has a number of debug options that you see if you just type "make -?", things like "make -d". This will show you what make is "thinking" and the commands it is trying to execute. Hopefully that will lead you to where the problem lies.

If it is "cp x64a3u.conf.mk config.mk" that it is complaining about then it's because DOS does not have a "cp" command. The DOS equivalent is "copy". So you need to add a cp.exe to your system.

There is a package of Linux tools for Windows called gnuwin32 that will deliver things like cp.exe, grep.exe, sed.exe and other Linux tools to your system but most of us have a copy of WinAVR20100110 from the "old days" and that had a whole bunch of the gunwin32 tools in it including things like cp.exe.

So my advice is to install WinAVR. I think it gives an option during installation. Actually tell it NOT to add to your PATH as you don't want everything and you don't want its avr-gcc.exe replacing later ones you might be using. But once installed do add \Winavr20100110\utils\bin to the END of your PATH. Then things like cp.exe will be found when the make you are attempting tries to invoke them.

Another option might be to install Cywin and try the "make" from within a Cygwin shell though this installs a LOT of baggage on your PC to just deliver a small gain such as access to "cp".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the suggestions regarding the make options. The make file contains a line which I assumed is re-defining cp to copy ??:

# Define programs and commands.
SHELL = sh
CC = avr-gcc
CXX = avr-g++
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
SIZE = avr-size
NM = avr-nm
AVRDUDE = avrdude
REMOVE = rm -f
COPY = cp
WINSHELL = cmd
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did the make using -d as suggested. At the bottom of a long list of stuff it refers to the file in question, but I am not sure what it means

Considering target file `x64a3u.conf.mk'.
 Looking for an implicit rule for `x64a3u.conf.mk'.
 Trying pattern rule with stem `x64a3u'.
 Trying rule prerequisite `force'.
 Found an implicit rule for `x64a3u.conf.mk'.
  Considering target file `force'.
   File `force' does not exist.
   Finished prerequisites of target file `force'.
  Must remake target `force'.
  Successfully remade target file `force'.
 Finished prerequisites of target file `x64a3u.conf.mk'.
 Prerequisite `force' of target `x64a3u.conf.mk' does not exist.
Must remake target `x64a3u.conf.mk'.
cp x64a3u.conf.mk config.mk
CreateProcess(NULL,cp x64a3u.conf.mk config.mk,...)
process_begin: CreateProcess(NULL, cp x64a3u.conf.mk config.mk, ...) failed.
Putting child 0x00a42958 (x64a3u.conf.mk) PID 10790560 on the chain.
Live child 0x00a42958 (x64a3u.conf.mk) PID 10790560
make (e=2): The system cannot find the file specified.
Reaping losing child 0x00a42958 PID 10790560
make: *** [x64a3u.conf.mk] Error 2
Removing child 0x00a42958 PID 10790560 from chain.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

but I am not sure what it means

It is the lack of cp it is complaining about.
Quote:

which I assumed is re-defining cp to copy ??:

Not exactly. make has settable variable like bash/DOS environment variables. You may see the line:

COPY = cp 

then later:

somerule:
  $(COPY) foo bar

The first just sets "COPY" to be cp. Then the later $(COPY) invocation uses that so the rule executed is:

cp foo bar

While you might get away with:

COPY = copy

to make it use the DOS command it won't work if it passes Unix like parameters to the command and while this might fix any cp'ing being done it's possible that other Unix like tools are also used (I see "rm -f" for example) so really it's best to ensure that your DOS system has a raft of the common Unix commands installed as I suggested above (ie WinAVR).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the help. I think my time will be better spent just getting a simple bootloader up and running under windows in the ide. That is why I have been trying to get bandtanks one working because is just a basic system. I can then add whatever else I need onto it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could have a crack at writing one from scratch ;-) boot.h contains almost everything you need to implement a bootloader though admittedly I'm not sure how Xmega friendly it would be.