Content originally posted in LPCWare by Jindra on Sun Apr 11 04:50:32 MST 2010
I not tried put it in main, as then it is useless. But also tried put uint32_t (int) before, it helps but not always and of course this is not solution.
Modified blinky - tried to remove as much as possible. Compiled on debug:
text data bss dec hex filename
928 0 8 936 3a8 blinky.axf
data is 0 and bss 8 ? where is my two strings, they count into text (code size)?
If I removed --gc-sections it works for first try. but after clean and build, it also not work.
I also thing that correctly working remove of death code is essential for every project other as blinky demos ...
text data bss dec hex filename
7104 4 8 7116 1bcc blinky.axf
--------
#include "LPC11xx.h" /* LPC11xx definitions */
const char nums[] = "0123456789ABCDEFGH";
void doSomething(const char *str)
{
}
void method(const char *instr, int a, int b)
{
//int iii; <- will work if uncoment
char params[] = " 0x.., 0x..\n";
params[4] = nums[a&0xf];
params[3] = nums[(a&0xf0)>>4];
params[10] = nums[b&0xf];
params[9] = nums[(b&0xf0)>>4];
doSomething(params);
}
int main (void) {
method("test", 0x12, 0x34);
while (1) ;
}
---------------
Sorry to be angry, but after lot of time I still not start working on my project but "debuging" basic things. So I think more and more, to move back on previous pltaform, as my goal is target product, not playing with devkits.
Maybe my expectations is too high to have idiot-proof toolchain, but lpcXpresso still looks very unreliable to me.
I don't know if it is unfinished, or it is because the way I expect it work, or I do something wrong ... ?
Currently time is my enemy and I feel very disapointed, so sorry.