Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Beginner questions

2005-08-26 by Brian C. Lane

y4krys wrote:

> Brian,
> This is how it looks compiled with my tools in the THUMB mode:
> 
> //  PLLCFG  = (4 + (2 << 5));
> 
> 0x0000015E 4812 LDR R0,[PC,#0x048]  ; [0x1A8] =_A_PLLCFG (0xE01FC084)
> 0x00000160 2144 MOV R1,#68
> 0x00000162 6001 STR R1,[R0, #0]
> 
> My compiler has allocated a constant (address of PLLCFG) at 0x1A8 to
> avoid the limitation of the immediate operand size.  It looks like
> your compiler prefers code generation over the data allocation.  Not
> all compilers are made equal ;-)).
> 

When I optimize for size this is what CrossWorks generates.

Thanks,

Brian
-- 
-----------------------------------------------------
Brian C. Lane (W7BCL)                      Programmer
www.shinemicro.com   RF, DSP & Microcontroller Design

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.