How can the contents of ydata memory be displayed in table form? - it looks like the RAM debug window is limited to the the top of xdata memory (0x27FF on my 33fj128gp802).
Also it would be nice if there were some display options to display the ram as ints or floats etc or just group in 1,2,3 ... 8 byte fields.
No ydata ram display?
- nikola.kostic
- mikroElektronika team
- Posts: 433
- Joined: 11 Aug 2009 12:12
Here's the code I used
int xdata xxx = 9 ;
volatile int yyy absolute 0x2A00;
void main() {
int temp;
yyy = 7;
temp = xxx;
xxx = yyy;
yyy = temp;
}
I was not able to view 'yyy' in the debug RAM window as it only showed up to address 0x27ff, the problem was the same in release and icd debug mode - I'm probably making some stupid mistake.
int xdata xxx = 9 ;
volatile int yyy absolute 0x2A00;
void main() {
int temp;
yyy = 7;
temp = xxx;
xxx = yyy;
yyy = temp;
}
I was not able to view 'yyy' in the debug RAM window as it only showed up to address 0x27ff, the problem was the same in release and icd debug mode - I'm probably making some stupid mistake.
- nikola.kostic
- mikroElektronika team
- Posts: 433
- Joined: 11 Aug 2009 12:12
.LST and .ASM output are different
Hi - I've also noticed that there are differences between the assembly code written to the '.asm' and '.lst' files for my test code - see below.
Looking at the first two MOV instructions the constants #2048 and #6142 in the '.asm' file are #2050 and #10239 in the '.lst' file.
I havent looked at the generated hex code to determine whats put in the HEX output but I think this difference might need inspection.
Also the CALL 552 (and the called code) present in the '.lst' (global variable initialisation, I assume) is missing in the '.asm' file - I think it should be shown in both files eg CALL _initialise_globals etc).
Here are the '.asm' and '.lst' showing the differences (using a Release / Software Debug build).
Assemble file output:
==============
List file output (just showing the program code):
===============================
Looking at the first two MOV instructions the constants #2048 and #6142 in the '.asm' file are #2050 and #10239 in the '.lst' file.
I havent looked at the generated hex code to determine whats put in the HEX output but I think this difference might need inspection.
Also the CALL 552 (and the called code) present in the '.lst' (global variable initialisation, I assume) is missing in the '.asm' file - I think it should be shown in both files eg CALL _initialise_globals etc).
Here are the '.asm' and '.lst' showing the differences (using a Release / Software Debug build).
Assemble file output:
==============
Code: Select all
_main:
MOV #2048, W15
MOV #6142, W0
MOV WREG, SPLIM
MOV #1, W0
MOV WREG, PSVPAG
MOV #4, W0
IOR CORCON, 1
LNK #2
;tester.c,6 :: void main() {
;tester.c,8 :: yyy = 7;
MOV #7, W0
MOV W0, _yyy
;tester.c,9 :: temp = xxx;
MOV _xxx, W0
MOV W0, [W14+0]
;tester.c,10 :: xxx = yyy;
MOV _yyy, W0
MOV W0, _xxx
;tester.c,11 :: yyy = temp;
MOV [W14+0], W0
MOV W0, _yyy
;tester.c,12 :: }
L_end_main:
ULNK
L__main1:
BRA L__main1
; end of _main
===============================
Code: Select all
main:
0x0200 0x20802F MOV #2050, W15
0x0202 0x227FF0 MOV #10239, W0
0x0204 0xB7A020 MOV WREG, SPLIM
0x0206 0x200010 MOV #1, W0
0x0208 0xB7A034 MOV WREG, PSVPAG
0x020A 0x200040 MOV #4, W0
0x020C 0xB72044 IOR CORCON, 1
0x020E 0xFA0002 LNK #2
0x0210 0x000000020228 CALL 552
;tester.c,6 :: void main() {
;tester.c,8 :: yyy = 7;
0x0214 0x200070 MOV #7, W0
0x0216 0x894000 MOV W0, _yyy
;tester.c,9 :: temp = xxx;
0x0218 0x804000 MOV _xxx, W0
0x021A 0x980700 MOV W0, [W14+0]
;tester.c,10 :: xxx = yyy;
0x021C 0x814000 MOV _yyy, W0
0x021E 0x884000 MOV W0, _xxx
;tester.c,11 :: yyy = temp;
0x0220 0x90000E MOV [W14+0], W0
0x0222 0x894000 MOV W0, _yyy
;tester.c,12 :: }
L_end_main:
0x0224 0xFA8000 ULNK
L__main1:
0x0226 0x37FFFF BRA L__main1
; end of _main
0x0228 0x228001 MOV lo_addr(_yyy), W1
0x022A 0x280000 MOV #32768, W0
0x022C 0x090000 REPEAT #0
0x022E 0x7818B0 MOV [W0++], [W1++]
0x0230 0x208001 MOV lo_addr(_xxx), W1
0x0232 0x280020 MOV #32770, W0
0x0234 0x090000 REPEAT #0
0x0236 0x7818B0 MOV [W0++], [W1++]
0x0238 0x060000 RETURN
.LST and .ASM output are different
Hi - I've also noticed that there are differences between the assembly code written to the '.asm' and '.lst' files for my test code - see below.
Looking at the first two MOV instructions the constants #2048 and #6142 in the '.asm' file are #2050 and #10239 in the '.lst' file.
I havent looked at the generated hex code to determine whats put in the HEX output but I think this difference might need inspection.
Also the CALL 552 (and the called code) present in the '.lst' (global variable initialisation, I assume) is missing in the '.asm' file - I think it should be shown in both files eg CALL _initialise_globals or whatever).
Here are the '.asm' and '.lst' showing the differences (using a Release / Software Debug build).
Assemble file output:
==============
List file output (just showing the program code):
===============================
Looking at the first two MOV instructions the constants #2048 and #6142 in the '.asm' file are #2050 and #10239 in the '.lst' file.
I havent looked at the generated hex code to determine whats put in the HEX output but I think this difference might need inspection.
Also the CALL 552 (and the called code) present in the '.lst' (global variable initialisation, I assume) is missing in the '.asm' file - I think it should be shown in both files eg CALL _initialise_globals or whatever).
Here are the '.asm' and '.lst' showing the differences (using a Release / Software Debug build).
Assemble file output:
==============
Code: Select all
_main:
MOV #2048, W15
MOV #6142, W0
MOV WREG, SPLIM
MOV #1, W0
MOV WREG, PSVPAG
MOV #4, W0
IOR CORCON, 1
LNK #2
;tester.c,6 :: void main() {
;tester.c,8 :: yyy = 7;
MOV #7, W0
MOV W0, _yyy
;tester.c,9 :: temp = xxx;
MOV _xxx, W0
MOV W0, [W14+0]
;tester.c,10 :: xxx = yyy;
MOV _yyy, W0
MOV W0, _xxx
;tester.c,11 :: yyy = temp;
MOV [W14+0], W0
MOV W0, _yyy
;tester.c,12 :: }
L_end_main:
ULNK
L__main1:
BRA L__main1
; end of _main
===============================
Code: Select all
main:
0x0200 0x20802F MOV #2050, W15
0x0202 0x227FF0 MOV #10239, W0
0x0204 0xB7A020 MOV WREG, SPLIM
0x0206 0x200010 MOV #1, W0
0x0208 0xB7A034 MOV WREG, PSVPAG
0x020A 0x200040 MOV #4, W0
0x020C 0xB72044 IOR CORCON, 1
0x020E 0xFA0002 LNK #2
0x0210 0x000000020228 CALL 552
;tester.c,6 :: void main() {
;tester.c,8 :: yyy = 7;
0x0214 0x200070 MOV #7, W0
0x0216 0x894000 MOV W0, _yyy
;tester.c,9 :: temp = xxx;
0x0218 0x804000 MOV _xxx, W0
0x021A 0x980700 MOV W0, [W14+0]
;tester.c,10 :: xxx = yyy;
0x021C 0x814000 MOV _yyy, W0
0x021E 0x884000 MOV W0, _xxx
;tester.c,11 :: yyy = temp;
0x0220 0x90000E MOV [W14+0], W0
0x0222 0x894000 MOV W0, _yyy
;tester.c,12 :: }
L_end_main:
0x0224 0xFA8000 ULNK
L__main1:
0x0226 0x37FFFF BRA L__main1
; end of _main
0x0228 0x228001 MOV lo_addr(_yyy), W1
0x022A 0x280000 MOV #32768, W0
0x022C 0x090000 REPEAT #0
0x022E 0x7818B0 MOV [W0++], [W1++]
0x0230 0x208001 MOV lo_addr(_xxx), W1
0x0232 0x280020 MOV #32770, W0
0x0234 0x090000 REPEAT #0
0x0236 0x7818B0 MOV [W0++], [W1++]
0x0238 0x060000 RETURN
- nikola.kostic
- mikroElektronika team
- Posts: 433
- Joined: 11 Aug 2009 12:12
Posible error in P33fj64gp802.mlk
Hi - thanks for fixing the YData display problem for the 33fj128GP802 -
FYI the RAM ranges specified in P33fj64gp802.mlk seem to be wrong in the latest release of .mlk files.
FYI the RAM ranges specified in P33fj64gp802.mlk seem to be wrong in the latest release of .mlk files.
Hi,
Jer could you send me an email at marko.ziv@mikroe.com, with a little bit more details on this issue so we can check it out?
Thank You
Jer could you send me an email at marko.ziv@mikroe.com, with a little bit more details on this issue so we can check it out?
Thank You
LibStock
http://www.libstock.com/
mikroSDK
https://www.mikroe.com/mikrosdk
mikroBUS
https://www.mikroe.com/mikrobus
http://www.libstock.com/
mikroSDK
https://www.mikroe.com/mikrosdk
mikroBUS
https://www.mikroe.com/mikrobus
16KByte not 8KByte
Apologies – I was convinced that the 33fj64gp802 had 8 Kbytes of RAM but (after another read of dspic manual) it has 16 KB which means the RAM ranges in the P33fj64gp802 are correct.