|
|
View previous topic :: View next topic |
Author |
Message |
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
Bug in the 3.202 and 3.203 |
Posted: Sat Jul 03, 2004 12:16 pm |
|
|
Hi,
I have a program that use the 82% the ROM in a PIC18F8720, I am using the version 3.200 and work ok!, but I put the new version 3.203 and my program not work. I see the follow difference in the LST files, in the version 3.200 the first line is a GOTO 1914C to the main function and this address is right!, but in the version 3.203 (3.202 too) the first line is a GOTO 18956 but this address not exist in the LST!!!!, the main function exist in the address 8956.
You can understand the problem?
Best Regards,
Code: | LST - 3.200
MPASM
CCS PCH C Compiler, Version 3.200, 20761
Filename: pam.LST
ROM used: 107078 bytes (82%)
Largest free fragment is 23964
RAM used: 1904 (50%) at main() level
2945 (77%) worst case
Stack: 12 locations
0000 EFA6 F0C8 00001 GOTO 1914C
....................
....................
....................
0000 64347 .................... ////////////////////////////////////////////////////////////////////////////
0000 64348 .................... //
0000 64349 .................... // Main
0000 64350 .................... //
0000 64351 .................... ////////////////////////////////////////////////////////////////////////////
0000 64352 .................... void main()
0000 64353 .................... {
1914C 6AF8 64354 CLRF FF8
1914E 9ED0 64355 BCF FD0.7
19150 0EFE 64356 MOVLW FE
19152 6E00 64357 MOVWF 00
19154 0E0F 64358 MOVLW 0F
19156 6E01 64359 MOVWF 01
19158 6AEA 64360 CLRF FEA
|
Code: |
LST - 3.203
MPASM
CCS PCH C Compiler, Version 3.203, 20761
Filename: pam.LST
ROM used: 105016 bytes (80%)
Largest free fragment is 26010
RAM used: 1904 (50%) at main() level
2945 (77%) worst case
Stack: 12 locations
0000 EFAB F0C4 00001 GOTO 18956
....................
....................
....................
0000 63056 .................... ////////////////////////////////////////////////////////////////////////////
0000 63057 .................... //
0000 63058 .................... // Main
0000 63059 .................... //
0000 63060 .................... ////////////////////////////////////////////////////////////////////////////
0000 63061 .................... void main()
0000 63062 .................... {
8956 6AF8 63063 CLRF FF8
8958 9ED0 63064 BCF FD0.7
895A 0EFE 63065 MOVLW FE
895C 6E00 63066 MOVWF 00
895E 0E0F 63067 MOVLW 0F
8960 6E01 63068 MOVWF 01
8962 6AEA 63069 CLRF FEA
|
|
|
|
Guest
|
Strange LST |
Posted: Sat Jul 03, 2004 5:26 pm |
|
|
Why does your lst have MPASM at the top ?
The message about Stack: is also wrong...
!
If it is a bug then report it. |
|
|
Guest
|
Re: Strange LST |
Posted: Sun Jul 04, 2004 12:33 am |
|
|
Anonymous wrote: | Why does your lst have MPASM at the top ?
|
Options -> File Formats -> Microchip
then you will see MPASM at the top |
|
|
C-H Wu Guest
|
Re: Bug in the 3.202 and 3.203 |
Posted: Sun Jul 04, 2004 12:43 am |
|
|
cfernandez wrote: | Code: |
LST - 3.203
0000 EFAB F0C4 00001 GOTO 18956
....................
....................
0000 63061 .................... void main()
0000 63062 .................... {
8956 6AF8 63063 CLRF FF8
63069 CLRF FEA
|
|
18956 show up as 8956 might be just simple truncation instead of bug.
However, I did catch a bug new in 3.203 in case of large RAM usage, read my next post. |
|
|
C-H Wu Guest
|
read_adc() bug in PCH 3.203 |
Posted: Sun Jul 04, 2004 12:58 am |
|
|
To whom it may concern:
Bug report ... PCH 3.203 + PIC18F458
ADRESH is missing in read_adc() in case of BSR change is needed.
Same bug for read_adc( ADC_READ_ONLY )
Code: | // bug_3203_BSR_read_adc.c by C-H Wu 2004/07/04
//
#include <18F458.H>
#fuses HS, PUT, NOLVP, NODEBUG
#device ADC=10 // select 10-bit AD results
int16 ad_data;
#byte ad_data = 0x300 // this line causes ADRESH missing !
#use delay ( clock = 20000000 )
#use rs232 ( baud = 115200, xmit=PIN_C6, rcv=PIN_C7 )
#zero_ram
void main()
{
setup_adc_ports ( A_ANALOG );
setup_adc( ADC_CLOCK_DIV_32 );
set_adc_channel( 0 );
while ( 1 )
{
// ad_data = read_adc(); // unmark this line will save the next line !!
// because bank select is no longer needed.
ad_data = read_adc(); // Bug ! MOVFF ADRESH,ad_data+1 is missing !
printf("\r\n AN0 = %lu ", ad_data); delay_ms(1000);
}
}
|
the LST file is
Quote: | .................... while ( 1 )
.................... {
.................... // ad_data = read_adc(); // unmark this line will save the next line !!
.................... // because bank select is no longer needed.
....................
.................... ad_data = read_adc(); // Bug ! MOVFF ADRESH,ad_data+1 is missing !
0152: BSF ADCON0.2
0154: BTFSC ADCON0.2
0156: GOTO 0154
015A: MOVLB 3
015C: MOVFF ADRESL,ad_data
....................
.................... printf("\r\n AN0 = %lu ", ad_data); delay_ms(1000);
|
where is ADRESH ???
unmark the first line of read_adc(), the LST file turns out to be
Quote: | .................... while ( 1 )
.................... {
.................... ad_data = read_adc(); // unmark this line will save the next line !!
0152: BSF ADCON0.2
0154: BTFSC ADCON0.2
0156: GOTO 0154
015A: MOVLB 3
015C: MOVFF ADRESL,ad_data <--- bug ! ADRESH is missing !
.................... // because bank select is no longer needed.
....................
.................... ad_data = read_adc(); // Bug ! MOVFF ADRESH,ad_data+1 is missing !
0160: BSF ADCON0.2
0162: BTFSC ADCON0.2
0164: GOTO 0162
0168: MOVFF ADRESL,ad_data
016C: MOVFF ADRESH,ad_data+1 <--- this is correct
....................
.................... printf("\r\n AN0 = %lu ", ad_data); delay_ms(1000);
|
Could there be more bugs of this kind in 3.203 ????
Best wishes
C-H Wu
p.s. I did send a bug report to CCS, but ... what day is today ?
Happy July the 4th ! |
|
|
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
|
Posted: Sun Jul 04, 2004 3:03 pm |
|
|
I send yesterday this bug report to CCS, wait for your answer tomorrow. |
|
|
Guest
|
Re: Strange LST |
Posted: Sun Jul 04, 2004 7:25 pm |
|
|
Anonymous wrote: | Anonymous wrote: | Why does your lst have MPASM at the top ?
|
Options -> File Formats -> Microchip
then you will see MPASM at the top |
OK why does yout stack line look different ? |
|
|
C-H Wu Guest
|
Re: read_adc() bug in PCH 3.203 |
Posted: Mon Jul 05, 2004 8:02 pm |
|
|
C-H Wu wrote: | To whom it may concern:
Bug report ... PCH 3.203 + PIC18F458
ADRESH is missing in read_adc() in case of BSR change is needed.
Same bug for read_adc( ADC_READ_ONLY )
Happy July the 4th !
|
bug fixed in 3.204, in two days
Happy July the 6th
C-H Wu |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|