![bladox.com Forum Index](t
emplates/subSilver/images/logo_phpBB.gif) |
bladox.com Turbo SIM Toolkit Adapter Forums
|
View previous topic :: View next topic |
Author |
Message |
GeorgeW Guest
|
Posted: Thu Jul 27, 2006 9:49 pm Post subject: AvrStudio 4 a kompilace |
|
|
Dobrý den,
Tak jsem si zkusil nainstalovat AvrStudio. Celkem v pohode, zalozil jsem novy projekt, dal Pager (Pager v2, Rev.03-06/04/08 ) jako hlavni a Options External Make file. Myslím, ze vice neni treba. Dam Build All a zabreci ze chybi Turbo.h vypis:
Build started 27.7.2006 at 23:41:06
Makefile:25: pager.d: No such file or directory
avr-gcc -M -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -I../../../turbo-devel/include -I. pager.c | sed 's/pager.o/& pager.d/g' >pager.d
pager.c:10:25: turbo/turbo.h: No such file or directory
avr-gcc -c -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -I../../../turbo-devel/include -I. pager.c -o pager.o
pager.c:10:25: turbo/turbo.h: No such file or directory
pager.c:22: error: syntax error before "PROGMEM"
pager.c:22: warning: type defaults to `int' in declaration of `lc_Pager'
pager.c:23: warning: implicit declaration of function `LC_EN'
atd...
Co teď s tim ![Question](images/smiles/icon_question.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
pz Guest
|
Posted: Fri Jul 28, 2006 7:04 am Post subject: |
|
|
S avrstudiem nemame zadne zkusenosti, ale zjevne je spatne to "-I../../turbo-devel/...." nastaveni cesty. Zkuste do Makefile dat absolutni nastaveni kde to mate nainstalovane, tj. treba /use/local/turbo-devel/ apod. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
GeorgeW Guest
|
Posted: Fri Jul 28, 2006 3:28 pm Post subject: |
|
|
Tak mam to v adresari C:/A-Bladox/
tak jsem tam zadal
TURBO_DIR = C:/A-Bladox/ v promene TURBO_DIR = hlavni cestu
Pod adresare
TURBO_DIR/BIN - obsahuje pager.trb
TURBO_DIR/DOC - dokumentace
TURBO_DIR/SRC - makefile, pager.d, pager.c, config.h
TURBO_DIR/ - credits, todo, makefile,
V projktu je jako default TURBO_DIR/SRC = makefile
tak ze
TRG = BIN/
SRC = pager.c
LIB =
Hm a stejne nic porad hleda turbo.h
Makefile:25: pager.d: No such file or directory
avr-gcc -M -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -IC:/A-Bladox//include -I. pager.c | sed 's/pager.o/& pager.d/g' >pager.d
pager.c:10:25: turbo/turbo.h: No such file or directory
avr-gcc -c -std=gnu99 -mmcu=atmega128 -mno-tablejump -Wimplicit-function-declaration -Os -fno-builtin -IC:/A-Bladox//include -I. pager.c -o pager.o
pager.c:10:25: turbo/turbo.h: No such file or directory
pager.c:22: error: syntax error before "PROGMEM"
pager.c:22: warning: type defaults to `int' in declaration of `lc_Pager'
atd ![Question](images/smiles/icon_question.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
GeorgeW Guest
|
Posted: Fri Jul 28, 2006 3:55 pm Post subject: |
|
|
Zpet no blbost, uz to jdu opravit
Last edited by GeorgeW on Fri Jul 28, 2006 4:21 pm; edited 1 time in total |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
pz Guest
|
Posted: Fri Jul 28, 2006 4:04 pm Post subject: |
|
|
GeorgeW wrote: | Tak jsem si pohral i s WinAvr a dopadl jsem stejne Hleda turbo.h.
Jestli jsem to pochopil spravne, tak pager.trb je knihovna turbo.h ne?
|
Ne, turbo.h a dalsi jsou v baliku turbo-devel, to co pisete je jen vlastni aplikace pager. TURBO_DIR musi ukazovat prave na turbo-devel.
http://www.bladox.com/pub/turbo-devel-040605.tar.gz |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
GeorgeW Guest
|
Posted: Mon Jan 22, 2007 10:16 am Post subject: |
|
|
Tak opet jsem nucen se pokusit upravit a prelozit TL2.
Idea: Veskere prichozi a odchozi SMS ridit externi aplikaci pomoci serioveho kanalu.
Mam hotovou ovladaci aplikaci natolik, ze mi jiz zbejva prelozit a upravit TL2. Zakladem je AMega128 a prislusne periferie. Nevyhodou u TL2 je, ze po prijeti a zpracovani SMS sepne/rozepne nejaky vstup. Pokusil jsem se i o impulzni ovladani, ale po kompletnim resetu "nevi kde mu hlava stoji" a nechtel jsem to resit ukladanim do eeprom.
Preklad: Upravil jsem tedy makefile pro WinAVR takhle:
ifndef TURBO_DIR
TURBO_DIR = c:/avr/turbo
endif
TURBO_TAG = --turbo-manifest "Version: 2.0.1 Vendor: BLADOX" #--turbo-verbose
INCDIR = $(TURBO_DIR)/include -I.
LIBDIR = $(TURBO_DIR)/lib
CC = avr-gcc
LD = avr-ld
RM = rm -f
#TRG = pager
#SRC = pager.c
TRG = $(TURBO_DIR)/project/pager/src/pager
SRC = $(TURBO_DIR)/project/pager/src/pager.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
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) *~
$(RM) $(TRG).dis
$(RM) $(TRG).elf
$(RM) $(TRG).trb
###############################################################################
# Makefile for the project Pager
###############################################################################
## General Flags
PROJECT = Pager
MCU = atmega128
TARGET = Pager.c
CC = avr-gcc.exe
## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)
## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -DF_CPU=3000000UL -Os -fsigned-char
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
## Assembly specific flags
ASMFLAGS = $(COMMON)
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
## Linker flags
LDFLAGS = $(COMMON)
LDFLAGS += -Wl,-Map=Pager.map
## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom
HEX_EEPROM_FLAGS = -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0
## Include Directories
INCLUDES = -I"C:\AVR\Turbo\include" -I"C:\AVR\Turbo\include\avr" -I"C:\AVR\Turbo\include\turbo" -I"C:\AVR\Turbo\Project\Pager\src"
## Library Directories
LIBDIRS = -L"C:\AVR\Turbo\lib"
## Objects that must be built in order to link
OBJECTS = pager.o
## Objects explicitly added by the user
LINKONLYOBJECTS =
## Build
all: $(TARGET) Pager.hex Pager.eep Pager.lss size
## Compile
pager.o: ../src/pager.c
$(CC) $(INCLUDES) $(CFLAGS) -c $<
##Link
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)
%.hex: $(TARGET)
avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
%.eep: $(TARGET)
avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@
%.lss: $(TARGET)
avr-objdump -h -S $< > $@
size: ${TARGET}
@echo
@avr-size -C --mcu=${MCU} ${TARGET}
## Other dependencies
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
/////////////////////////////////////////////////////////////////////////////////////
Tohle by melo fungovat ![Rolling Eyes](images/smiles/icon_rolleyes.gif)
Last edited by GeorgeW on Mon Jan 22, 2007 2:49 pm; edited 1 time in total |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
GeorgeW Guest
|
Posted: Mon Jan 22, 2007 10:20 am Post subject: |
|
|
Bohuzel WinAvr zahlasi toto
> "make.exe" all
Makefile:30: c:/avr/turbo/project/pager/src/pager.d: No such file or directory
avr-gcc.exe -M -mmcu=atmega128 -Wall -gdwarf-2 -DF_CPU=3000000UL -Os -fsigned-char -MD -MP -MT pager.o -MF dep/pager.d.d c:/avr/turbo/include -I. c:/avr/turbo/project/pager/src/pager.c | sed 's/c:/avr/turbo/project/pager/src/pager.o/& c:/avr/turbo/project/pager/src/pager.d/g' >c:/avr/turbo/project/pager/src/pager.d
c:/avr/turbo/project/pager/src/pager.c:13:25: turbo/turbo.h: No such file or directory
sed: -e expression #2, char 10: Unknown option to 's'
make.exe: *** [c:/avr/turbo/project/pager/src/pager.d] Error 1
> Process Exit Code: 2
> Time Taken: 00:00
atd.............
rozmisteni adresaru
cd c:\AVR\Turbo\Project\Pager\src\dep\pager.d.d
cd c:\AVR\Turbo\Project\Pager\src\dep\pager.0.d
cd c:\AVR\Turbo\Project\Pager\src\pager.c
cd c:\AVR\Turbo\Project\Pager\src\config.h
cd c:\AVR\Turbo\include\turbo\turbo.h
cd c:\AVR\Turbo\include\avr
cd c:\AVR\Turbo\lib
no stejne to nejede
dekuji za kazdy napad vedouci ke zdarne kompilaci
Last edited by GeorgeW on Mon Jan 22, 2007 2:56 pm; edited 3 times in total |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
pz Guest
|
Posted: Mon Jan 22, 2007 2:39 pm Post subject: |
|
|
GeorgeW wrote: | Tak opet jsem nucen se pokusit upravit a prelozit TL2.
Idea: Veskere prichozi a odchozi SMS ridit externi aplikaci pomoci serioveho kanalu.
Mam hotovou ovladaci aplikaci natolik, ze mi jiz zbejva prelozit a upravit TL2. Zakladem je AMega128 a prislusne periferie. Nevyhodou u TL2 je, ze po prijeti a zpracovani SMS sepne/rozepne nejaky vstup. Pokusil jsem se i o impulzni ovladani, ale po kompletnim
|
Huh? Lehce se ztracim, aplikace pager je presne o tom, aby se sepnul/rozepnul nejaky vstup. Co presne chcete udelat/docilit? Turbo Motion 2 ma RS232, viz. anglicke diskuse, nekdo tam pripojit napr. barcode reader.
Quote: |
resetu "nevi kde mu hlava stoji" a nechtel jsem to resit ukladanim do eeprom.
Preklad: Upravil jsem tedy makefile pro WinAVR takhle:
###############################################################################
# Makefile for the project Pager
###############################################################################
ifndef TURBO_DIR
TURBO_DIR = c:/avr/turbo
endif
## General Flags
PROJECT = Pager
MCU = atmega128
TARGET = Pager.c
CC = avr-gcc.exe
TRG = $(TURBO_DIR)/project/pager/src/pager
## Options common to compile, link and assembly rules
COMMON = -mmcu=$(MCU)
## Compile options common for all C compilation units.
CFLAGS = $(COMMON)
CFLAGS += -Wall -gdwarf-2 -DF_CPU=3000000UL -Os -fsigned-char
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
## Assembly specific flags
ASMFLAGS = $(COMMON)
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
## Linker flags
LDFLAGS = $(COMMON)
LDFLAGS += -Wl,-Map=Pager.map
## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom
HEX_EEPROM_FLAGS = -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0
## Include Directories
INCLUDES = -I"C:\AVR\Turbo\include" -I"C:\AVR\Turbo\include\avr" -I"C:\AVR\Turbo\include\turbo" -I"C:\AVR\Turbo\Project\Pager\src"
## Library Directories
LIBDIRS = -L"C:\AVR\Turbo\lib"
## Objects that must be built in order to link
OBJECTS = pager.o
## Objects explicitly added by the user
LINKONLYOBJECTS =
## Build
all: $(TARGET) Pager.hex Pager.eep Pager.lss size
## Compile
pager.o: $(TURBO_DIR)/project/pager/src/pager.o
$(CC) $(INCLUDES) $(CFLAGS) -c $<
##Link
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)
%.hex: $(TARGET)
avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
%.eep: $(TARGET)
avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@
%.lss: $(TARGET)
avr-objdump -h -S $< > $@
size: ${TARGET}
@echo
@avr-size -C --mcu=${MCU} ${TARGET}
## Other dependencies
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
clean:
$(RM) *.o
$(RM) *.d
$(RM) *~
$(RM) $(TRG).dis
$(RM) $(TRG).elf
$(RM) $(TRG).trb
/////////////////////////////////////////////////////////////////////////////////////
Tohle by melo fungovat ![Rolling Eyes](images/smiles/icon_rolleyes.gif) |
To ma vygenerovat kod pro nejakou vasi knostrukci nebo pro TL2? Proc ten dward? To pro TL2 asi nepujde. Proc vlastne delate vlastni Makefile?
Jiank vam tam chybi "-I. -I.../turbo" apod. includes/odkazy na headery. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
GeorgeW Guest
|
Posted: Mon Jan 22, 2007 2:55 pm Post subject: |
|
|
Jezis hrozne se omlouvam. Sem se prehlid a pastnul jsem sem vlastni make.
To puvodni make vygenerovalo AvrStudio 4.
Uz jsem to tu opravil.
prosím mrkněte se nato make je to puvodni z Turba
Mozna tam mam chybu, kterou nevidim ![Rolling Eyes](images/smiles/icon_rolleyes.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
pz Guest
|
Posted: Wed Jan 24, 2007 4:46 pm Post subject: |
|
|
A jak tedy vypada presne kompilace? Ten report co jste postnul je k tomu dwarf makefilu. Prosim poslete vystup make. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|