Page 1 of 1

Porting to LPC1114FN28

Posted: Sat Aug 17, 2013 4:10 pm
by tmune
Hello all,
I'm trying to port the OS to LPC1114FN28. I know there is LPC1114 version exits. I'm proting the version to my hardware. I had an error of "ram overflowed by 88 bytes" because the the version of 1114 used has only 4KB sram. I modified lpc1114.ld to set __main_stack_size__ = 0x0100. Now I have a clean compilation and get ch.hex.
My questions are;
Can the stack size be 0x100?
also
Does the os require the ouside crystal like LPC1114Xpresso board? I'm trying to use the internal clock. I don't know where to look for the system clock setup?
Any help is greatly appreciated.
Thanks

Re: Porting to LPC1114FN28

Posted: Sat Aug 17, 2013 6:38 pm
by Giovanni
Hi,

256 bytes should be enough, that space is the stack used by the main() function so it depends on what you do there.

Clock settings are located in mcuconf.h.

Giovanni

Re: Porting to LPC1114FN28

Posted: Mon Aug 19, 2013 6:49 pm
by tmune
Thanks for your quick reply, Giovanni.
I have not finished porting yet but I have another question.
when I write a code like,
LPC_GPIO0->MASKED_ACCESS[1 << 7 ] = 1 << 7;
Is this equivalent to
writing Mask register at GPIO0 address + 7 = 0x80 and
writing Data register at GPIO0 address(0x50003FFC) = 0x80
I could not find where you set the direction register but I have to write
LPC_GPIO0->DIR = 1 << 7;
don.t I?
Thanks
Takashi

Re: Porting to LPC1114FN28

Posted: Mon Aug 19, 2013 7:22 pm
by Giovanni
Hi.

GPIO related code is in pal_lld.c and pal_lld.h. Exactly what are you trying to accomplish?

Giovanni