Open fake-name opened 10 years ago
Hmm. Well, it looks like the part generating that very long command line is config.h.mk. It may be possible to rework it to avoid such a long command line. I will see what I can do about it.
Also, which shell did you run make in? Did you run it from the windows command line or from cygwin? Or did you start up a windows command line, run 'sh', and then run 'make' from within sh?
This is all using the windows cmd.exe prompt (well, I use the Console2 cmd.exe wrapper, but anyways).
The only difference between the two runs is one I specify SHELL=C:/cygwin/bin/sh.exe
in the makefile.
I couldn't get the makefile to work at all under cygwin due to %PATH%
issues.
Ideally, the makefile should work with the simplified version of make that is provided with AS.
As I understand it, AS6 comes with a version of make
that isn't quite a full version. Also, some of the commands do not work in the windows cmd.exe prompt.
Looking into the error -f was unexpected at this time.
, this is originating in the sizebefore
target.
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
Since this seems to just be a debug statement, I removed the sizebefore
and sizeafter
target statements in all
.
The build then fails partway through generating config.h
.
CreateProcess(D:\NEKOPR~2\AppData\Local\Temp\make746408-1.bat,D:\NEKOPR~2\AppData\Local\Temp\make746408-1.bat,...)
Live child 0x0254a938 (config.h) PID 39277312
"1" was unexpected at this time.
Reaping losing child 0x0254a938 PID 39277312
Cleaning up temp batch file D:\NEKOPR~2\AppData\Local\Temp\make746408-1.bat
make[1]: *** [config.h] Error 255
Removing child 0x0254a938 PID 39277312 from chain.
make[1]: Leaving directory `D:/NekoProfile/Desktop/xboot'
Reaping losing child 0x0254a7f0 PID 39277400
make: *** [x32a4.conf.mk] Error 2
Removing child 0x0254a7f0 PID 39277400 from chain.
D:\NekoProfile\Desktop\xboot>
Unfortunately, despite the fact that it failed, make
still apparently feels the need to clean up the failing temporary .bat
file, so I can't pinpoint what is causing the error.
It's probably worth noting that make clean
also fails on windows, since rm
returns an error if you try to remove a non-existent file. This makes the clean
exit prematurely.
It's also worth noting that I took the giant failed one-liner from above, and massaged it (manually) into a proper sh
script, and was able to successfully run it and generate a config.h
file, so there isn't anything theoretically wrong with it's contents.
It still fails to build, though:
-------- begin --------
avr-gcc (AVR_8_bit_GNU_Toolchain_3.4.2_992) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiling: xboot.c
avr-gcc -c -mmcu=atxmega32e5 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -fno-jump-tables -Wall -Wa,-adhlns=xboot.lst -Wstrict-prototypes -std=gnu99 -MD -MP -MF .dep/xboot.o.d -DF_CPU=32000000L -DUSE_CONFIG_H xboot.c -o xboot.o
In file included from xboot.h:398:0,
from xboot.c:34:
uart.h:86:45: warning: always_inline function might not be inlinable [-Wattributes]
uart.h:85:45: warning: always_inline function might not be inlinable [-Wattributes]
xboot.c: In function 'main':
uart.h:85:45: error: inlining failed in call to always_inline 'uart_init': function body not available
xboot.c:224:18: error: called from here
In file included from xboot.h:398:0,
from xboot.c:34:
uart.h:86:45: error: inlining failed in call to always_inline 'uart_deinit': function body not available
xboot.c:888:20: error: called from here
make: *** [xboot.o] Error 1
D:\NekoProfile\Desktop\xboot-master>
Which looks like an include issue, or the .S
file isn't being properly assembled beforehand.
If it wasn't a proper sh script, I would have noticed long ago :)
I am wondering if there is a good way to break it up into a multiline script so it will call sh once per line instead of once for a gigantic pile of concatenated lines. Unfortunately, I am attending a conference at the moment and I have not had a chance to really work on the issue.
There have been issues with always_inline in the past; I think I misunderstood how it worked as gcc isn't as smart as it could be wrt. inlining functions that are defined in different files. Try removing any always_inline statements (looks like the problematic one is in uart.h) and trying again.
I don't think the issue is the always_inline, since the trunk compiles fine on other platforms, even with the latest avr-gcc.
At the moment, I'm just using a linux-VM for my dev stuff.
Hi, I have the same problem... did you managed to fix this? Thanks, Avner
I'm trying to build xboot on windows, using a completely stock setup (just did a fresh check-out) with AS6.1.
I have all the relevant binaries on my $PATH.
I've copied the example
x32a4.conf.mk
from the conf directory into the main directory.Running
make -d x32a4.conf.mk
fails withI've been trying to poke around and fix things, but makefiles melt my brain, and I really don't know how to fix this.
I have cygwin installed locally, and I added
SHELL=C:/cygwin/bin/sh.exe
at the beginning of the makefile, but that just results in another error:Which looks like a bit much to be passing on the command line. I'd guess that in this case, the command line arguments are being truncated.
I can't just install winavr as I want to eventually try to port xboot to the xmega32e5, which isn't supported by the FOSS avr-gcc, at least without building from sources, which is also a bit beyond me.
Is there any way to build xboot as an Atmel Studio project?
Thanks.