/programy/C/DSC/test/test/main.c |
---|
0,0 → 1,20 |
/* metrowerks sample code */ |
int main(void) |
{ |
int a=0, b = 3, c = 0; |
a++; |
c = a +b; |
return 0; |
} |
/programy/C/PIC_C/test/C16F873/blik/main.c |
---|
20,12 → 20,12 |
{ |
output_c(ble++); |
delay_ms(100); |
/* |
Output_high(PIN_B2); |
Delay_ms(100); |
Output_low(PIN_B2); |
Delay_ms(100); |
*/ |
} |
} |
/programy/C/PIC_C/test/C16F876A/blik/blik.PJT |
---|
10,7 → 10,7 |
LinkerScript= |
[Target Data] |
FileList=D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.c |
FileList=D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.c |
BuildTool=C-COMPILER |
OptionString=+FM |
AdditionalOptionString= |
35,4 → 35,4 |
2= |
[Units] |
Count=1 |
1=D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.c (main) |
1=D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.c (main) |
/programy/C/PIC_C/test/C16F876A/blik/blik.cof |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programy/C/PIC_C/test/C16F876A/blik/blik.lst |
---|
1,6 → 1,6 |
CCS PCM C Compiler, Version 3.245, 27853 23-II-07 18:50 |
CCS PCM C Compiler, Version 3.245, 27853 29-VI-08 23:25 |
Filename: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.lst |
Filename: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.lst |
ROM used: 114 words (1%) |
Largest free fragment is 2048 |
/programy/C/PIC_C/test/C16F876A/blik/blik.sta |
---|
10,8 → 10,8 |
Lines Stmts % Files |
----- ----- --- ----- |
25 14 100 D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.c |
16 0 0 D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.h |
25 14 100 D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.c |
16 0 0 D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.h |
270 0 0 C:\Program Files\PICC\devices\16F876A.h |
----- ----- |
622 28 Total |
/programy/C/PIC_C/test/C16F876A/blik/blik.sym |
---|
21,12 → 21,12 |
0017 @cinit |
Project Files: |
D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.c |
D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.h |
D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.c |
D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.h |
C:\Program Files\PICC\devices\16F876A.h |
Units: |
D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.c (main) |
D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.c (main) |
Compiler Settings: |
Processor: PIC16F876A |
36,10 → 36,10 |
Short,Int,Long: 1,8,16 |
Output Files: |
Errors: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.err |
INHX8: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.hex |
Symbols: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.sym |
List: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.lst |
Debug/COFF: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.cof |
Call Tree: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.tre |
Statistics: D:\KAKLIK\projekty\programy\PIC_C\test\C16F876A\blik\blik.sta |
Errors: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.err |
INHX8: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.hex |
Symbols: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.sym |
List: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.lst |
Debug/COFF: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.cof |
Call Tree: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.tre |
Statistics: D:\KAKLIK\projekty\programy\C\PIC_C\test\C16F876A\blik\blik.sta |
/programy/C/avr/Blik/prg_fusebit_uc |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/programy/C/avr/Blik/avrm8ledtest.c |
---|
File deleted |
/programy/C/avr/Blik/avrm8ledtest.hex |
---|
File deleted |
/programy/C/avr/Blik/avrm8ledtest.out |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/programy/C/avr/Blik/prg_read_uc |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/programy/C/avr/Blik/README.txt |
---|
File deleted |
/programy/C/avr/Blik/avrm8ledtest_pre.hex |
---|
File deleted |
/programy/C/avr/Blik/Makefile |
---|
File deleted |
/programy/C/avr/Blik/prg_load_uc |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/programy/C/avr/Blik/avrm8ledtest.map |
---|
File deleted |
/programy/C/avr/tests/ATmega168/blik.aps |
---|
0,0 → 1,0 |
<AVRStudio><MANAGEMENT><ProjectName>blik</ProjectName><Created>27-Apr-2008 12:47:54</Created><LastEdit>27-Apr-2008 12:57:13</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>27-Apr-2008 12:47:54</Created><Version>4</Version><Build>4, 14, 0, 589</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\blik.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>D:\KAKLIK\projekty\programy\C\avr\tests\ATmega168\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>ICE50</CURRENT_TARGET><CURRENT_PART>ATmega168.xml</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>blik.c</SOURCEFILE><OTHERFILE>default\blik.lss</OTHERFILE><OTHERFILE>default\blik.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega168</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>blik.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\Program Files\WinAVR\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\Program Files\WinAVR\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files><File00000><FileId>00000</FileId><FileName>blik.c</FileName><Status>1</Status></File00000></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> |
/programy/C/avr/tests/ATmega168/blik.aws |
---|
0,0 → 1,0 |
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA168"/><Files><File00000 Name="D:\KAKLIK\projekty\programy\C\avr\tests\ATmega168\blik.c" Position="216 71 1051 588" LineCol="3 0" State="Maximized"/></Files></AVRWorkspace> |
/programy/C/avr/tests/ATmega168/default/Makefile |
---|
0,0 → 1,75 |
############################################################################### |
# Makefile for the project blik |
############################################################################### |
## General Flags |
PROJECT = blik |
MCU = atmega168 |
TARGET = blik.elf |
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 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d |
## Assembly specific flags |
ASMFLAGS = $(COMMON) |
ASMFLAGS += $(CFLAGS) |
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 |
## Linker flags |
LDFLAGS = $(COMMON) |
LDFLAGS += -Wl,-Map=blik.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 --no-change-warnings |
## Objects that must be built in order to link |
OBJECTS = blik.o |
## Objects explicitly added by the user |
LINKONLYOBJECTS = |
## Build |
all: $(TARGET) blik.hex blik.eep blik.lss size |
## Compile |
blik.o: ../blik.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 $< $@ || exit 0 |
%.lss: $(TARGET) |
avr-objdump -h -S $< > $@ |
size: ${TARGET} |
@echo |
@avr-size -C --mcu=${MCU} ${TARGET} |
## Clean target |
.PHONY: clean |
clean: |
-rm -rf $(OBJECTS) blik.elf dep/* blik.hex blik.eep blik.lss blik.map |
## Other dependencies |
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) |
/programy/C/avr/tests/ATmega168/default/blik.elf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programy/C/avr/tests/ATmega168/default/blik.hex |
---|
0,0 → 1,15 |
:100000000C9434000C944F000C944F000C944F004F |
:100010000C944F000C944F000C944F000C944F0024 |
:100020000C944F000C944F000C944F000C944F0014 |
:100030000C944F000C944F000C944F000C944F0004 |
:100040000C944F000C944F000C944F000C944F00F4 |
:100050000C944F000C944F000C944F000C944F00E4 |
:100060000C944F000C944F0011241FBECFEFD4E02E |
:10007000DEBFCDBF11E0A0E0B1E0E4EDF0E002C0F2 |
:1000800005900D92A030B107D9F711E0A0E0B1E0E2 |
:1000900001C01D92A030B107E1F70C945E000C94F2 |
:1000A00000009C01E0E8F7E005C0CF010197F1F7FF |
:1000B0002150304021153105C1F708953D9A4598EA |
:1000C00082E390E00E945100459A82E390E00E9412 |
:0400D0005100F5CF17 |
:00000001FF |
/programy/C/avr/tests/ATmega168/default/blik.lss |
---|
0,0 → 1,162 |
blik.elf: file format elf32-avr |
Sections: |
Idx Name Size VMA LMA File off Algn |
0 .text 000000d4 00000000 00000000 00000054 2**1 |
CONTENTS, ALLOC, LOAD, READONLY, CODE |
1 .stab 0000036c 00000000 00000000 00000128 2**2 |
CONTENTS, READONLY, DEBUGGING |
2 .stabstr 00000084 00000000 00000000 00000494 2**0 |
CONTENTS, READONLY, DEBUGGING |
3 .debug_aranges 00000020 00000000 00000000 00000518 2**0 |
CONTENTS, READONLY, DEBUGGING |
4 .debug_pubnames 00000028 00000000 00000000 00000538 2**0 |
CONTENTS, READONLY, DEBUGGING |
5 .debug_info 0000013d 00000000 00000000 00000560 2**0 |
CONTENTS, READONLY, DEBUGGING |
6 .debug_abbrev 000000d3 00000000 00000000 0000069d 2**0 |
CONTENTS, READONLY, DEBUGGING |
7 .debug_line 000000fc 00000000 00000000 00000770 2**0 |
CONTENTS, READONLY, DEBUGGING |
8 .debug_frame 00000030 00000000 00000000 0000086c 2**0 |
CONTENTS, READONLY, DEBUGGING |
9 .debug_str 000000dd 00000000 00000000 0000089c 2**0 |
CONTENTS, READONLY, DEBUGGING |
10 .debug_loc 00000028 00000000 00000000 00000979 2**0 |
CONTENTS, READONLY, DEBUGGING |
Disassembly of section .text: |
00000000 <__vectors>: |
0: 0c 94 34 00 jmp 0x68 ; 0x68 <__ctors_end> |
4: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
8: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
c: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
10: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
14: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
18: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
1c: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
20: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
24: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
28: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
2c: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
30: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
34: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
38: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
3c: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
40: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
44: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
48: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
4c: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
50: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
54: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
58: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
5c: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
60: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
64: 0c 94 4f 00 jmp 0x9e ; 0x9e <__bad_interrupt> |
00000068 <__ctors_end>: |
68: 11 24 eor r1, r1 |
6a: 1f be out 0x3f, r1 ; 63 |
6c: cf ef ldi r28, 0xFF ; 255 |
6e: d4 e0 ldi r29, 0x04 ; 4 |
70: de bf out 0x3e, r29 ; 62 |
72: cd bf out 0x3d, r28 ; 61 |
00000074 <__do_copy_data>: |
74: 11 e0 ldi r17, 0x01 ; 1 |
76: a0 e0 ldi r26, 0x00 ; 0 |
78: b1 e0 ldi r27, 0x01 ; 1 |
7a: e4 ed ldi r30, 0xD4 ; 212 |
7c: f0 e0 ldi r31, 0x00 ; 0 |
7e: 02 c0 rjmp .+4 ; 0x84 <.do_copy_data_start> |
00000080 <.do_copy_data_loop>: |
80: 05 90 lpm r0, Z+ |
82: 0d 92 st X+, r0 |
00000084 <.do_copy_data_start>: |
84: a0 30 cpi r26, 0x00 ; 0 |
86: b1 07 cpc r27, r17 |
88: d9 f7 brne .-10 ; 0x80 <.do_copy_data_loop> |
0000008a <__do_clear_bss>: |
8a: 11 e0 ldi r17, 0x01 ; 1 |
8c: a0 e0 ldi r26, 0x00 ; 0 |
8e: b1 e0 ldi r27, 0x01 ; 1 |
90: 01 c0 rjmp .+2 ; 0x94 <.do_clear_bss_start> |
00000092 <.do_clear_bss_loop>: |
92: 1d 92 st X+, r1 |
00000094 <.do_clear_bss_start>: |
94: a0 30 cpi r26, 0x00 ; 0 |
96: b1 07 cpc r27, r17 |
98: e1 f7 brne .-8 ; 0x92 <.do_clear_bss_loop> |
9a: 0c 94 5e 00 jmp 0xbc ; 0xbc <main> |
0000009e <__bad_interrupt>: |
9e: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> |
000000a2 <delay_ms>: |
void delay_ms(unsigned int ms) |
/* delay for a minimum of <ms> */ |
{ |
a2: 9c 01 movw r18, r24 |
a4: e0 e8 ldi r30, 0x80 ; 128 |
a6: f7 e0 ldi r31, 0x07 ; 7 |
a8: 05 c0 rjmp .+10 ; 0xb4 <delay_ms+0x12> |
*/ |
void |
_delay_loop_2(uint16_t __count) |
{ |
__asm__ volatile ( |
aa: cf 01 movw r24, r30 |
ac: 01 97 sbiw r24, 0x01 ; 1 |
ae: f1 f7 brne .-4 ; 0xac <delay_ms+0xa> |
// we use a calibrated macro. This is more |
// accurate and not so much compiler dependent |
// as self made code. |
while(ms){ |
_delay_ms(0.96); |
ms--; |
b0: 21 50 subi r18, 0x01 ; 1 |
b2: 30 40 sbci r19, 0x00 ; 0 |
b4: 21 15 cp r18, r1 |
b6: 31 05 cpc r19, r1 |
b8: c1 f7 brne .-16 ; 0xaa <delay_ms+0x8> |
ba: 08 95 ret |
000000bc <main>: |
} |
} |
/* new style */ |
int main(void) |
{ |
bc: 3d 9a sbi 0x07, 5 ; 7 |
/* INITIALIZE */ |
/* enable PC5 as output */ |
DDRC|= (1<<DDC5); |
/* PC5 is 5 (see file include/avr/iom8.h) and 1<<PC5 is 00100000 |
* This can also be written as _BV(PC5)*/ |
while (1) { |
/* led on, pin=0 */ |
PORTC &= ~(1<<PC5); |
be: 45 98 cbi 0x08, 5 ; 8 |
delay_ms(50); |
c0: 82 e3 ldi r24, 0x32 ; 50 |
c2: 90 e0 ldi r25, 0x00 ; 0 |
c4: 0e 94 51 00 call 0xa2 ; 0xa2 <delay_ms> |
/* set output to 5V, LED off */ |
PORTC|= (1<<PC5); |
c8: 45 9a sbi 0x08, 5 ; 8 |
delay_ms(50); |
ca: 82 e3 ldi r24, 0x32 ; 50 |
cc: 90 e0 ldi r25, 0x00 ; 0 |
ce: 0e 94 51 00 call 0xa2 ; 0xa2 <delay_ms> |
d2: f5 cf rjmp .-22 ; 0xbe <main+0x2> |
/programy/C/avr/tests/ATmega168/default/blik.map |
---|
0,0 → 1,347 |
Archive member included because of file (symbol) |
c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_copy_data.o) |
blik.o (__do_copy_data) |
c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_clear_bss.o) |
blik.o (__do_clear_bss) |
Discarded input sections |
.stabstr 0x00000000 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00020000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
Address of section .data set to 0x800100 |
LOAD c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
LOAD blik.o |
LOAD c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a |
LOAD c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5\libc.a |
LOAD c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0xd4 |
*(.vectors) |
.vectors 0x00000000 0x68 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
0x00000000 __vectors |
0x00000000 __vector_default |
*(.vectors) |
*(.progmem.gcc*) |
*(.progmem*) |
0x00000068 . = ALIGN (0x2) |
0x00000068 __trampolines_start = . |
*(.trampolines) |
.trampolines 0x00000068 0x0 linker stubs |
*(.trampolines*) |
0x00000068 __trampolines_end = . |
*(.jumptables) |
*(.jumptables*) |
*(.lowtext) |
*(.lowtext*) |
0x00000068 __ctors_start = . |
*(.ctors) |
0x00000068 __ctors_end = . |
0x00000068 __dtors_start = . |
*(.dtors) |
0x00000068 __dtors_end = . |
SORT(*)(.ctors) |
SORT(*)(.dtors) |
*(.init0) |
.init0 0x00000068 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
0x00000068 __init |
*(.init0) |
*(.init1) |
*(.init1) |
*(.init2) |
.init2 0x00000068 0xc c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
*(.init2) |
*(.init3) |
*(.init3) |
*(.init4) |
.init4 0x00000074 0x16 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_copy_data.o) |
0x00000074 __do_copy_data |
.init4 0x0000008a 0x10 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_clear_bss.o) |
0x0000008a __do_clear_bss |
*(.init4) |
*(.init5) |
*(.init5) |
*(.init6) |
*(.init6) |
*(.init7) |
*(.init7) |
*(.init8) |
*(.init8) |
*(.init9) |
.init9 0x0000009a 0x4 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
*(.init9) |
*(.text) |
.text 0x0000009e 0x4 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
0x0000009e __vector_22 |
0x0000009e __vector_1 |
0x0000009e __vector_24 |
0x0000009e __vector_12 |
0x0000009e __bad_interrupt |
0x0000009e __vector_6 |
0x0000009e __vector_3 |
0x0000009e __vector_23 |
0x0000009e __vector_25 |
0x0000009e __vector_11 |
0x0000009e __vector_13 |
0x0000009e __vector_17 |
0x0000009e __vector_19 |
0x0000009e __vector_7 |
0x0000009e __vector_5 |
0x0000009e __vector_4 |
0x0000009e __vector_9 |
0x0000009e __vector_2 |
0x0000009e __vector_21 |
0x0000009e __vector_15 |
0x0000009e __vector_8 |
0x0000009e __vector_14 |
0x0000009e __vector_10 |
0x0000009e __vector_16 |
0x0000009e __vector_18 |
0x0000009e __vector_20 |
.text 0x000000a2 0x32 blik.o |
0x000000bc main |
0x000000a2 delay_ms |
.text 0x000000d4 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_copy_data.o) |
.text 0x000000d4 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_clear_bss.o) |
0x000000d4 . = ALIGN (0x2) |
*(.text.*) |
.text.libgcc 0x000000d4 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_copy_data.o) |
.text.libgcc 0x000000d4 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_clear_bss.o) |
0x000000d4 . = ALIGN (0x2) |
*(.fini9) |
*(.fini9) |
*(.fini8) |
*(.fini8) |
*(.fini7) |
*(.fini7) |
*(.fini6) |
*(.fini6) |
*(.fini5) |
*(.fini5) |
*(.fini4) |
*(.fini4) |
*(.fini3) |
*(.fini3) |
*(.fini2) |
*(.fini2) |
*(.fini1) |
*(.fini1) |
*(.fini0) |
*(.fini0) |
0x000000d4 _etext = . |
.data 0x00800100 0x0 load address 0x000000d4 |
0x00800100 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800100 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
.data 0x00800100 0x0 blik.o |
.data 0x00800100 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_copy_data.o) |
.data 0x00800100 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_clear_bss.o) |
*(.data*) |
*(.rodata) |
*(.rodata*) |
*(.gnu.linkonce.d*) |
0x00800100 . = ALIGN (0x2) |
0x00800100 _edata = . |
0x00800100 PROVIDE (__data_end, .) |
.bss 0x00800100 0x0 |
0x00800100 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800100 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
.bss 0x00800100 0x0 blik.o |
.bss 0x00800100 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_copy_data.o) |
.bss 0x00800100 0x0 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/avr5\libgcc.a(_clear_bss.o) |
*(.bss*) |
*(COMMON) |
0x00800100 PROVIDE (__bss_end, .) |
0x000000d4 __data_load_start = LOADADDR (.data) |
0x000000d4 __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x00800100 0x0 |
0x00800100 PROVIDE (__noinit_start, .) |
*(.noinit*) |
0x00800100 PROVIDE (__noinit_end, .) |
0x00800100 _end = . |
0x00800100 PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.stab 0x00000000 0x36c |
*(.stab) |
.stab 0x00000000 0x36c c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
.stabstr 0x00000000 0x84 |
*(.stabstr) |
.stabstr 0x00000000 0x84 c:/program files/winavr/bin/../lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/crtm168.o |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges 0x00000000 0x20 |
*(.debug_aranges) |
.debug_aranges |
0x00000000 0x20 blik.o |
.debug_pubnames |
0x00000000 0x28 |
*(.debug_pubnames) |
.debug_pubnames |
0x00000000 0x28 blik.o |
.debug_info 0x00000000 0x13d |
*(.debug_info) |
.debug_info 0x00000000 0x13d blik.o |
*(.gnu.linkonce.wi.*) |
.debug_abbrev 0x00000000 0xd3 |
*(.debug_abbrev) |
.debug_abbrev 0x00000000 0xd3 blik.o |
.debug_line 0x00000000 0xfc |
*(.debug_line) |
.debug_line 0x00000000 0xfc blik.o |
.debug_frame 0x00000000 0x30 |
*(.debug_frame) |
.debug_frame 0x00000000 0x30 blik.o |
.debug_str 0x00000000 0xdd |
*(.debug_str) |
.debug_str 0x00000000 0xdd blik.o |
0x11a (size before relaxing) |
.debug_loc 0x00000000 0x28 |
*(.debug_loc) |
.debug_loc 0x00000000 0x28 blik.o |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(blik.elf elf32-avr) |
LOAD linker stubs |
/programy/C/avr/tests/ATmega168/default/blik.o |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programy/C/avr/tests/ATmega168/default/dep/blik.o.d |
---|
0,0 → 1,27 |
blik.o: ../blik.c c:/program\ files/winavr/bin/../avr/include/avr/io.h \ |
c:/program\ files/winavr/bin/../avr/include/avr/sfr_defs.h \ |
c:/program\ files/winavr/bin/../avr/include/inttypes.h \ |
c:/program\ files/winavr/bin/../avr/include/stdint.h \ |
c:/program\ files/winavr/bin/../avr/include/avr/iom168.h \ |
c:/program\ files/winavr/bin/../avr/include/avr/iomx8.h \ |
c:/program\ files/winavr/bin/../avr/include/avr/portpins.h \ |
c:/program\ files/winavr/bin/../avr/include/avr/version.h \ |
c:/program\ files/winavr/bin/../avr/include/util/delay.h |
c:/program\ files/winavr/bin/../avr/include/avr/io.h: |
c:/program\ files/winavr/bin/../avr/include/avr/sfr_defs.h: |
c:/program\ files/winavr/bin/../avr/include/inttypes.h: |
c:/program\ files/winavr/bin/../avr/include/stdint.h: |
c:/program\ files/winavr/bin/../avr/include/avr/iom168.h: |
c:/program\ files/winavr/bin/../avr/include/avr/iomx8.h: |
c:/program\ files/winavr/bin/../avr/include/avr/portpins.h: |
c:/program\ files/winavr/bin/../avr/include/avr/version.h: |
c:/program\ files/winavr/bin/../avr/include/util/delay.h: |
/programy/C/avr/tests/ATmega168/uart/default/Makefile |
---|
0,0 → 1,78 |
############################################################################### |
# Makefile for the project main |
############################################################################### |
## General Flags |
PROJECT = main |
MCU = atmega168 |
TARGET = main.elf |
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 -std=gnu99 -DF_CPU=14318180UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d |
## Assembly specific flags |
ASMFLAGS = $(COMMON) |
ASMFLAGS += $(CFLAGS) |
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 |
## Linker flags |
LDFLAGS = $(COMMON) |
LDFLAGS += -Wl,-Map=main.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 --no-change-warnings |
## Objects that must be built in order to link |
OBJECTS = main.o uart.o |
## Objects explicitly added by the user |
LINKONLYOBJECTS = |
## Build |
all: $(TARGET) main.hex main.eep main.lss size |
## Compile |
main.o: ../main.c |
$(CC) $(INCLUDES) $(CFLAGS) -c $< |
uart.o: ../uart.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 $< $@ || exit 0 |
%.lss: $(TARGET) |
avr-objdump -h -S $< > $@ |
size: ${TARGET} |
@echo |
@avr-size -C --mcu=${MCU} ${TARGET} |
## Clean target |
.PHONY: clean |
clean: |
-rm -rf $(OBJECTS) main.elf dep/* main.hex main.eep main.lss main.map |
## Other dependencies |
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*) |
/programy/C/avr/tests/ATmega168/uart/default/main.elf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programy/C/avr/tests/ATmega168/uart/main.aps |
---|
0,0 → 1,0 |
<AVRStudio><MANAGEMENT><ProjectName>main</ProjectName><Created>27-Apr-2008 13:39:11</Created><LastEdit>27-Apr-2008 15:20:23</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>27-Apr-2008 13:39:11</Created><Version>4</Version><Build>4, 14, 0, 589</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\main.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>D:\KAKLIK\projekty\programy\C\avr\tests\ATmega168\uart\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>ICE50</CURRENT_TARGET><CURRENT_PART>ATmega168.xml</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>main.c</SOURCEFILE><SOURCEFILE>uart.c</SOURCEFILE><HEADERFILE>uart.h</HEADERFILE><OTHERFILE>default\main.lss</OTHERFILE><OTHERFILE>default\main.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega168</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>main.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -DF_CPU=14318180UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\Program Files\WinAVR\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\Program Files\WinAVR\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files><File00000><FileId>00000</FileId><FileName>main.c</FileName><Status>1</Status></File00000><File00001><FileId>00001</FileId><FileName>uart.c</FileName><Status>1</Status></File00001><File00002><FileId>00002</FileId><FileName>uart.h</FileName><Status>1</Status></File00002></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> |
/programy/C/avr/tests/ATmega168/uart/main.aws |
---|
0,0 → 1,0 |
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA168"/><Files/></AVRWorkspace> |
/programy/C/avr/tests/ATmega168/uart/main.c |
---|
0,0 → 1,27 |
#include <string.h> |
#include <avr/pgmspace.h> |
#include <avr/sleep.h> |
#include "uart.h" |
int main() |
{ |
/* we will just use ordinary idle mode */ |
// set_sleep_mode(SLEEP_MODE_IDLE); |
/* setup uart */ |
uart_init(); |
/* setup sd card slot */ |
while(1) |
{ |
uart_puts_p(PSTR("test000000000000000")); |
} |
return 1; |
} |
/programy/C/avr/tests/ATmega168/uart/uart.c |
---|
0,0 → 1,198 |
/* |
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de> |
* |
* This file is free software; you can redistribute it and/or modify |
* it under the terms of the GNU General Public License version 2 as |
* published by the Free Software Foundation. |
*/ |
#include <stdio.h> |
#include <avr/interrupt.h> |
#include <avr/io.h> |
#include <avr/pgmspace.h> |
#include <avr/sfr_defs.h> |
#include <avr/sleep.h> |
#include "uart.h" |
/* some mcus have multiple uarts */ |
#ifdef UDR0 |
#define UBRRH UBRR0H |
#define UBRRL UBRR0L |
#define UDR UDR0 |
#define UCSRA UCSR0A |
#define UDRE UDRE0 |
#define RXC RXC0 |
#define UCSRB UCSR0B |
#define RXEN RXEN0 |
#define TXEN TXEN0 |
#define RXCIE RXCIE0 |
#define UCSRC UCSR0C |
#define URSEL |
#define UCSZ0 UCSZ00 |
#define UCSZ1 UCSZ01 |
#define UCSRC_SELECT 0 |
#else |
#define UCSRC_SELECT (1 << URSEL) |
#endif |
#ifndef USART_RXC_vect |
#if defined(UART0_RX_vect) |
#define USART_RXC_vect UART0_RX_vect |
#elif defined(UART_RX_vect) |
#define USART_RXC_vect UART_RX_vect |
#elif defined(USART0_RX_vect) |
#define USART_RXC_vect USART0_RX_vect |
#elif defined(USART_RX_vect) |
#define USART_RXC_vect USART_RX_vect |
#elif defined(USART0_RXC_vect) |
#define USART_RXC_vect USART0_RXC_vect |
#elif defined(USART_RXC_vect) |
#define USART_RXC_vect USART_RXC_vect |
#else |
#error "Uart receive complete interrupt not defined!" |
#endif |
#endif |
#define BAUD 9600UL |
#define UBRRVAL (F_CPU/(BAUD*16)-1) |
#define USE_SLEEP 1 |
void uart_init() |
{ |
/* set baud rate */ |
UBRRH = UBRRVAL >> 8; |
UBRRL = UBRRVAL & 0xff; |
/* set frame format: 8 bit, no parity, 1 bit */ |
UCSRC = UCSRC_SELECT | (1 << UCSZ1) | (1 << UCSZ0); |
/* enable serial receiver and transmitter */ |
#if !USE_SLEEP |
UCSRB = (1 << RXEN) | (1 << TXEN); |
#else |
UCSRB = (1 << RXEN) | (1 << TXEN) | (1 << RXCIE); |
#endif |
} |
void uart_putc(uint8_t c) |
{ |
if(c == '\n') |
uart_putc('\r'); |
/* wait until transmit buffer is empty */ |
while(!(UCSRA & (1 << UDRE))); |
/* send next byte */ |
UDR = c; |
} |
void uart_putc_hex(uint8_t b) |
{ |
/* upper nibble */ |
if((b >> 4) < 0x0a) |
uart_putc((b >> 4) + '0'); |
else |
uart_putc((b >> 4) - 0x0a + 'a'); |
/* lower nibble */ |
if((b & 0x0f) < 0x0a) |
uart_putc((b & 0x0f) + '0'); |
else |
uart_putc((b & 0x0f) - 0x0a + 'a'); |
} |
void uart_putw_hex(uint16_t w) |
{ |
uart_putc_hex((uint8_t) (w >> 8)); |
uart_putc_hex((uint8_t) (w & 0xff)); |
} |
void uart_putdw_hex(uint32_t dw) |
{ |
uart_putw_hex((uint16_t) (dw >> 16)); |
uart_putw_hex((uint16_t) (dw & 0xffff)); |
} |
void uart_putw_dec(uint16_t w) |
{ |
uint16_t num = 10000; |
uint8_t started = 0; |
while(num > 0) |
{ |
uint8_t b = w / num; |
if(b > 0 || started || num == 1) |
{ |
uart_putc('0' + b); |
started = 1; |
} |
w -= b * num; |
num /= 10; |
} |
} |
void uart_putdw_dec(uint32_t dw) |
{ |
uint32_t num = 1000000000; |
uint8_t started = 0; |
while(num > 0) |
{ |
uint8_t b = dw / num; |
if(b > 0 || started || num == 1) |
{ |
uart_putc('0' + b); |
started = 1; |
} |
dw -= b * num; |
num /= 10; |
} |
} |
void uart_puts(const char* str) |
{ |
while(*str) |
uart_putc(*str++); |
} |
void uart_puts_p(PGM_P str) |
{ |
while(1) |
{ |
uint8_t b = pgm_read_byte_near(str++); |
if(!b) |
break; |
uart_putc(b); |
} |
} |
uint8_t uart_getc() |
{ |
/* wait until receive buffer is full */ |
#if USE_SLEEP |
uint8_t sreg = SREG; |
sei(); |
while(!(UCSRA & (1 << RXC))) |
sleep_mode(); |
SREG = sreg; |
#else |
while(!(UCSRA & (1 << RXC))); |
#endif |
uint8_t b = UDR; |
if(b == '\r') |
b = '\n'; |
return b; |
} |
EMPTY_INTERRUPT(USART_RXC_vect) |
/programy/C/avr/tests/ATmega168/uart/uart.h |
---|
0,0 → 1,33 |
/* |
* Copyright (c) 2006-2007 by Roland Riegel <feedback@roland-riegel.de> |
* |
* This file is free software; you can redistribute it and/or modify |
* it under the terms of the GNU General Public License version 2 as |
* published by the Free Software Foundation. |
*/ |
#ifndef UART_H |
#define UART_H |
#include <stdint.h> |
#include <avr/pgmspace.h> |
void uart_init(); |
void uart_putc(uint8_t c); |
void uart_putc_hex(uint8_t b); |
void uart_putw_hex(uint16_t w); |
void uart_putdw_hex(uint32_t dw); |
void uart_putw_dec(uint16_t w); |
void uart_putdw_dec(uint32_t dw); |
void uart_puts(const char* str); |
void uart_puts_p(PGM_P str); |
uint8_t uart_getc(); |
#endif |
/programy/C/avr/tests/Blik/avrm8ledtest.c |
---|
0,0 → 1,76 |
/********************************************* |
* vim: set sw=8 ts=8 si : |
* Author: Guido Socher, Copyright: GPL |
* This program is to test the led connected to |
* PC5. |
* See http://linuxfocus.org/English/November2004/ |
* for details. |
* Chip type : ATMEGA8 |
* Clock frequency : Internal clock 1 Mhz (factory default) |
*********************************************/ |
#include <avr/io.h> |
#include <inttypes.h> |
#define F_CPU 1000000UL // 1 MHz |
#include <avr/delay.h> |
/* compatibilty macros for old style */ |
#ifndef cbi |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) |
#endif |
#ifndef sbi |
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) |
#endif |
void delay_ms(unsigned int ms) |
/* delay for a minimum of <ms> */ |
{ |
// we use a calibrated macro. This is more |
// accurate and not so much compiler dependent |
// as self made code. |
while(ms){ |
_delay_ms(0.96); |
ms--; |
} |
} |
/* new style */ |
int main(void) |
{ |
/* INITIALIZE */ |
/* enable PC5 as output */ |
DDRC|= (1<<DDC5); |
/* PC5 is 5 (see file include/avr/iom8.h) and 1<<PC5 is 00100000 |
* This can also be written as _BV(PC5)*/ |
while (1) { |
/* led on, pin=0 */ |
PORTC &= ~(1<<PC5); |
delay_ms(500); |
/* set output to 5V, LED off */ |
PORTC|= (1<<PC5); |
delay_ms(500); |
} |
return(0); |
} |
// // old style now depricated: |
// int main(void) |
// { |
// // enable PC5 as output |
// sbi(DDRC,PC5); |
// while (1) { |
// // led on, pin=0 |
// cbi(PORTC,PC5); |
// delay_ms(500); |
// // set output to 5V, LED off |
// sbi(PORTC,PC5); |
// delay_ms(500); |
// } |
// return(0); |
// } |
// // end of old style |
/programy/C/avr/tests/Blik/avrm8ledtest.hex |
---|
0,0 → 1,10 |
:1000000012C02BC02AC029C028C027C026C025C0C6 |
:1000100024C023C022C021C020C01FC01EC01DC0DC |
:100020001CC01BC01AC011241FBECFE5D4E0DEBF28 |
:10003000CDBF10E0A0E6B0E0E0E9F0E002C005903E |
:100040000D92A036B107D9F710E0A0E6B0E001C0EC |
:100050001D92A036B107E1F70DC0D2CF9C0106C0BA |
:1000600080EF90E00197F1F72150304021153105E4 |
:10007000B9F70895CFE5D4E0DEBFCDBFA59AAD981E |
:1000800084EF91E0EBDFAD9A84EF91E0E7DFF7CF0B |
:00000001FF |
/programy/C/avr/tests/Blik/avrm8ledtest.map |
---|
0,0 → 1,324 |
Archive member included because of file (symbol) |
/usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_copy_data.o) |
avrm8ledtest.o (__do_copy_data) |
/usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_clear_bss.o) |
avrm8ledtest.o (__do_clear_bss) |
Discarded input sections |
.stabstr 0x00000000 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
.stabstr 0x00000000 0x0 avrm8ledtest.o |
Memory Configuration |
Name Origin Length Attributes |
text 0x00000000 0x00002000 xr |
data 0x00800060 0x0000ffa0 rw !x |
eeprom 0x00810000 0x00010000 rw !x |
*default* 0x00000000 0xffffffff |
Linker script and memory map |
LOAD /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
LOAD avrm8ledtest.o |
LOAD /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a |
LOAD /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/libc.a |
LOAD /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a |
.hash |
*(.hash) |
.dynsym |
*(.dynsym) |
.dynstr |
*(.dynstr) |
.gnu.version |
*(.gnu.version) |
.gnu.version_d |
*(.gnu.version_d) |
.gnu.version_r |
*(.gnu.version_r) |
.rel.init |
*(.rel.init) |
.rela.init |
*(.rela.init) |
.rel.text |
*(.rel.text) |
*(.rel.text.*) |
*(.rel.gnu.linkonce.t*) |
.rela.text |
*(.rela.text) |
*(.rela.text.*) |
*(.rela.gnu.linkonce.t*) |
.rel.fini |
*(.rel.fini) |
.rela.fini |
*(.rela.fini) |
.rel.rodata |
*(.rel.rodata) |
*(.rel.rodata.*) |
*(.rel.gnu.linkonce.r*) |
.rela.rodata |
*(.rela.rodata) |
*(.rela.rodata.*) |
*(.rela.gnu.linkonce.r*) |
.rel.data |
*(.rel.data) |
*(.rel.data.*) |
*(.rel.gnu.linkonce.d*) |
.rela.data |
*(.rela.data) |
*(.rela.data.*) |
*(.rela.gnu.linkonce.d*) |
.rel.ctors |
*(.rel.ctors) |
.rela.ctors |
*(.rela.ctors) |
.rel.dtors |
*(.rel.dtors) |
.rela.dtors |
*(.rela.dtors) |
.rel.got |
*(.rel.got) |
.rela.got |
*(.rela.got) |
.rel.bss |
*(.rel.bss) |
.rela.bss |
*(.rela.bss) |
.rel.plt |
*(.rel.plt) |
.rela.plt |
*(.rela.plt) |
.text 0x00000000 0x90 |
*(.vectors) |
.vectors 0x00000000 0x26 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
0x00000000 __vectors |
0x00000000 __vector_default |
*(.vectors) |
0x00000026 __ctors_start = . |
*(.ctors) |
0x00000026 __ctors_end = . |
0x00000026 __dtors_start = . |
*(.dtors) |
0x00000026 __dtors_end = . |
SORT(*)(.ctors) |
SORT(*)(.dtors) |
*(.progmem.gcc*) |
*(.progmem*) |
0x00000026 . = ALIGN (0x2) |
*(.jumptables) |
*(.jumptables*) |
*(.lowtext) |
*(.lowtext*) |
*(.init0) |
.init0 0x00000026 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
0x00000026 __init |
*(.init0) |
*(.init1) |
*(.init1) |
*(.init2) |
.init2 0x00000026 0xc /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
*(.init2) |
*(.init3) |
*(.init3) |
*(.init4) |
.init4 0x00000032 0x16 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_copy_data.o) |
0x00000032 __do_copy_data |
.init4 0x00000048 0x10 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_clear_bss.o) |
0x00000048 __do_clear_bss |
*(.init4) |
*(.init5) |
*(.init5) |
*(.init6) |
*(.init6) |
*(.init7) |
*(.init7) |
*(.init8) |
*(.init8) |
*(.init9) |
.init9 0x00000058 0x2 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
*(.init9) |
*(.text) |
.text 0x0000005a 0x2 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
0x0000005a __vector_1 |
0x0000005a __vector_12 |
0x0000005a __bad_interrupt |
0x0000005a __vector_6 |
0x0000005a __vector_3 |
0x0000005a __vector_11 |
0x0000005a __vector_13 |
0x0000005a __vector_17 |
0x0000005a __vector_7 |
0x0000005a __vector_5 |
0x0000005a __vector_4 |
0x0000005a __vector_9 |
0x0000005a __vector_2 |
0x0000005a __vector_15 |
0x0000005a __vector_8 |
0x0000005a __vector_14 |
0x0000005a __vector_10 |
0x0000005a __vector_16 |
0x0000005a __vector_18 |
.text 0x0000005c 0x34 avrm8ledtest.o |
0x00000074 main |
0x0000005c delay_ms |
.text 0x00000090 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_copy_data.o) |
.text 0x00000090 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_clear_bss.o) |
0x00000090 . = ALIGN (0x2) |
*(.text.*) |
.text.libgcc 0x00000090 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_copy_data.o) |
.text.libgcc 0x00000090 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_clear_bss.o) |
0x00000090 . = ALIGN (0x2) |
*(.fini9) |
*(.fini9) |
*(.fini8) |
*(.fini8) |
*(.fini7) |
*(.fini7) |
*(.fini6) |
*(.fini6) |
*(.fini5) |
*(.fini5) |
*(.fini4) |
*(.fini4) |
*(.fini3) |
*(.fini3) |
*(.fini2) |
*(.fini2) |
*(.fini1) |
*(.fini1) |
*(.fini0) |
*(.fini0) |
0x00000090 _etext = . |
.data 0x00800060 0x0 load address 0x00000090 |
0x00800060 PROVIDE (__data_start, .) |
*(.data) |
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
.data 0x00800060 0x0 avrm8ledtest.o |
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_copy_data.o) |
.data 0x00800060 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_clear_bss.o) |
*(.data*) |
*(.rodata) |
*(.rodata*) |
*(.gnu.linkonce.d*) |
0x00800060 . = ALIGN (0x2) |
0x00800060 _edata = . |
0x00800060 PROVIDE (__data_end, .) |
.bss 0x00800060 0x0 |
0x00800060 PROVIDE (__bss_start, .) |
*(.bss) |
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
.bss 0x00800060 0x0 avrm8ledtest.o |
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_copy_data.o) |
.bss 0x00800060 0x0 /usr/lib/gcc/avr/4.2.1/avr4/libgcc.a(_clear_bss.o) |
*(.bss*) |
*(COMMON) |
0x00800060 PROVIDE (__bss_end, .) |
0x00000090 __data_load_start = LOADADDR (.data) |
0x00000090 __data_load_end = (__data_load_start + SIZEOF (.data)) |
.noinit 0x00800060 0x0 |
0x00800060 PROVIDE (__noinit_start, .) |
*(.noinit*) |
0x00800060 PROVIDE (__noinit_end, .) |
0x00800060 _end = . |
0x00800060 PROVIDE (__heap_start, .) |
.eeprom 0x00810000 0x0 |
*(.eeprom*) |
0x00810000 __eeprom_end = . |
.stab 0x00000000 0x738 |
*(.stab) |
.stab 0x00000000 0x36c /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
.stab 0x0000036c 0x3cc avrm8ledtest.o |
0x3d8 (size before relaxing) |
.stabstr 0x00000000 0x761 |
*(.stabstr) |
.stabstr 0x00000000 0x761 /usr/lib/gcc/avr/4.2.1/../../../../avr/lib/avr4/crtm8.o |
.stab.excl |
*(.stab.excl) |
.stab.exclstr |
*(.stab.exclstr) |
.stab.index |
*(.stab.index) |
.stab.indexstr |
*(.stab.indexstr) |
.comment |
*(.comment) |
.debug |
*(.debug) |
.line |
*(.line) |
.debug_srcinfo |
*(.debug_srcinfo) |
.debug_sfnames |
*(.debug_sfnames) |
.debug_aranges |
*(.debug_aranges) |
.debug_pubnames |
*(.debug_pubnames) |
.debug_info |
*(.debug_info) |
*(.gnu.linkonce.wi.*) |
.debug_abbrev |
*(.debug_abbrev) |
.debug_line |
*(.debug_line) |
.debug_frame |
*(.debug_frame) |
.debug_str |
*(.debug_str) |
.debug_loc |
*(.debug_loc) |
.debug_macinfo |
*(.debug_macinfo) |
OUTPUT(avrm8ledtest.out elf32-avr) |
/programy/C/avr/tests/Blik/avrm8ledtest.out |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programy/C/avr/tests/Blik/Makefile |
---|
0,0 → 1,62 |
# makefile, written by guido socher |
MCU=atmega8 |
#MCU=at90s4433 |
CC=avr-gcc |
OBJCOPY=avr-objcopy |
# optimize for size: |
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues |
#------------------- |
all: avrm8ledtest.hex |
#------------------- |
help: |
@echo "Usage: make all|load|load_pre|rdfuses|wrfuse1mhz|wrfuse4mhz|wrfusecrystal" |
@echo "Warning: you will not be able to undo wrfusecrystal unless you connect an" |
@echo " external crystal! uC is dead after wrfusecrystal if you do not" |
@echo " have an external crystal." |
#------------------- |
avrm8ledtest.hex : avrm8ledtest.out |
$(OBJCOPY) -R .eeprom -O ihex avrm8ledtest.out avrm8ledtest.hex |
avrm8ledtest.out : avrm8ledtest.o |
$(CC) $(CFLAGS) -o avrm8ledtest.out -Wl,-Map,avrm8ledtest.map avrm8ledtest.o |
avrm8ledtest.o : avrm8ledtest.c |
$(CC) $(CFLAGS) -Os -c avrm8ledtest.c |
#------------------ |
load: avrm8ledtest.hex |
./prg_load_uc avrm8ledtest.hex |
# here is a pre-compiled version in case you have trouble with |
# your development environment |
load_pre: avrm8ledtest_pre.hex |
./prg_load_uc avrm8ledtest.hex |
# |
loaduisp: avrm8ledtest.hex |
./prg_load_uc -u avrm8ledtest.hex |
# here is a pre-compiled version in case you have trouble with |
# your development environment |
load_preuisp: avrm8ledtest_pre.hex |
./prg_load_uc -u avrm8ledtest.hex |
#------------------- |
# fuse byte settings: |
# Atmel AVR ATmega8 |
# Fuse Low Byte = 0xe1 (1MHz internal), 0xe3 (4MHz internal), 0xe4 (8MHz internal) |
# Fuse High Byte = 0xd9 |
# Factory default is 0xe1 for low byte and 0xd9 for high byte |
# Check this with make rdfuses |
rdfuses: |
./prg_fusebit_uc -r |
# use internal RC oscillator 1 Mhz |
wrfuse1mhz: |
./prg_fusebit_uc -w 1 |
# use internal RC oscillator 4 Mhz |
wrfuse4mhz: |
./prg_fusebit_uc -w 4 |
# use external 3-8 Mhz crystal |
# Warning: you can not reset this to intenal unless you connect a crystal!! |
wrfusecrystal: |
@echo "Warning: The external crystal setting can not be changed back without a working crystal" |
@echo " You have 3 seconds to abort this with crtl-c" |
@sleep 3 |
./prg_fusebit_uc -w 0 |
#------------------- |
clean: |
rm -f *.o *.map *.out *t.hex |
#------------------- |
/programy/C/avr/tests/Blik/README.txt |
---|
0,0 → 1,63 |
AVR GCC development environment test software. |
See the following article for details: |
http://main.linuxfocus.org/English/November2004/article352.shtml |
To compile type the command: |
make |
Note: You will get some warnings "#warning "This header file is obsolete." |
during compilation with avr-libc-1.4.X. This is because this code will |
also work with avr-libc-1.2.X |
Alternative 1: Programming with uisp (dapa programmer): |
------------------------------------------------------- |
Make sure that you have loaded the following modules in the kernel (for 2.4.x) |
before you use the uisp programmer: |
> /sbin/lsmod |
Module Size Used by |
parport_pc 17808 0 |
ppdev 5312 0 (unused) |
parport 25856 0 [parport_pc ppdev] |
To compile and load use: |
make loaduisp |
Alternative 2: Programming with avrusb500 (high speed usb programmer from tuxgraphics): |
--------------------------------------------------------------------------------------- |
Make sure that you have loaded the following modules in the kernel |
before you use the uisp programmer: |
> /sbin/lsmod |
Module Size Used by |
ftdi_sio 20568 0 |
usbcore 57792 1 [ftdi_sio usbserial] |
To compile and load use: |
make load |
Files: |
------ |
avrm8ledtest.c # the c source code for ATmega8 |
avrm8ledtest_pre.hex # pre-compiled loadable object in case you have |
# trouble to compile the software |
Makefile # Makefile |
README.txt # this file |
circuit.gif # schematic as gif image |
------------------------------------------- |
History: |
version 0.1: 2004-10-01, first Version |
version 0.2: 2004-12-30, corrected fault in delay_ms function |
version 0.3: 2005-10-04, new modular programming with the scripts prg_load_uc |
and prg_fusebit_uc for easy transition to the new |
avrusb500 programmer |
version 0.4: 2006-03-02, compiler independent delay loop. The old delay_ms |
would behave totally different with the new gcc-4 |
version. |
version 0.5: 2006-03-10, Fault in delay_ms corrected |
------------------------------------------- |
Copyright: GPL |
Written by guido socher <guido at tuxgraphics.org> |
------------------------------------------- |
/programy/C/avr/tests/Blik/avrm8ledtest_pre.hex |
---|
0,0 → 1,11 |
:1000000012C02BC02AC029C028C027C026C025C0C6 |
:1000100024C023C022C021C020C01FC01EC01DC0DC |
:100020001CC01BC01AC011241FBECFE5D4E0DEBF28 |
:10003000CDBF10E0A0E6B0E0E6E9F0E002C0059038 |
:100040000D92A036B107D9F710E0A0E6B0E001C0EC |
:100050001D92A036B107E1F710C0D2CFAC0120E06D |
:1000600030E0E0EFF0E005C0CF010197F1F72F5F3E |
:100070003F4F24173507C1F70895CFE5D4E0DEBF21 |
:10008000CDBFA59AAD9884EF91E0E8DFAD9A84EFFB |
:0600900091E0E4DFF7CF70 |
:00000001FF |
/programy/C/avr/tests/Blik/prg_fusebit_uc |
---|
0,0 → 1,97 |
#!/bin/sh |
prg="adude" |
# |
help() |
{ |
echo "prg_fusebit_uc -- read and write fuse bits of the atmega8" |
echo "" |
echo "Usage: prg_fusebit_uc [-hu] -r|-w Freq" |
echo "" |
echo "OPTIONS: -h this help" |
echo " -r read fuse bytes" |
echo " -u use uisp instead of avrdude" |
echo " avrdude can automatically detect dapa or avrusb500." |
echo " uisp can only be used with the parallel port dapa." |
echo " -w write fuse bytes such that a given Freq is used" |
echo " a frequency of 0 means external crystal. Possible" |
echo " values are 0,1,2,4,8" |
echo "" |
echo "EXAMPLE: program the fuses to 4MHz internal" |
echo " prg_fusebit_uc -w 4" |
echo "" |
echo "Warning: you can not undo the setting \"external crystal\" unless" |
echo " you have a crystal that works." |
echo "This script can be easily adapted to different programmer types" |
exit 0 |
} |
while [ -n "$1" ]; do |
case $1 in |
-h) help;shift 1;; |
-u) prg="uisp";shift 1;; |
-r) opt_r="1";shift 1;; |
-w) opt_w="1";freq="$2";shift 2;; |
-*) echo "error: no such option $1. -h for help";exit 1;; |
*) break;; |
esac |
done |
if [ -z "$opt_r" -a -z "$opt_w" ];then |
# one of those options is mandatory |
help |
fi |
hf=0xd9 |
if [ "$opt_w" = "1" ]; then |
case $freq in |
0) lf=0xee;echo "Make sure you have a crystal otherwise you can not change this!";sleep 2;; |
1) lf=0xe1;; |
2) lf=0xe2;; |
4) lf=0xe3;; |
8) lf=0xe4;; |
*) echo "error: no such frequency, -h for help";exit 1;; |
esac |
fi |
if [ "$prg" = "uisp" ]; then |
if [ "$opt_r" = "1" ];then |
set -x |
uisp -dlpt=/dev/parport0 -dprog=dapa --rd_fuses |
set +x |
echo "Explanation: Fuse Low Byte: 0xe1 (1MHz intern), 0xe3 (4MHz intern), " |
echo " 0xe4 (8MHz intern)" |
echo " Fuse High Byte should be 0xd9" |
exit 0 |
fi |
if [ "$opt_w" = "1" ]; then |
set -x |
uisp -dlpt=/dev/parport0 -dprog=dapa --wr_fuse_l=$lf |
uisp -dlpt=/dev/parport0 -dprog=dapa --wr_fuse_h=$hf |
set +x |
exit 0 |
fi |
fi |
if [ "$prg" = "adude" ]; then |
if grep "Vendor=0403 ProdID=6001" /proc/bus/usb/devices > /dev/null ; then |
prg="avrusb500" |
else |
prg="dapa" |
fi |
if [ "$opt_r" = "1" ];then |
set -x |
avrdude -p m8 -c $prg -v -q |
set +x |
echo "Explanation: Fuse Low Byte: 0xe1 (1MHz intern), 0xe3 (4MHz intern), " |
echo " 0xe4 (8MHz intern)" |
echo " Fuse High Byte should be 0xd9" |
exit 0 |
fi |
if [ "$opt_w" = "1" ]; then |
set -x |
avrdude -p m8 -c $prg -u -v -U lfuse:w:$lf:m |
avrdude -p m8 -c $prg -u -v -U hfuse:w:$hf:m |
set +x |
exit 0 |
fi |
fi |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programy/C/avr/tests/Blik/prg_load_uc |
---|
0,0 → 1,38 |
#!/bin/sh |
prg="adude" |
if [ "$1" = "-u" ]; then |
shift; |
prg="uisp" |
fi |
if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then |
echo "prg_load_uc -- load a .hex file into a atmega8 microcontroller" |
echo "" |
echo "Usage: prg_load_uc [-hu] File.hex" |
echo "" |
echo "OPTIONS: -h this help" |
echo " -u use uisp instead of avrdude" |
echo " avrdude can automatically detect dapa or avrusb500." |
echo " uisp can only be used with the parallel port dapa." |
echo "" |
echo "This script can be easily adapted to different programmer types" |
exit 0 |
fi |
pfile="$1" |
if [ "$prg" = "uisp" ]; then |
set -x |
uisp -dlpt=/dev/parport0 --erase -dprog=dapa |
uisp -dlpt=/dev/parport0 --upload if="$pfile" -dprog=dapa -v=3 --hash=32 --verify |
set +x |
fi |
if [ "$prg" = "adude" ]; then |
if grep "Vendor=0403 ProdID=6001" /proc/bus/usb/devices > /dev/null ; then |
set -x |
avrdude -p m8 -c avrusb500 -e -U flash:w:"$pfile" |
set +x |
else |
set -x |
avrdude -p m8 -c dapa -e -U flash:w:"$pfile" |
set +x |
fi |
fi |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programy/C/avr/tests/Blik/prg_read_uc |
---|
0,0 → 1,38 |
#!/bin/sh |
prg="adude" |
if [ "$1" = "-u" ]; then |
shift; |
prg="uisp" |
fi |
if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then |
echo "prg_read_uc -- read the flahs of an atmega8 microcontroller" |
echo "" |
echo "Usage: prg_load_uc [-hu] File.hex" |
echo "" |
echo "OPTIONS: -h this help" |
echo " -u use uisp instead of avrdude" |
echo " avrdude can automatically detect dapa or avrusb500." |
echo " uisp can only be used with the parallel port dapa." |
echo "" |
echo "This script can be easily adapted to different programmer types" |
exit 0 |
fi |
pfile="$1" |
if [ "$prg" = "uisp" ]; then |
set -x |
#uisp -dlpt=/dev/parport0 --erase -dprog=dapa |
#uisp -dlpt=/dev/parport0 --upload if="$pfile" -dprog=dapa -v=3 --hash=32 --verify |
set +x |
fi |
if [ "$prg" = "adude" ]; then |
if grep "Vendor=0403 ProdID=6001" /proc/bus/usb/devices > /dev/null ; then |
set -x |
avrdude -v -v -p m8 -c avrusb500 -U flash:r:"$pfile:i" |
set +x |
else |
set -x |
avrdude -p m8 -c dapa -U flash:r:"$pfile:i" |
set +x |
fi |
fi |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/schemata/mereni/IRmrak/SCH/IRMRAK.DBK |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/schemata/mereni/IRmrak/SCH/IRMRAK.DRC |
---|
0,0 → 1,13 |
Checking Pins and Pin Connections |
-------------------------------------------------- |
Checking Schematic: SCHEMATIC1 |
-------------------------------------------------- |
Checking Electrical Rules |
Checking for Unconnected Nets |
Checking for Invalid References |
Checking for Duplicate References |
/schemata/mereni/IRmrak/SCH/IRMRAK.eco |
---|
0,0 → 1,18 |
*PADS-ECO-V3.0-MILS* |
*REMARK* -- Untitled -- Sat Mar 25 17:49:09 2006 |
*PART* |
M5 PAD |
*SET_ATTRIBUTE* DECAL HOLE_M3 |
"Description" otvor pro sroub M3 |
*SET_ATTRIBUTE* PART M5 |
"Value" HOLE_M3 |
*NET* |
*SIGNAL* 12V 25 |
J11.1 M5.1 |
*END* |
/schemata/mereni/IRmrak/SCH/IRmrak.opj |
---|
0,0 → 1,113 |
(ExpressProject "IRmrak" |
(ProjectVersion "19981106") |
(ProjectType "PCB") |
(Folder "Design Resources" |
(Folder "Library") |
(NoModify) |
(File ".\irmrak.dsn" |
(Type "Schematic Design")) |
(BuildFileAddedOrDeleted "x") |
(CompileFileAddedOrDeleted "x") |
(Netlist_TAB "7") |
(OTHER_Part_Value "{Value}") |
(OTHER_Netlist_File "IRMRAK.asc") |
(OTHER_Netlist_File2 "IRMRAK.CMP") |
(OTHER_View_Output "FALSE") |
(OTHER_View_Output2 "FALSE") |
(OTHER_Formatter "PADSPCB.DLL") |
(OTHER_PCB_Footprint "{Device},{Value}@{PCB Footprint}") |
(OTHER_Switch0 "FALSE") |
(OTHER_Switch1 "FALSE") |
(OTHER_Switch2 "FALSE") |
(OTHER_Switch3 "FALSE") |
(OTHER_Switch4 "FALSE") |
(OTHER_Switch5 "FALSE") |
(OTHER_Switch6 "FALSE") |
(DRC_Scope "0") |
(DRC_Action "0") |
(DRC_Create_Warnings "FALSE") |
(DRC_Check_Ports "FALSE") |
(DRC_Check_Off-Page_Connectors "FALSE") |
(DRC_Identical_References "TRUE") |
(DRC_Type_Mismatch "TRUE") |
(DRC_Report_Ports_and_Off-page_Connectors "FALSE") |
(DRC_SDT_Compatibility "FALSE") |
(DRC_Report_Off-grid_Objects "FALSE") |
(DRC_Check_Unconnected_Nets "TRUE") |
(DRC_Report_Netnames "FALSE") |
(DRC_View_Output "FALSE") |
(DRC_Report_File "H:\IRMRAK\IRMRAK.DRC")) |
(Folder "Outputs" |
(File ".\irmrak.drc" |
(Type "Report")) |
(File ".\irmrak.asc" |
(Type "Report"))) |
(Folder "Referenced Projects") |
(PartMRUSelector |
(LM78LxxZ_TO92 |
(FullPartName "LM78LxxZ_TO92.Normal") |
(LibraryName "C:\LIBRARY\ORCAD9X\POWER.OLB") |
(DeviceIndex "0")) |
(ARK210/3 |
(FullPartName "ARK210/3.Normal") |
(LibraryName "C:\LIBRARY\ORCAD9X\COM_CON.OLB") |
(DeviceIndex "0")) |
(ARK210/2 |
(FullPartName "ARK210/2.Normal") |
(LibraryName "C:\LIBRARY\ORCAD9X\COM_CON.OLB") |
(DeviceIndex "0")) |
(GND |
(LibraryName "C:\LIBRARY\ORCAD9X\SYMBOLS.OLB") |
(DeviceIndex "0")) |
(HOLE_M3 |
(FullPartName "HOLE_M3.Normal") |
(LibraryName "C:\LIBRARY\ORCAD9X\PAD.OLB") |
(DeviceIndex "0")) |
(L298/MUTIV |
(FullPartName "L298/MUTIV.Normal") |
(LibraryName "C:\PROGRAM FILES\ORCADLITE\CAPTURE\LIBRARY\MISC2.OLB") |
(DeviceIndex "0")) |
(L298/MULTIH |
(FullPartName "L298/MULTIH.Normal") |
(LibraryName "C:\PROGRAM FILES\ORCADLITE\CAPTURE\LIBRARY\MISC2.OLB") |
(DeviceIndex "0")) |
(BS170SMD |
(FullPartName "BS170SMD.Normal") |
(LibraryName "C:\LIBRARY\ORCAD9X\COM_T.OLB") |
(DeviceIndex "0")) |
(101 |
(FullPartName "101.Normal") |
(LibraryName "C:\PROGRAM FILES\ORCADLITE\CAPTURE\LIBRARY\OPAMP.OLB") |
(DeviceIndex "0")) |
(R-TRIM-PT10H |
(FullPartName "R-TRIM-PT10H.Normal") |
(LibraryName "C:\LIBRARY\ORCAD9X\COM_RLC.OLB") |
(DeviceIndex "0"))) |
(GlobalState |
(FileView |
(Path "Design Resources") |
(Path "Design Resources" |
"C:\dokumenty\@Dokumenty\Schemata\IRmrak\irmrak.dsn") |
(Path "Design Resources" |
"C:\dokumenty\@Dokumenty\Schemata\IRmrak\irmrak.dsn" "SCHEMATIC1") |
(Path "Outputs") |
(Select "Design Resources" |
"C:\dokumenty\@Dokumenty\Schemata\IRmrak\irmrak.dsn" "SCHEMATIC1" |
"PAGE1")) |
(HierarchyView) |
(Doc |
(Type "COrCapturePMDoc") |
(Frame |
(Placement "44 0 1 -1 -1 -4 -30 0 200 0 403")) |
(Tab 0)) |
(Doc |
(Type "COrSchematicDoc") |
(Frame |
(Placement "44 2 3 -1 -1 -4 -30 44 914 58 495") |
(Scroll "0 0") |
(Zoom "100") |
(Occurrence "/")) |
(Path "C:\DOKUMENTY\@DOKUMENTY\SCHEMATA\IRMRAK\IRMRAK.DSN") |
(Schematic "SCHEMATIC1") |
(Page "PAGE1"))) |
(LastUsedLibraryBrowseDirectory "C:\Program Files\OrcadLite\Capture\Library")) |