Page 1 of 1

Compile Error :Bad function absolute address

Posted: 26 Jan 2010 20:35
by keanhee
Hi,
I've wrote to support desk. But the responses were slow. Hope i can get some help here.

Recently i've migrated to MikroC Pro 2009. After some code editing and finally there was no any syntax error. But at the end of the compilation, the error messages below shown.

Code: Select all

0 127 All files Compiled in 2515 ms  
15 361 Bad function absolute address 'UART1_Init[210]' __Lib_UART_c67.c
15 342 There is not enough ROM space UART1_Init[210] __Lib_UART_c67.c
0 127 All files Compiled in 2515 ms  
I'm using PIC18F4525. I've very sure that the pic has sufficient ROM and RAM for this project. Because i compiled with previous MikroC 8.2, it only consumed 35% ROM and 25% RAM.
Any help on this will be appreciated. :)

Posted: 27 Jan 2010 15:44
by anikolic
Hi,
I have answered you to the support ticket, but I'm posting the answer here for the sake of others:
Our developers have detected a compiler bug, but unfortunately, due to it's nature, there is no direct workaround for this issue. This bug will, however, be resolved for the next release of the compiler.
There can be only one possible workaround, and that would be unchecking the Tools->Options->Output Settings->Compiler->Build all files as library checkbox, and rebuilding the project.

Sorry for the inconvenience.

Best regards,
Aleksandar

Re: Compile Error :Bad function absolute address

Posted: 30 Mar 2011 03:47
by Ian Christie
I am using mikroPascal Pro for AVR v.4.60.0.0 and getting the same errors.

An application which had previously compiled and linked with an earlier version of mikroPascal (I don't have a record of which version) still compiles without errors but the linker reports errors:-
.
.
.
0 133 Compilation Started C:......
1 1015 Hint: Compiling unit "C:......
68 1019 Warning: Source size may exceed destination size ..... .mpas
69 1019 Warning: Source size may exceed destination size .... .mpas
89 1010 Hint: Unit "..... .mpas" has been recompiled ..... .mpas
0 134 Compiled Successfully C: ......
0 139 All files Compiled in 47 ms
588 361 Bad function absolute address 'clk_tic[28]'
239 361 Bad function absolute address 'tx_afsk[26]'
588 342 There is not enough ROM space
239 342 There is not enough ROM space
0 453 Unsuccessful linking '.....mppav' Unsuccessful linking '..... .mppav'
0 102 Finished (with errors): 30 Mar 2011, 12:32:30 ..... .mppav

Is this the same bug as referred to above? And has it been fixed?
Or is there something else I am missing?
I don't think the size warnings are relevant, they showed previously but the hex file was small enough to not exceed the size limit of the free version.
Any suggestions?
Cheers
Ian

Re: Compile Error :Bad function absolute address

Posted: 30 Mar 2011 09:41
by filip
Hi,

Can you provide the minimal project that represents this issue ?

Regards,
Filip.

Re: Compile Error :Bad function absolute address

Posted: 30 Mar 2011 23:09
by Ian Christie
Filip;
Thanks for the quick response. I have tried to attach the .mpas and .mppav files but I keep getting error messages that "The extension ... is not allowed". I have tried variations without extensions and with .txt extensions but to no avail. I will try emailing them to you.
Cheers
Ian

Re: Compile Error :Bad function absolute address

Posted: 09 Apr 2011 10:53
by Mince-n-Tatties
to post files on the forum, they need to be zipped. winzip, winrar, 7zip, etc etc there is also a maximum zip file size but there should be no size problems with a basic project zip.