diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator.atsuo b/P8000_WDC_Emulator/P8000_WDC_Emulator.atsuo index a0fa717..9d34b47 100755 Binary files a/P8000_WDC_Emulator/P8000_WDC_Emulator.atsuo and b/P8000_WDC_Emulator/P8000_WDC_Emulator.atsuo differ diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile b/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile index e588260..08efe0a 100755 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile @@ -66,7 +66,6 @@ wdc_if_disk.o \ wdc_par.o \ wdc_ram.o - OBJS_AS_ARGS += \ wdc_avr.o \ wdc_drv_pata.o \ @@ -79,7 +78,6 @@ wdc_if_disk.o \ wdc_par.o \ wdc_ram.o - C_DEPS += \ wdc_avr.d \ wdc_drv_pata.d \ @@ -92,7 +90,6 @@ wdc_if_disk.d \ wdc_par.d \ wdc_ram.d - C_DEPS_AS_ARGS += \ wdc_avr.d \ wdc_drv_pata.d \ @@ -105,7 +102,6 @@ wdc_if_disk.d \ wdc_par.d \ wdc_ram.d - OUTPUT_FILE_PATH +=P8000_WDC_Emulator.elf OUTPUT_FILE_PATH_AS_ARGS +=P8000_WDC_Emulator.elf @@ -140,9 +136,10 @@ LIB_DEP+= ./%.o: .././%.c @echo Building file: $< - @echo Invoking: AVR/GNU C Compiler : - $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fpack-struct -fshort-enums -Wall -Wundef -Werror -pedantic -pedantic-errors -mmcu=atmega1284p -c -save-temps -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o"$@" "$<" + @echo Invoking: AVR/GNU C Compiler : 3.4.2 + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.939\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -funsigned-char -funsigned-bitfields -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -Wundef -Werror -pedantic -pedantic-errors -mmcu=atmega1284p -c -save-temps -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<" @echo Finished building: $< + @@ -168,14 +165,15 @@ all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES) $(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) @echo Building target: $@ - @echo Invoking: AVR/GNU Linker : - $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="P8000_WDC_Emulator.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega1284p + @echo Invoking: AVR/GNU Linker : 3.4.2 + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.939\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="P8000_WDC_Emulator.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega1284p @echo Finished building target: $@ - "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.876\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.876\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.876\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.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() ) {