From 2a4105c2611c91fb3e3917d4f308d82e7aa6391a Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Tue, 7 May 2013 17:38:06 +0000 Subject: [PATCH] general delay on startup fix SDCard init message --- P8000_WDC_Emulator/P8000_WDC_Emulator.atsuo | Bin 50176 -> 50176 bytes .../P8000_WDC_Emulator/Debug/Makefile | 27 +++-- .../P8000_WDC_Emulator.cproj | 99 +++++++++--------- .../P8000_WDC_Emulator/wdc_drv_mmc.c | 8 +- .../P8000_WDC_Emulator/wdc_drv_pata.c | 7 +- .../P8000_WDC_Emulator/wdc_main.c | 11 +- 6 files changed, 76 insertions(+), 76 deletions(-) diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator.atsuo b/P8000_WDC_Emulator/P8000_WDC_Emulator.atsuo index a0fa717c8a3ce419855a3f47c07a2de74ed7214f..9d34b47a0aedbf83e881d71393361564ffeaa02c 100755 GIT binary patch delta 1606 zcmZWpZA?>V6z+R_TiUM07E6JN113&!&;i;xuu7HkQK7Vm3Jk}%;~1tvSpht)@)&ZEYY~SA1;%fw@~e}lRP=+Jm=(| z=e_TT&?Xhyq@Uj8;tM4bi5amNVL{{}YzVJZpYkI5B1AFb(Zs~Wa`YvLQiL7xGMJ=u zG*uW?BUncb+{l^kspCPA{vqG6wr!uSgf{c7gp|Pp+1}W}skUd)&zg!)QjdIC$}-$7?z}sEq2{qTX-Jcc}7p4n^VE-+FMRs>W!P` zPB+CS{JCtmDG9VjJ?(z}Dv2uJ(p8du#R5Wxs2MS>iEgO5eK{z{k)HCIw9)tzrwsi_ z-G4-6X*sR$@MW!aS7yR0OGkW%IqCxJpMOkup||gdbJ6ae(uwa*f74V~p<{!fZh=p` zzjuGs>j$15IIcQfK5%_}A;g&awEB0?UTm0c{`)tDarfPw17+Y((0l5l=(y=Nm%w&_ zA=1vEj1jggY7rwp;u6ABJ{Px$hXpzDO4j{7azC&x*;S0LP41#zH;&2gh?|I8h})Be zRC+Dv6;8WltjBbJ>&Ld*`||b_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4$dM5ija@F)!+#N;kAsn(D=|B!6-N+H73t?M#6zwsj z7jYv!$Qh&$If1Y~U!XmSoI<`tzCunT7ZHew4_tp4E0>UO5Ek$)+AGL4q84Y`A`xVvb7NA4kiAOpyKWDr5WFyvtsdLjNDh5m@n z5*pTFx{!0IrPdI3Go1YmFsAy^5|csDXt@Fn$Emm;XsCV_+-3<39|TfkRTu#&#SNYI zdN}`)5!|!f!0(hnN)ChjRe?a>H=@qNz1@D$YQOADI6`npR+dR%t=a2JbrX=QgNOi9 zdx&$s8%k?Bg_{c21J=LZqhl4WAKQ2;ptiaS)1~O9467p_Fz&vNxhKLvM}T4-N0TfY z2*kAaPhb~lqzrt{(##u9V0LAm;(1?eKRHmI936oTc3f>$A}m@T#WMLNjm9#=uB?iK zjM_;g3rIkcGua=Ow@!iQ8^?j1EK~QQc%n~v;o>h@Ux!VOs8zl7v2$|d@c)aMsfBr! zS{l2=q5`?xO{F|p1bLR^EKCu3OdEncnTV~>LNsJ1O6lIR=Ut0RL)e?4^_FeRvkAMB z;8|f6XQ79^4P&{$R%R9P1Prk!WlW@=G93>O=M+M;NlR@zqEs}b;+O)KR%C;;S%lIw zQI(JVb@b@$I6}JV&}t$yN$I3*E0DE^n6g4HlrM725I#dHUKAqOMm51dA zqg<_ZO6aa%0Idx(K-9$|B&;A4iToQK5rofs)X$gU(7q#6zyRW;CGlQ^6T z?-e% "P8000_WDC_Emulator.lss" - "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "P8000_WDC_Emulator.elf" "P8000_WDC_Emulator.srec" - "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-size.exe" "P8000_WDC_Emulator.elf" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.939\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "P8000_WDC_Emulator.elf" "P8000_WDC_Emulator.hex" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.939\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "P8000_WDC_Emulator.elf" "P8000_WDC_Emulator.eep" || exit 0 + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.939\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "P8000_WDC_Emulator.elf" > "P8000_WDC_Emulator.lss" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.939\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "P8000_WDC_Emulator.elf" "P8000_WDC_Emulator.srec" + "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.939\avr8-gnu-toolchain\bin\avr-size.exe" "P8000_WDC_Emulator.elf" + @@ -184,6 +182,7 @@ $(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) # Other Targets clean: - -$(RM) $(OBJS_AS_ARGS)$(C_DEPS_AS_ARGS) $(EXECUTABLES) + -$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES) + -$(RM) $(C_DEPS_AS_ARGS) rm -rf "P8000_WDC_Emulator.elf" "P8000_WDC_Emulator.a" "P8000_WDC_Emulator.hex" "P8000_WDC_Emulator.lss" "P8000_WDC_Emulator.eep" "P8000_WDC_Emulator.map" "P8000_WDC_Emulator.srec" \ No newline at end of file diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj b/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj index d7aef79..ce35526 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj @@ -23,63 +23,68 @@ 2.11.1 - - - - - - - - - + + + + + + + + + + true + 0x20000000 + true + + 2 - True - True - True - True - True - True - Optimize for size (-Os) - True - True - True - - - libm - - - + True + True + True + True + True + True + Optimize for size (-Os) + True + True + True + + + libm + + + - True - True - True - True - True - True - Optimize (-O1) - True - True - True - True - True - True - True - - True - - - libm - - - + True + True + True + True + True + True + Optimize (-O1) + True + True + True + True + True + True + True + + True + + + libm + + + diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_mmc.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_mmc.c index caa7ef7..57c45c7 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_mmc.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_mmc.c @@ -26,7 +26,7 @@ */ /* - * $Id: wdc_drv_mmc.c,v 1.23 2013/05/04 21:22:53 olivleh1 Exp $ + * $Id: wdc_drv_mmc.c,v 1.24 2013/05/07 17:38:06 olivleh1 Exp $ */ #include @@ -274,6 +274,8 @@ uint8_t mmc_init () mmc_enable_crc ( 1 ); #endif + uart_putstring ( PSTR ( "INFO: SDCard disk has been found" ), true ); + disable_mmc(); return 0; } @@ -306,10 +308,6 @@ uint8_t mmc_cmd ( uint8_t *cmd ) tmp = recv_byte(); } while ( ( tmp & 0x80 ) && --i ); - if ( !tmp ) { - uart_putstring ( PSTR ( "INFO: SDCard disk has been found" ), true ); - } - return tmp; } diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c index f8acd69..4f055a4 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c @@ -26,12 +26,11 @@ */ /* - * $Id: wdc_drv_pata.c,v 1.13 2013/05/04 21:29:43 olivleh1 Exp $ + * $Id: wdc_drv_pata.c,v 1.14 2013/05/07 17:38:06 olivleh1 Exp $ */ #include "wdc_config.h" #include -#include #include "wdc_avr.h" #include "uart.h" #include "wdc_drv_pata.h" @@ -326,10 +325,6 @@ void ata_identify () uint8_t pata_init () { - - /* is needed for some disks (for example Maxtor 6L080J4) */ - _delay_ms ( 400 ); - uart_putstring ( PSTR ( "INFO: PATA init start" ), true ); while ( ( !pata_rdy() ) & pata_bsy() ) {} diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c index fffab58..1eb49f4 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c @@ -27,7 +27,7 @@ /* - * $Id: wdc_main.c,v 1.33 2013/05/04 21:39:53 olivleh1 Exp $ + * $Id: wdc_main.c,v 1.34 2013/05/07 17:38:06 olivleh1 Exp $ * */ @@ -41,6 +41,7 @@ #include #include #include "wdc_config.h" +#include #include "wdc_main.h" #ifdef DEBUG #include "uart.h" @@ -75,9 +76,8 @@ main ( void ) uint8_t errorcode; uint8_t i8; #endif - atmega_setup(); - uart_putstring ( PSTR ( "=== P8000 WDC Emulator 0.92 ===" ), true ); + atmega_setup(); #ifdef MEASURE_DISK_PERFORMANCE measure_performance(); @@ -419,8 +419,11 @@ main ( void ) void atmega_setup ( void ) { set_sleep_mode ( SLEEP_MODE_IDLE ); + /* is needed for some disks (for example Maxtor 6L080J4) and SD-Cards*/ + _delay_ms ( 400 ); uart_init(); - wdc_init_avr(); + uart_putstring ( PSTR ( "=== P8000 WDC Emulator 0.92 ===" ), true ); + wdc_init_avr(); wdc_get_sysconf(); if ( wdc_init_disk() ) {