 |
bladox.com Turbo SIM Toolkit Adapter Forums
|
View previous topic :: View next topic |
Author |
Message |
GeorgeW Guest
|
Posted: Tue Jan 23, 2007 3:31 pm Post subject: Kompilace Turbo-devel pod Win |
|
|
Nainstaloval jsem si WinAVR a upravou make jsem se dopracoval k tomuto:
Make:
ifndef TURBO_DIR
TURBO_DIR = c:/a-avr/turbo-devel
endif
#TURBO_TAG = --turbo-manifest "Version: 1.2.3 Vendor: BLADOX" #--turbo-verbose
INCDIR = -I$(TURBO_DIR)/include -I.
LIBDIR = $(TURBO_DIR)/lib
CC = avr-gcc
LD = avr-ld
RM = rm -f
TRG = helloworld
SRC = hello_world.c
LIB =
CFLAGS = -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin
LDFLAGS = -L$(LIBDIR) -T turbo.lds -d -r --emit-relocs -R $(LIBDIR)/public_calls $(LIB) -lm -lc `avr-gcc -print-libgcc-file-name`
OBJ = $(SRC:.c=.o)
all: $(TRG).trb
include $(SRC:.c=.d)
%.o : %.c
$(CC) -c $(CFLAGS) $(INCDIR) $< -o $@
%.d: %.c
$(CC) -M $(CFLAGS) $(INCDIR) $< | sed 's/$*.o/& $@/g' >$@
$(TRG).elf: $(OBJ)
$(LD) -o $@ $(OBJ) $(LDFLAGS)
$(TRG).trb: $(TRG).elf
avr-objdump $(TURBO_TAG) --turbo $(TRG).elf <- tu mu to nesedi
dis: $(TRG).elf
avr-objdump -D --architecture=avr:5 $(TRG).elf >$(TRG).dis
install: all
cp $(TRG).trb ../bin
indent:
for X in *.[ch]; do \
indent -npsl -sob -bad -bli0 -cli2 $$X; \
done
clean:
$(RM) *.o
$(RM) *.d
$(RM) *.i
$(RM) *.s
$(RM) *~
$(RM) $(TRG).dis
$(RM) $(TRG).elf
$(RM) $(TRG).trb
musel jsem zaremovat turbo tag neb brecel
c:\WinAVR\bin\avr-objdump.exe: unrecognized option `--turbo-manifest'
Kompilace: poprve
> "make.exe" all
Makefile:25: hello_world.d: No such file or directory
avr-gcc -M -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -Ic:/a-avr/turbo-devel/include -I. hello_world.c | sed 's/hello_world.o/& hello_world.d/g' >hello_world.d
avr-gcc -c -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -Ic:/a-avr/turbo-devel/include -I. hello_world.c -o hello_world.o
avr-ld -o helloworld.elf hello_world.o -Lc:/a-avr/turbo-devel/lib -T turbo.lds -d -r --emit-relocs -R c:/a-avr/turbo-devel/lib/public_calls -lm -lc `avr-gcc -print-libgcc-file-name`
avr-objdump --turbo helloworld.elf
avr-objdump: unrecognized option `--turbo'
Usage: avr-objdump <option(s)> <file(s)>
Display information from object <file(s)>.
At least one of the following switches must be given:
-a, --archive-headers Display archive header information
-f, --file-headers Display the contents of the overall file header
-p, --private-headers Display object format specific file header contents
-h, --[section-]headers Display the contents of the section headers
-x, --all-headers Display the contents of all headers
-d, --disassemble Display assembler contents of executable sections
-D, --disassemble-all Display assembler contents of all sections
-S, --source Intermix source code with disassembly
-s, --full-contents Display the full contents of all sections requested
-g, --debugging Display debug information in object file
-e, --debugging-tags Display debug information using ctags style
-G, --stabs Display (in raw form) any STABS info in the file
-t, --syms Display the contents of the symbol table(s)
-T, --dynamic-syms Display the contents of the dynamic symbol table
-r, --reloc Display the relocation entries in the file
-R, --dynamic-reloc Display the dynamic relocation entries in the file
-v, --version Display this program's version number
-i, --info List object formats and architectures supported
-H, --help Display this information
The following switches are optional:
-b, --target=BFDNAME Specify the target object format as BFDNAME
-m, --architecture=MACHINE Specify the target architecture as MACHINE
-j, --section=NAME Only display information for section NAME
-M, --disassembler-options=OPT Pass text OPT on to the disassembler
-EB --endian=big Assume big endian format when disassembling
-EL --endian=little Assume little endian format when disassembling
--file-start-context Include context from start of file (with -S)
-I, --include=DIR Add DIR to search list for source files
-l, --line-numbers Include line numbers and filenames in output
-C, --demangle[=STYLE] Decode mangled/processed symbol names
The STYLE, if specified, can be `auto', `gnu',
`lucid', `arm', `hp', `edg', `gnu-v3', `java'
or `gnat'
-w, --wide Format output for more than 80 columns
-z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling
--start-address=ADDR Only process data whose address is >= ADDR
--stop-address=ADDR Only process data whose address is <= ADDR
--prefix-addresses Print complete address alongside disassembly
--[no-]show-raw-insn Display hex alongside symbolic disassembly
--adjust-vma=OFFSET Add OFFSET to all displayed section addresses
--special-syms Include special symbols in symbol dumps
avr-objdump: supported targets: elf32-avr coff-avr coff-ext-avr elf32-little elf32-big srec symbolsrec tekhex binary ihex
avr-objdump: supported architectures: avr avr:1 avr:2 avr:3 avr:4 avr:5
make.exe: *** [helloworld.trb] Error 1
> Process Exit Code: 2
> Time Taken: 00:00
Kompilace: podruhe
> "make.exe" all
avr-objdump --turbo helloworld.elf
avr-objdump: unrecognized option `--turbo'
Usage: avr-objdump <option(s)> <file(s)>
Display information from object <file(s)>.
At least one of the following switches must be given:
-a, --archive-headers Display archive header information
-f, --file-headers Display the contents of the overall file header
-p, --private-headers Display object format specific file header contents
-h, --[section-]headers Display the contents of the section headers
-x, --all-headers Display the contents of all headers
-d, --disassemble Display assembler contents of executable sections
-D, --disassemble-all Display assembler contents of all sections
-S, --source Intermix source code with disassembly
-s, --full-contents Display the full contents of all sections requested
-g, --debugging Display debug information in object file
-e, --debugging-tags Display debug information using ctags style
-G, --stabs Display (in raw form) any STABS info in the file
-t, --syms Display the contents of the symbol table(s)
-T, --dynamic-syms Display the contents of the dynamic symbol table
-r, --reloc Display the relocation entries in the file
-R, --dynamic-reloc Display the dynamic relocation entries in the file
-v, --version Display this program's version number
-i, --info List object formats and architectures supported
-H, --help Display this information
The following switches are optional:
-b, --target=BFDNAME Specify the target object format as BFDNAME
-m, --architecture=MACHINE Specify the target architecture as MACHINE
-j, --section=NAME Only display information for section NAME
-M, --disassembler-options=OPT Pass text OPT on to the disassembler
-EB --endian=big Assume big endian format when disassembling
-EL --endian=little Assume little endian format when disassembling
--file-start-context Include context from start of file (with -S)
-I, --include=DIR Add DIR to search list for source files
-l, --line-numbers Include line numbers and filenames in output
-C, --demangle[=STYLE] Decode mangled/processed symbol names
The STYLE, if specified, can be `auto', `gnu',
`lucid', `arm', `hp', `edg', `gnu-v3', `java'
or `gnat'
-w, --wide Format output for more than 80 columns
-z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling
--start-address=ADDR Only process data whose address is >= ADDR
--stop-address=ADDR Only process data whose address is <= ADDR
--prefix-addresses Print complete address alongside disassembly
--[no-]show-raw-insn Display hex alongside symbolic disassembly
--adjust-vma=OFFSET Add OFFSET to all displayed section addresses
--special-syms Include special symbols in symbol dumps
avr-objdump: supported targets: elf32-avr coff-avr coff-ext-avr elf32-little elf32-big srec symbolsrec tekhex binary ihex
avr-objdump: supported architectures: avr avr:1 avr:2 avr:3 avr:4 avr:5
make.exe: *** [helloworld.trb] Error 1
> Process Exit Code: 2
> Time Taken: 00:00
Takze porad je nejakej problem protoze pri prvni kompilaci nemuze najit hello_world.d a druhou to nejak zkompiluje
ale nelibi se mu `--turbo'
Na techto strankach jsem nekde cetl neco o upravene verzi avr-objdump.exe. Kde se da pripadne stahnou?
Dekuji za pripadne objasneni problemu. Clovek je odchovanej AVR Studiem a k tomuto se nedostanu v ramci amaterstiny
a koukam, ze toto zajima celkem dosti lidi: 578 A kazdymu to asi funguje bez problemu . Nebo ne? |
|
Back to top |
|
 |
pz Guest
|
Posted: Wed Jan 24, 2007 4:43 pm Post subject: |
|
|
Mate spatne (resp. standardni distribuci) binutils, avr-objdump jsme upravili aby prekladal elf do naseho trb formatu. Najdete v sekci download, soucasti turbo-devel win verze.
Tusim nekteri lidi meli na nekterych windows magicky problem tykajici se \r\n vs. \n. Pokud by turbo rvalo na spatny format tak se ozvete, mame nekde fix. Tyka se jen windows. |
|
Back to top |
|
 |
GeorgeW Guest
|
Posted: Wed Jan 24, 2007 6:23 pm Post subject: |
|
|
Diky za radu.
Nakopiroval jsem z http://www.bladox.com/pub/turbo-win32-040129.zip upraveny avr-objdump.exe do WinAvr
vysledek:
> "make.exe" all
Makefile:25: hello_world.d: No such file or directory
avr-gcc -M -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -Ic:/a-avr/turbo-devel/include -I. hello_world.c | sed 's/hello_world.o/& hello_world.d/g' >hello_world.d
avr-gcc -c -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -Ic:/a-avr/turbo-devel/include -I. hello_world.c -o hello_world.o
avr-ld -o helloworld.elf hello_world.o -Lc:/a-avr/turbo-devel/lib -T turbo.lds -d -r --emit-relocs -R c:/a-avr/turbo-devel/lib/public_calls -lm -lc `avr-gcc -print-libgcc-file-name`
avr-objdump --turbo-manifest "Version: 1.2.3 Vendor: BLADOX" --turbo helloworld.elf
Size PROGMEM: 58 RAM: 0
> Process Exit Code: 0
> Time Taken: 00:00
No jo, ale jak z teho ziskam HEX ?
A nejakej problem breci sh.exe
Exception: STATUS_ACCESS_VIOLATION at eip=71070616
eax=7FFDD000 ebx=00000000 ecx=00000000 edx=0022F518 esi=00000000 edi=00030000
ebp=0022EEDC esp=0022EEC4 program=C:\WinAVR\utils\bin\sh.exe
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
0022EEDC 71070616 (00000000, 0000001C, 00000744, 00000000)
0022F398 7102A1B9 (0022F518, 0022F51C, 0022F520, 0022F3C0)
0022F528 7102AA52 (00000000, 0A0159B0, 0A0159A8, 0022F56C)
0022F558 0041BDFE (0A015C70, 00000000, 0022F598, 00412502)
0022F598 00412550 (0A015A50, 00000000, 0A015988, FFFFFFFF)
0022F618 00411CA7 (0A0158A8, FFFFFFFF, FFFFFFFF, 00000000)
0022F678 0040E9C6 (0A015890, 00000000, FFFFFFFF, FFFFFFFF)
0022F6C8 004499BB (0A015480, 00422DC6, 00000004, 00000000)
0022F724 0042313C (0A015480, 00000000, 0022F8C4, 00426AFD)
0022F8C4 00426FDD (0A0150E8, 00000000, 00000000, 0022F92C)
0022F934 00428404 (0A0150D8, 0000001F, 0022F994, 004489EA)
0022F974 00428741 (0A014980, 0000001F, 0A014398, 710308F8)
0022F994 00429177 (0A014980, 00000000, 0022F9D4, 710308F8)
0022FA04 004115EE (0A014968, FFFFFFFF, FFFFFFFF, 00000000)
0022FA64 0040E9C6 (0A014950, 00000000, FFFFFFFF, FFFFFFFF)
0022FAB4 004499BB (0A014398, 004022F9, 00000004, 00402F6E)
End of stack trace (more stack frames may be present)
 |
|
Back to top |
|
 |
pz Guest
|
Posted: Wed Jan 24, 2007 7:07 pm Post subject: |
|
|
Tohle je ok, rika ze nejsou dependence, nasledujici prikaz je vytvori.
Quote: |
avr-gcc -M -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -Ic:/a-avr/turbo-devel/include -I. hello_world.c | sed 's/hello_world.o/& hello_world.d/g' >hello_world.d
avr-gcc -c -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -Ic:/a-avr/turbo-devel/include -I. hello_world.c -o hello_world.o
avr-ld -o helloworld.elf hello_world.o -Lc:/a-avr/turbo-devel/lib -T turbo.lds -d -r --emit-relocs -R c:/a-avr/turbo-devel/lib/public_calls -lm -lc `avr-gcc -print-libgcc-file-name`
avr-objdump --turbo-manifest "Version: 1.2.3 Vendor: BLADOX" --turbo helloworld.elf
Size PROGMEM: 58 RAM: 0
> Process Exit Code: 0
> Time Taken: 00:00
No jo, ale jak z teho ziskam HEX ?
|
Huh? hex nepotrbujute, vysledek je helloworld.trb - relokovatelny soubor pro turbo. Ten nahrajete pomoci turbo-app z turbo-cable-utils (nebo cemu v pripade ze mate turbo programmer).
Quote: |
A nejakej problem breci sh.exe
Exception: STATUS_ACCESS_VIOLATION at eip=71070616
eax=7FFDD000 ebx=00000000 ecx=00000000 edx=0022F518 esi=00000000 edi=00030000
ebp=0022EEDC esp=0022EEC4 program=C:\WinAVR\utils\bin\sh.exe
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
0022EEDC 71070616 (00000000, 0000001C, 00000744, 00000000)
0022F398 7102A1B9 (0022F518, 0022F51C, 0022F520, 0022F3C0)
0022F528 7102AA52 (00000000, 0A0159B0, 0A0159A8, 0022F56C)
0022F558 0041BDFE (0A015C70, 00000000, 0022F598, 00412502)
0022F598 00412550 (0A015A50, 00000000, 0A015988, FFFFFFFF)
0022F618 00411CA7 (0A0158A8, FFFFFFFF, FFFFFFFF, 00000000)
0022F678 0040E9C6 (0A015890, 00000000, FFFFFFFF, FFFFFFFF)
0022F6C8 004499BB (0A015480, 00422DC6, 00000004, 00000000)
0022F724 0042313C (0A015480, 00000000, 0022F8C4, 00426AFD)
0022F8C4 00426FDD (0A0150E8, 00000000, 00000000, 0022F92C)
0022F934 00428404 (0A0150D8, 0000001F, 0022F994, 004489EA)
0022F974 00428741 (0A014980, 0000001F, 0A014398, 710308F8)
0022F994 00429177 (0A014980, 00000000, 0022F9D4, 710308F8)
0022FA04 004115EE (0A014968, FFFFFFFF, FFFFFFFF, 00000000)
0022FA64 0040E9C6 (0A014950, 00000000, FFFFFFFF, FFFFFFFF)
0022FAB4 004499BB (0A014398, 004022F9, 00000004, 00402F6E)
End of stack trace (more stack frames may be present)
 |
Sam od sebe? Nebo po spusteni cehosi? |
|
Back to top |
|
 |
GeorgeW Guest
|
Posted: Wed Jan 24, 2007 10:10 pm Post subject: |
|
|
Quote: |
Huh? hex nepotrebujute, vysledek je helloworld.trb - relokovatelny soubor pro turbo. Ten nahrajete pomoci turbo-app z turbo-cable-utils (nebo cemu v pripade ze mate turbo programmer).
|
Dalsi prekazka, jednodusej to nejde? Treba pomoci JTAG rozhrani ?
Quote: |
sh.exe
Sam od sebe? Nebo po spusteni cehosi?
|
to to jsem nasel v adresari spolu s helloworld.elf . Tak nevim co se mu nelibi  |
|
Back to top |
|
 |
pz Guest
|
Posted: Sun Jan 28, 2007 1:58 pm Post subject: |
|
|
GeorgeW wrote: | Quote: |
Huh? hex nepotrebujute, vysledek je helloworld.trb - relokovatelny soubor pro turbo. Ten nahrajete pomoci turbo-app z turbo-cable-utils (nebo cemu v pripade ze mate turbo programmer).
|
Dalsi prekazka, jednodusej to nejde? Treba pomoci JTAG rozhrani ?
|
To neni prekazka, prave naopak. Uzivatele nemusi mit zadny programator, staci jen telefon s datovym kabelem. Navic je mozne aplikace prihravat v libovolnem poradi, aplikace jsou relokovatelne.
Quote: |
Quote: |
sh.exe
Sam od sebe? Nebo po spusteni cehosi?
|
to to jsem nasel v adresari spolu s helloworld.elf . Tak nevim co se mu nelibi  |
Smeti, ignorujte. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|