Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | crossworks gcc dissassembly

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

crossworks gcc dissassembly - rseku - Nov 3 3:47:00 2005

Below is a view of code received in crossworks dissassembly in
interleaved mode:

IO0CLR = IOW; // Toggle IOW-signal
4A10 ldr r2, [pc, #16]
2308 mov r3, #8
6013 str r3, [r2, #0]
IO0SET = IOW;
4A10 ldr r2, [pc, #16]
2308 mov r3, #8
6013 str r3, [r2, #0]
I think I0CLR has different address then I0SET. Is it possible, that the
same code will produce the same result (if yes I would think ARM &
crossworks are very smart)

robert




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: crossworks gcc dissassembly - nosp...@... - Nov 3 4:32:00 2005

>Below is a view of code received in crossworks dissassembly in
>interleaved mode:

>IO0CLR = IOW; // Toggle IOW-signal
> 4A10 ldr r2, [pc, #16]
> 2308 mov r3, #8
> 6013 str r3, [r2, #0]
> IO0SET = IOW;
> 4A10 ldr r2, [pc, #16]
> 2308 mov r3, #8
> 6013 str r3, [r2, #0]
>I think I0CLR has different address then I0SET. Is it possible, that the
>same code will produce the same result (if yes I would think ARM &
>crossworks are very smart)

PC will be diffrent in each case - therefore I cannot see a problem?

Regards,
Richard. http://www.FreeRTOS.org




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: crossworks gcc dissassembly - Rob Jansen - Nov 3 4:40:00 2005

Robert,

> I think I0CLR has different address then I0SET. Is it possible, that the
> same code will produce the same result (if yes I would think ARM &
> crossworks are very smart)

I think you mean "different result" and yes it is - and it's not that
smart ...

> IO0CLR = IOW; // Toggle IOW-signal
> 4A10 ldr r2, [pc, #16]
> 2308 mov r3, #8
> 6013 str r3, [r2, #0]

The ldr r2,[pc, #16] will load R2 with the content of PC + 16. You will
find a 32 bits address value at that memory location.
The same thing applies for the "IO0SET = IOW" you showed.
Although the code is exactly the same, the value read into R2 will be
different since the Program Counter has a different value.

Rob




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )