Cannot generate coff file with an embedded assembly program

General discussion on mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
freewheel
Posts: 17
Joined: 01 Oct 2008 10:36

Cannot generate coff file with an embedded assembly program

#1 Post by freewheel » 09 Feb 2010 09:39

Dear mikroElektronika,

Thanks for your supports in the new release (mikroC PRO for dsPIC).
When I checked a new feature which allows to generate COFF file for software and hardware debugging under Microchip's MPLAB software, but it don't work with an embedded assembly code section.
I attached an example for you.
Please let me why???
Thanks!
Attachments
ASM_INLINE.rar
(51.9 KiB) Downloaded 197 times

User avatar
nlukic
mikroElektronika team
Posts: 66
Joined: 06 Mar 2009 10:46

Re: Cannot generate coff file with an embedded assembly program

#2 Post by nlukic » 10 Feb 2010 13:42

Hello, freewheel!

I've examined the code you have send. The problem was generated by line 98 in your asm_inline.c file, a not by asm commands. Even, variable 'c' has been eliminated by optimizer, it still make some trouble to COFF. Thank you for reporting. We will fix this issue and include it in next release.

Temporary solution:
Please, remove a line 98 from your code. The 'c' variable is already removed by optimizer, so it wouldn't take effect to your code.


Regards,
nlukic

mikroElektronika team

freewheel
Posts: 17
Joined: 01 Oct 2008 10:36

Re: Cannot generate coff file with an embedded assembly program

#3 Post by freewheel » 11 Feb 2010 08:28

Dear nlukic!

Thanks for your reply. I removed the line 98 and COFF file has been generated! But when I loaded it by Mplab IDE enviroment, it has an error "Failed to load C:\...\asm_inline.coff ".

Please explain me what happenning is?

Thank again!

User avatar
nlukic
mikroElektronika team
Posts: 66
Joined: 06 Mar 2009 10:46

Re: Cannot generate coff file with an embedded assembly program

#4 Post by nlukic » 11 Feb 2010 10:29

Hello, freewheel!

I've try it again, and it works fine for me. Check out the attachment! Are you sure you have loaded new generated coff into MPLAB?

Regards,
Attachments
asm_inline.rar
(100.15 KiB) Downloaded 175 times
nlukic

mikroElektronika team

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 General”