Jump to content

USB PIC Code Compile Problem


Ciro
 Share

Recommended Posts

Hi Folks.

I can't make the source code compiled. Mplinker gives an error.

Here is the build page:

----------------------------------------------------------------------

Debug build of project `D:\usbmidiasemb.mcp' started.

Language tool versions: MPASMWIN.exe v5.39, mplink.exe v4.38, mplib.exe v4.38

Preprocessor symbol `__DEBUG' is defined.

Sat Jun 25 03:59:58 2011

----------------------------------------------------------------------

Clean: Deleting intermediary and output files.

Clean: Deleted file "D:\iic.o".

Clean: Deleted file "D:\iic.err".

Clean: Deleted file "D:\iic_midi.o".

Clean: Deleted file "D:\iic_midi.err".

Clean: Deleted file "D:\int_midi.o".

Clean: Deleted file "D:\int_midi.err".

Clean: Deleted file "D:\main.o".

Clean: Deleted file "D:\main.err".

Clean: Deleted file "D:\midi.o".

Clean: Deleted file "D:\midi.err".

Clean: Deleted file "D:\usbcls.o".

Clean: Deleted file "D:\usbcls.err".

Clean: Deleted file "D:\usbdrv.o".

Clean: Deleted file "D:\usbdrv.err".

Clean: Deleted file "D:\iic.lst".

Clean: Deleted file "D:\iic_midi.lst".

Clean: Deleted file "D:\int_midi.lst".

Clean: Deleted file "D:\main.lst".

Clean: Deleted file "D:\midi.lst".

Clean: Deleted file "D:\usbcls.lst".

Clean: Deleted file "D:\usbdrv.lst".

Clean: Done.

Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F2550 "src\iic.asm" /l"D:\iic.lst" /e"iic.err" /o"iic.o" /d__DEBUG=1

Warning[215] SRC\IIC.ASM 13 : Processor superseded by command line. Verify processor symbol.

Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P18F4550.INC 33 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)

Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F2550 "src\iic_midi.asm" /l"D:\iic_midi.lst" /e"iic_midi.err" /o"iic_midi.o" /d__DEBUG=1

Warning[215] SRC\IIC_MIDI.ASM 13 : Processor superseded by command line. Verify processor symbol.

Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P18F4550.INC 33 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)

Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F2550 "src\int_midi.asm" /l"D:\int_midi.lst" /e"int_midi.err" /o"int_midi.o" /d__DEBUG=1

Warning[215] SRC\INT_MIDI.ASM 13 : Processor superseded by command line. Verify processor symbol.

Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P18F4550.INC 33 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)

Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F2550 "src\main.asm" /l"D:\main.lst" /e"main.err" /o"main.o" /d__DEBUG=1

Warning[215] SRC\MAIN.ASM 13 : Processor superseded by command line. Verify processor symbol.

Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P18F4550.INC 33 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)

Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F2550 "src\midi.asm" /l"D:\midi.lst" /e"midi.err" /o"midi.o" /d__DEBUG=1

Warning[215] SRC\MIDI.ASM 13 : Processor superseded by command line. Verify processor symbol.

Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P18F4550.INC 33 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)

Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F2550 "src\usbcls.asm" /l"D:\usbcls.lst" /e"usbcls.err" /o"usbcls.o" /d__DEBUG=1

Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P18F4550.INC 33 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)

Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F2550 "src\usbdrv.asm" /l"D:\usbdrv.lst" /e"usbdrv.err" /o"usbdrv.o" /d__DEBUG=1

Warning[215] SRC\USBDRV.ASM 13 : Processor superseded by command line. Verify processor symbol.

Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P18F4550.INC 33 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)

Executing: "C:\Program Files\Microchip\MPASM Suite\mplink.exe" /p18F2550 /l"C:\Documents and Settings\Ciro\My Documents\Downloads" /l"C:\Program Files\Microchip\MPASM Suite" /k"D:\mbhp_usb_pic_v1_1" "mbhp_usb_pic_v1_1\18f4550.lkr" "iic.o" "iic_midi.o" "int_midi.o" "main.o" "midi.o" "usbcls.o" "usbdrv.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"D:\usbmidiasemb.cof" /M"D:\usbmidiasemb.map" /W

MPLINK 4.38, Linker

Copyright © 1998-2010 Microchip Technology Inc.

Error - could not find definition of symbol '_USBDSC_DEVICE' in file './usbdrv.o'.

Errors : 1

Link step failed.

----------------------------------------------------------------------

Debug build of project `D:\usbmidiasemb.mcp' failed.

Language tool versions: MPASMWIN.exe v5.39, mplink.exe v4.38, mplib.exe v4.38

Preprocessor symbol `__DEBUG' is defined.

Sat Jun 25 04:00:07 2011

----------------------------------------------------------------------

BUILD FAILED

Can anyone tell me what is wrong?

Thank you .

Link to comment
Share on other sites

Most of the errors are because of "processor mismatch"

The code claims to be built for a specific chip, but the menus of MPLAB are set for some different chip.

Originally, the code would define which chip it was intended for..

Then at some point along the evolution of MPLAB, the user was expected to use menus to select which chip the build was for.

So now it is supposed to support BOTH styles, and it will complain if they do not match.

That's all the warnings anyway.. then there is the following error:

Error - could not find definition of symbol '_USBDSC_DEVICE' in file './usbdrv.o'.

Which you'll have to look into yourself. Getting the right processor definitions might fix that too.

Have Fun,

LyleHaze

Link to comment
Share on other sites

I'm unsure if it's possible to compile this code with MPLAB, as usbdrv requires a table which is defined in usbdsc.c

It seems that you haven't compiled this .c file (this explains why the symbol _USBDSC_DEVICE can't be found.

As far as I remember, it should be possible to integrate SDCC into MPLAB.

Alternatively, just compile the complete project with the common MIOS8 toolchain (which consists of gputils, SDCC and MinGW)

Best Regards, Thorsten.

Link to comment
Share on other sites

I'm unsure if it's possible to compile this code with MPLAB, as usbdrv requires a table which is defined in usbdsc.c

It seems that you haven't compiled this .c file (this explains why the symbol _USBDSC_DEVICE can't be found.

As far as I remember, it should be possible to integrate SDCC into MPLAB.

Alternatively, just compile the complete project with the common MIOS8 toolchain (which consists of gputils, SDCC and MinGW)

Best Regards, Thorsten.

Thanks Thorsten for your help. can you tell where can I download the MIOS8 toolchain?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...