compilation error

General discussion forum - for all that doesn't fit in any other category.
Post Reply
gem1144aaa
Posts: 4
Joined: Tue Jan 06, 2009 5:51 pm

compilation error

Post by gem1144aaa »

Hi everyone

i'm trying to compile the floppy immulator the pic stand alone version but i always get the following err

any suggestion welcome

thanx




----------------------------------------------------------------------
Release build of project `E:\fdd_emu\sources\pic2.mcp' started.
Tue Jan 06 17:44:24 2009
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "E:\fdd_emu\sources\main.o".
Clean: Deleted file "E:\fdd_emu\sources\lcd.o".
Clean: Deleted file "E:\fdd_emu\sources\utils.o".
Clean: Deleted file "E:\fdd_emu\sources\hardware.o".
Clean: Deleted file "E:\fdd_emu\sources\sdcard_lba.o".
Clean Warning: File "E:\fdd_emu\sources\clearblock.o" doesn't exist.
Clean Warning: File "E:\fdd_emu\sources\fastspi.o" doesn't exist.
Clean Warning: File "E:\fdd_emu\bin\clearblock.lst" doesn't exist.
Clean: Deleted file "E:\fdd_emu\bin\fastspi.lst".
Clean: Done.
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "main.c" -fo="main.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "lcd.c" -fo="lcd.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "utils.c" -fo="utils.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "hardware.c" -fo="hardware.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "sdcard_lba.c" -fo="sdcard_lba.o" --extended
Executing: "D:\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F4525 "clearblock.asm" /l"E:\fdd_emu\bin\clearblock.lst" /e"clearblock.err" /o"clearblock.o" /y /aINHX8M
Executing: "D:\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F4525 "fastspi.asm" /l"E:\fdd_emu\bin\fastspi.lst" /e"fastspi.err" /o"fastspi.o" /y /aINHX8M
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Executing: "D:\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F4525 "fast_int_handler.asm" /l"E:\fdd_emu\bin\fast_int_handler.lst" /e"fast_int_handler.err" /o"fast_int_handler.o" /y /aINHX8M
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "fat32\fat.c" -fo="fat.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "fat32\browse.c" -fo="browse.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "hfe_file.c" -fo="hfe_file.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "ihm.c" -fo="ihm.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "floppyemulation.c" -fo="floppyemulation.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "floppypinsstate.c" -fo="floppypinsstate.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "browse.c" -fo="browse.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "fat.c" -fo="fat.o" --extended
Skipping link step. Not all sources built successfully.
----------------------------------------------------------------------
Release build of project `E:\fdd_emu\sources\pic2.mcp' failed.
Tue Jan 06 17:44:32 2009
----------------------------------------------------------------------
BUILD FAILED
Jeff
Site Admin
Posts: 8247
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: compilation error

Post by Jeff »

gem1144aaa wrote:Hi everyone

i'm trying to compile the floppy immulator the pic stand alone version but i always get the following err

any suggestion welcome

thanx




----------------------------------------------------------------------
Release build of project `E:\fdd_emu\sources\pic2.mcp' started.
Tue Jan 06 17:44:24 2009
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "E:\fdd_emu\sources\main.o".
Clean: Deleted file "E:\fdd_emu\sources\lcd.o".
Clean: Deleted file "E:\fdd_emu\sources\utils.o".
Clean: Deleted file "E:\fdd_emu\sources\hardware.o".
Clean: Deleted file "E:\fdd_emu\sources\sdcard_lba.o".
Clean Warning: File "E:\fdd_emu\sources\clearblock.o" doesn't exist.
Clean Warning: File "E:\fdd_emu\sources\fastspi.o" doesn't exist.
Clean Warning: File "E:\fdd_emu\bin\clearblock.lst" doesn't exist.
Clean: Deleted file "E:\fdd_emu\bin\fastspi.lst".
Clean: Done.
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "main.c" -fo="main.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "lcd.c" -fo="lcd.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "utils.c" -fo="utils.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "hardware.c" -fo="hardware.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "sdcard_lba.c" -fo="sdcard_lba.o" --extended
Executing: "D:\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F4525 "clearblock.asm" /l"E:\fdd_emu\bin\clearblock.lst" /e"clearblock.err" /o"clearblock.o" /y /aINHX8M
Executing: "D:\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F4525 "fastspi.asm" /l"E:\fdd_emu\bin\fastspi.lst" /e"fastspi.err" /o"fastspi.o" /y /aINHX8M
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Error[113] D:\MICROCHIP\MPASM SUITE\P18MACRO.INC 182 : Symbol not previously defined (Ptr)
Executing: "D:\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F4525 "fast_int_handler.asm" /l"E:\fdd_emu\bin\fast_int_handler.lst" /e"fast_int_handler.err" /o"fast_int_handler.o" /y /aINHX8M
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "fat32\fat.c" -fo="fat.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "fat32\browse.c" -fo="browse.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "hfe_file.c" -fo="hfe_file.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "ihm.c" -fo="ihm.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "floppyemulation.c" -fo="floppyemulation.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "floppypinsstate.c" -fo="floppypinsstate.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "browse.c" -fo="browse.o" --extended
Executing: "D:\Microchip\mcc18\bin\mcc18-extended.exe" -p=18F4525 /i"D:\Microchip\mcc18\mpasm" "fat.c" -fo="fat.o" --extended
Skipping link step. Not all sources built successfully.
----------------------------------------------------------------------
Release build of project `E:\fdd_emu\sources\pic2.mcp' failed.
Tue Jan 06 17:44:32 2009
----------------------------------------------------------------------
BUILD FAILED
Hi,

this message is due to an error in the P18MACRO.INC assembler macro file (\MCC18\mpasm\P18MACRO.INC), in Stk1PopToReg macro.

To correct this replace the line "movff PLUSW1,Ptr" by "movff PLUSW1,Reg" in Stk1PopToReg macro (line 182)
gem1144aaa
Posts: 4
Joined: Tue Jan 06, 2009 5:51 pm

Post by gem1144aaa »

Hi Jeff

I really appreciate your fast help

i did what you said

it compiles ok
but now i got some thing strange when linking

i get this message

MPLINK 4.20, Linker
Copyright (c) 2008 Microchip Technology Inc.
Error - mutliple inclusion of object file 'D:\Microchip\mcc18\temp\browse.o'
Errors : 1

Link step failed.

when i checked for the reason in mplink help it said it is a multiple instance of the browse.o

and when i checked the build line order i found it repeated twice like this and i do not know from where i can correct the problem.

Executing: "D:\Microchip\mcc18\bin\mplink.exe" /l"D:\Microchip\mcc18\lib" /l"E:\fdd_emu\sources" /k"D:\Microchip\mcc18\lkr" /k"D:\Microchip\mcc18\bin\LKR" "18f4525.lkr" "D:\Microchip\mcc18\temp\main.o" "D:\Microchip\mcc18\temp\lcd.o" "D:\Microchip\mcc18\temp\utils.o" "D:\Microchip\mcc18\temp\hardware.o" "D:\Microchip\mcc18\temp\sdcard_lba.o" "D:\Microchip\mcc18\temp\clearblock.o" "D:\Microchip\mcc18\temp\fastspi.o" "D:\Microchip\mcc18\temp\fast_int_handler.o" "D:\Microchip\mcc18\temp\fat.o" "D:\Microchip\mcc18\temp\browse.o" "D:\Microchip\mcc18\temp\hfe_file.o" "D:\Microchip\mcc18\temp\ihm.o" "D:\Microchip\mcc18\temp\floppyemulation.o" "D:\Microchip\mcc18\temp\floppypinsstate.o" "D:\Microchip\mcc18\temp\browse.o" "D:\Microchip\mcc18\temp\fat.o" "D:\Microchip\mcc18\lib\clib.lib" "D:\Microchip\mcc18\lib\clib_e.lib" "D:\Microchip\mcc18\lib\p18f4525.lib" /u_CRUNTIME /o"pic2.cof" /M"pic2.map" /W

MPLINK 4.20, Linker
Copyright (c) 2008 Microchip Technology Inc.
Error - mutliple inclusion of object file 'D:\Microchip\mcc18\temp\browse.o'
Errors : 1

i do not know how this is repeated?

thanks again for your help
Jeff
Site Admin
Posts: 8247
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Post by Jeff »

gem1144aaa wrote:Hi Jeff

I really appreciate your fast help

i did what you said

it compiles ok
but now i got some thing strange when linking

i get this message

MPLINK 4.20, Linker
Copyright (c) 2008 Microchip Technology Inc.
Error - mutliple inclusion of object file 'D:\Microchip\mcc18\temp\browse.o'
Errors : 1

Link step failed.

when i checked for the reason in mplink help it said it is a multiple instance of the browse.o

and when i checked the build line order i found it repeated twice like this and i do not know from where i can correct the problem.

Executing: "D:\Microchip\mcc18\bin\mplink.exe" /l"D:\Microchip\mcc18\lib" /l"E:\fdd_emu\sources" /k"D:\Microchip\mcc18\lkr" /k"D:\Microchip\mcc18\bin\LKR" "18f4525.lkr" "D:\Microchip\mcc18\temp\main.o" "D:\Microchip\mcc18\temp\lcd.o" "D:\Microchip\mcc18\temp\utils.o" "D:\Microchip\mcc18\temp\hardware.o" "D:\Microchip\mcc18\temp\sdcard_lba.o" "D:\Microchip\mcc18\temp\clearblock.o" "D:\Microchip\mcc18\temp\fastspi.o" "D:\Microchip\mcc18\temp\fast_int_handler.o" "D:\Microchip\mcc18\temp\fat.o" "D:\Microchip\mcc18\temp\browse.o" "D:\Microchip\mcc18\temp\hfe_file.o" "D:\Microchip\mcc18\temp\ihm.o" "D:\Microchip\mcc18\temp\floppyemulation.o" "D:\Microchip\mcc18\temp\floppypinsstate.o" "D:\Microchip\mcc18\temp\browse.o" "D:\Microchip\mcc18\temp\fat.o" "D:\Microchip\mcc18\lib\clib.lib" "D:\Microchip\mcc18\lib\clib_e.lib" "D:\Microchip\mcc18\lib\p18f4525.lib" /u_CRUNTIME /o"pic2.cof" /M"pic2.map" /W

MPLINK 4.20, Linker
Copyright (c) 2008 Microchip Technology Inc.
Error - mutliple inclusion of object file 'D:\Microchip\mcc18\temp\browse.o'
Errors : 1

i do not know how this is repeated?

thanks again for your help
i don't know. try to compile from the website firmware zip file.
gem1144aaa
Posts: 4
Joined: Tue Jan 06, 2009 5:51 pm

Post by gem1144aaa »

hi Jeff

with your help and a lot of work i could finally build and get a hex file typical to yours.

now my problem is when i choose an image file witch is an image of a 3.5" 1.44mb stranded dos formatted floppy that created using the order

" disk2fdi a: e:\my_file /h2 /sst18.2 "

the emulator responds "Bad file" to my_file and also for the images found on you site

i didn't stop

i traced your code and i found the test

in the file named floppyemulation.c as follows

if(sectorBuffer[0]=='H' && sectorBuffer[1]=='X' && sectorBuffer[2]=='C' && sectorBuffer[3]=='P')


i just added the following statements before the test to insure that its result is true so it looked like this

sectorBuffer[0]='H' ;
sectorBuffer[1]='X' ;
sectorBuffer[2]='C' ;
sectorBuffer[3]='P' ;

if(sectorBuffer[0]=='H' && sectorBuffer[1]=='X' && sectorBuffer[2]=='C' && sectorBuffer[3]=='P')

it accepted the file and i got the following

T:51 S:121 Br:25

how come the number of sides to be 121 ?

and wher is the problem?

thankx again Jeff
Jeff
Site Admin
Posts: 8247
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Post by Jeff »

gem1144aaa wrote:hi Jeff

with your help and a lot of work i could finally build and get a hex file typical to yours.

now my problem is when i choose an image file witch is an image of a 3.5" 1.44mb stranded dos formatted floppy that created using the order

" disk2fdi a: e:\my_file /h2 /sst18.2 "

the emulator responds "Bad file" to my_file and also for the images found on you site

i didn't stop

i traced your code and i found the test

in the file named floppyemulation.c as follows

if(sectorBuffer[0]=='H' && sectorBuffer[1]=='X' && sectorBuffer[2]=='C' && sectorBuffer[3]=='P')


i just added the following statements before the test to insure that its result is true so it looked like this

sectorBuffer[0]='H' ;
sectorBuffer[1]='X' ;
sectorBuffer[2]='C' ;
sectorBuffer[3]='P' ;

if(sectorBuffer[0]=='H' && sectorBuffer[1]=='X' && sectorBuffer[2]=='C' && sectorBuffer[3]=='P')

it accepted the file and i got the following

T:51 S:121 Br:25

how come the number of sides to be 121 ?

and wher is the problem?

thankx again Jeff

You need to use this software to convert your images files to the hfe file format ( the only one supported by the sdcard emulator) :
(this must work without your code modifications)

https://hxc2001.com/floppy_drive_emulat ... r_soft.zip
gem1144aaa
Posts: 4
Joined: Tue Jan 06, 2009 5:51 pm

Post by gem1144aaa »

Hi Jeff

thankxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

you are a real sniper

you should start the new age of computers and say good by for ever to both IBM and Microsoft :lol:
Post Reply