LPC81X CMSIS - clock system handling wastes a lot of space

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

LPC81X CMSIS - clock system handling wastes a lot of space

413 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cpldcpu on Sun Jun 23 07:58:12 MST 2013

I have been looking into size optimizing the LPC810 start-up code from the microbuild codebase (https://github.com/microbuilder/LPC810_CodeBase). I noticed some oddities with the clock system handling that waste quite a bit of space. I wonder who is responsible for code maintainance? Is there any way to report issues directly? The current state of CMSIS for the LPC810 does not look very polished to me.


I filed this on Github:


https://github.com/microbuilder/LPC810_CodeBase/issues/2


Labels (1)
0 Kudos
3 Replies

392 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Wed Sep 11 20:39:23 MST 2013
I agree with you Marc; this is what I've been doing for the LPC1768 in all my firmware (I have one shared startup file, which never changes).
I'm only using GCC, so I can confirm that it works very well.

And yes... I am also continously impressed with this LPC800; it's brilliant! (I'm still waiting for my LPC812 to arrive).
Easy to solder. (1.27mm pitch). Can invert all I/O pins (really, really cool; now you don't have to pre-calculate inverted values for active low). JTAG shared with standard I/O pins (I want more of this - also on the other LPCs, please). 30MHz, single-cycle I/O;  beats most 8-bit microcontrollers. AND - if all that wasn't enough... LOW PRICE; it sometimes pays using the LPC812 instead of a bunch of logic; and in some cases you can replace CPLDs with this li'l fella . =)
(I should have ordered 10 more of these)
0 Kudos

392 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Mon Aug 19 06:40:58 MST 2013
I would save a few more bytes by only defining one default 'handler' containing a "while(1);" and let the other default handlers be weak references to that. This avoids code duplication. I use this in assembler (simply defining multiple labels for the same function entry) and I know GCC allows this (all WEAK references are aliases to a 'normal' function - or did I get that wrong?). Probably other tool chains allow this, too.

Isn't it exciting to program the LPC800?
It's the year 2013, we have GiB's of memory in our smart phones that perform poorly as mobile phone.
But still it's worth the time to make up your mind and save a few bytes on your microcontroller ;-)
0 Kudos

392 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cpldcpu on Sun Jun 23 12:03:53 MST 2013

I fixed the issue, however I had to change CMSIS a little by moving the clock settings to the header file. I wonder why this isn't the normal approach?


https://github.com/microbuilder/LPC810_CodeBase/pull/3


0 Kudos