lpcware

Can't see any C in disassembler view

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
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

Outcomes