Can't see any C in disassembler view

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't see any C in disassembler view

431 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by RolandWOW on Thu Feb 21 04:32:43 MST 2013
[SIZE=2]I am using:
  [SIZE=1]
Version: LPCXpresso v5.0.12 [Build 1083] [2012-11-22]
[/SIZE]
Here is an excerpt from C-source:
...

AMD_System_Init();

 
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//GPIO Configuration[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
  GPIO_Init();



 
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//Timer Configuration[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
  Timer_Init();



 
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//Initial HW Configuration[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
  AMD_Channel[0].
[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]Mode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]SENS_INIT[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]
  AMD_Channel[1].
[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]Mode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] = [/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]SENS_INIT[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]
  Set_Path();

This is what the C source looks like:

 
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]//SPI Configuration[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]
  SPI_Init();

  SPI_Reset();

  ADC_Init();

  init_flag = 0;
[/SIZE]
This is what I see in disassembler window:

0x00000140:   push {r3, r4, r5, lr}
0x00000142:   bl 0x230 <AMD_System_Init>
0x00000146:   bl 0x334 <GPIO_Init>
0x0000014a:   bl 0x408 <Timer_Init>
0x0000014e:   ldr r3, [pc, #88] ; (0x1a8 <main+104>)
0x00000150:   movs r2, #10
0x00000152:   str r2, [r3, #0]
0x00000154:   str r2, [r3, #108] ; 0x6c
0x00000156:   bl 0x6cc <Set_Path>
0x0000015a:   bl 0x298 <SPI_Init>
0x0000015e:   bl 0x7f8 <SPI_Reset>
0x00000162:   bl 0x3ac <ADC_Init>
0x00000166:   ldr r3, [pc, #68] ; (0x1ac <main+108>)
0x00000168:   movs r2, #128 ; 0x80
0x0000016a:   lsls r2, r2, #24
0x0000016c:   str r2, [r3, #0]
0x0000016e:   movs r2, #199 ; 0xc7
0 Kudos
Reply
5 Replies

418 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Feb 21 08:50:57 MST 2013
This is a bug in v5.x and will be fixed in the next release.
0 Kudos
Reply

418 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by RolandWOW on Thu Feb 21 08:25:01 MST 2013
Thanks a lot for for your quick response!

Here are the options. As -g3 is on, I would  expect maximum debugging comfort, but here isnt:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-D__REDLIB__ -D_FEP -D__USE_CMSIS -DDEBUG -D__CODE_RED -I"D:\Users\rsonnens\Documents\LPCXpresso_5.0.12_1083\workspace\lpc_prj\communication" -I"D:\Users\rsonnens\Documents\LPCXpresso_5.0.12_1083\workspace\lpc_prj\configuration" -I"D:\Users\rsonnens\Documents\LPCXpresso_5.0.12_1083\workspace\lpc_prj\evaluation" -I"D:\Users\rsonnens\Documents\LPCXpresso_5.0.12_1083\workspace\lpc_prj\inc" -I"D:\Users\rsonnens\Documents\LPCXpresso_5.0.12_1083\workspace\lpc_prj\init" -I"D:\Users\rsonnens\Documents\LPCXpresso_5.0.12_1083\workspace\lpc_prj\src" -O0 -Os -mword-relocations -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Doing a right mouse click will insert "main:" at the proper place in disassembly, but no C-source lines:
            main:
0x00000140:   push {r3, r4, r5, lr}
0x00000142:   bl 0x230 <AMD_System_Init>
0x00000146:   bl 0x334 <GPIO_Init>
0x0000014a:   bl 0x408 <Timer_Init>
0x0000014e:   ldr r3, [pc, #88] ; (0x1a8 <main+104>)
0x00000150:   movs r2, #10
0x00000152:   str r2, [r3, #0]
0x00000154:   str r2, [r3, #108] ; 0x6c
0x00000156:   bl 0x6cc <Set_Path>
0x0000015a:   bl 0x298 <SPI_Init>
0x0000015e:   bl 0x7f8 <SPI_Reset>
0x00000162:   bl 0x3ac <ADC_Init>
0x00000166:   ldr r3, [pc, #68] ; (0x1ac <main+108>)
0x00000168:   movs r2, #128 ; 0x80
0x0000016a:   lsls r2, r2, #24
0x0000016c:   str r2, [r3, #0]
0x0000016e:   movs r2, #199 ; 0xc7
0x00000170:   lsls r2, r2, #2
0x00000172:   ldr r0, [r3, r2]
0x00000174:   movs r1, #128 ; 0x80
0x00000176:   lsls r0, r0, #8
0x00000178:   lsrs r0, r0, #8
0x0000017a:   lsls r1, r1, #23
0x0000017c:   orrs r1, r0
0x0000017e:   str r1, [r3, r2]
...
0 Kudos
Reply

418 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ex-kayoda on Thu Feb 21 07:48:09 MST 2013
Same here in Win7 / LPCXpresso V5.1.2 :eek:

[ATTACH]967[/ATTACH]
0 Kudos
Reply

418 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Feb 21 05:11:19 MST 2013
Right click in Disassembly and enable 'Show Symbols' ?
0 Kudos
Reply

418 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wrighflyer on Thu Feb 21 04:59:29 MST 2013
Just checking but the code is compiled with -g is it? (that is the option that tells the compiler to include .loc's in the .s).
0 Kudos
Reply