LPCxpresso IDE - nothing but problems... ;(

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPCxpresso IDE - nothing but problems... ;(

2,195件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mondo90 on Wed Jun 11 15:50:45 MST 2014
Hello,

I can't say nothing good about LPCxpresso IDE. First of all for me this works weird, bad and I am so disapointed with it....

Example 1: (printf function fail)
int main(void)
{
int a = 10;
printf("%d",a);

debug_puts("Hello World");
(...)


In above example debug proces complains about printf function "implicit declaration of function" and of course doesn't works as it should. Compilator complains even abut int declaration o_0

Example 2: (unexpected disconnections)

After several compilations almost always I end up with comunicat "LPC-LINK(HID) not found) basicly IDE can't see microcontroller. Simple plug out/in helps but it is very annoying.
But what the hell is wrong with printf function ? o.0



0 件の賞賛
返信
13 返答(返信)

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Thu Jun 26 00:54:13 MST 2014

Quote: TheFallGuy
Hint 3. Printf in an embedded system is not normally a good idea...



I disagree, as it is very useful for debugging and generally interacting with the system.

But you have to be aware that it is slow (only use it in those parts of your code that aren't time-critical) and it uses quite a bit of memory (several kB flash, stack memory, possibly heap). So it may not be a good idea on the smallest controllers.

On the other hand, an LPC43xx is more than big enough. (To put that into perspective, in the eighties our UNIX system for six students had 512KB of RAM. Turbo Pascal 1.0 used about 16KB on a 64KB Z80 system, together with an EPROM programmer + 32KB buffer + CP/M OS it fit into 64KB.)

Jürgen
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Jun 26 00:28:54 MST 2014
Can I suggest that you take a step back, and then you might actually make some progress yourself, or at least be able to provide sufficient information here for others to help you.

To start off, make sure that you read and follow the LPCXpresso User Manual (or at least the first half of it). This is supplied in PDF in your install directory, or accessible via the LPCXpresso Help menu.

Then tell us what MCU and board you are using.
And what version of LPCXpresso and which host OS you are running on.
And what example code you are using as your starting point.

As you are having 'flash image too large" errors, then I imagine that you are almost certainly running on a Windows host and 99.9999% of such issues are caused by incorrect path or missing cscript utility - as explained in the FAQ you have already been pointed at. Read the FAQ again...

http://www.lpcware.com/content/faq/lpcxpresso/flash-image-too-large

…. follow the advice and instructions it gives, and if you are still having problems, post the results that you see.

Regards,
LPCXpresso Support

0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Jun 26 00:27:17 MST 2014
If you are trying to learn C programming (and given your very basic errors, I think you are), you should not be using an Embedded System to do that. If you want to learn C, use a host-based system. When you know C, come back and start using an embedded system.

printf is not a good idea in an embedded system because normally there is no console to display the output on - they normally have leds, lcds, pixel displays, which you have to control yourself, even down to providing the character fonts.

For why you need a newline, read this:
http://stackoverflow.com/questions/1716296/why-does-printf-not-flush-after-the-call-unless-a-newline...
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mondo90 on Wed Jun 25 15:08:42 MST 2014
Do you mean :
int a = 10;
printf("%d\n",a);


If so how you expect extra new line character do the work ?
Unfortunately when I try to debug with this code I get back "flash image to large"

..nothing but pain...
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jun 25 14:53:41 MST 2014
What about hint 2?
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mondo90 on Wed Jun 25 14:41:30 MST 2014
Thanks for your hints, I have read content of "using-printf" article before and I did get nothing usefull from this.


Quote:
Printf in an embedded system is not normally a good idea...



So what is a good idea then ? To be honest at this moment i don't want good way or perfect way I just want any way (function) which print integer / float value to console for me. Can you provide such function ?


PS; I have heard about a way which converts integer to char and than I should be able to print it using debug_puts, the question is how to convert ?

Thanks.
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jun 25 13:24:06 MST 2014
Hint 1. Read the FAQ. http://www.lpcware.com/content/faq/lpcxpresso/using-printf

Hint 2. Add a newline character to the end of your string. You need this to flush the stream. This is true for any c runtime.

Hint 3. Printf in an embedded system is not normally a good idea...
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mondo90 on Wed Jun 25 12:22:12 MST 2014
I somehow overcome "flash image to large problem" but still don't know ho w to print to console integer values. I have debug_puts function but it is unable to printf other values than characters.
Standard C code like
 int a = 10; printf("Value is %d",a);
doesn't work.


So, how to print to console integer values ?


Thanks.
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Jun 12 04:21:53 MST 2014
Sounds like you have an installation problem on your PC.

Read this FAQ:
http://www.lpcware.com/content/faq/lpcxpresso/flash-image-too-large

0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mondo90 on Thu Jun 12 04:10:19 MST 2014
TheFallGuy, I did both ativated and read manual.

Now I see the program is already in memory, and I can't load new one because I get error "image to large...". I don't know how to overwrite existing code in flash memory. I belive problem occur because ther is no free space since memory is occupied by another code.
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Thu Jun 12 03:54:53 MST 2014
Have you activated the product? Unless you activate there is an 8k limit.

p.s. it would really help if you read the User Guide...
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Mondo90 on Thu Jun 12 03:40:16 MST 2014
I turn off all debug_puts and remove it's library. I try to use only standard printf function. I added "stdio.h" to the code and now when I try to complie I get error: "Error reported by target: Licence restriction : Flash image too large for this licence... "

Nothing but problems and pain ;(

How it is possible the flash image is any bigger if I remove whole debug puts library and add only one line o.0


Please, how to print to the console simple intreger value using printf: for two days I am trying printf("%d",value) without sucess ;/


Pain.
0 件の賞賛
返信

2,144件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Wed Jun 11 21:53:01 MST 2014

Quote: Mondo90
Hello,

I can't say nothing good about LPCxpresso IDE. First of all for me this works weird, bad and I am so disapointed with it....

Example 1: (printf function fail)
int main(void)
{
int a = 10;
printf("%d",a);

debug_puts("Hello World");
(...)


In above example debug proces complains about printf function "implicit declaration of function" and of course doesn't works as it should. Compilator complains even abut int declaration o_0

Example 2: (unexpected disconnections)

After several compilations almost always I end up with comunicat "LPC-LINK(HID) not found) basicly IDE can't see microcontroller. Simple plug out/in helps but it is very annoying.
But what the hell is wrong with printf function ? o.0



Frankly, I'm not confident you've cut and pasted the code you intended, and even what all you're complaining about. The problem is surely with your code and not the LPCXpresso IDE.

With regard to the implicit declaration, the compiler is telling you it has not seen a prototype for printf. To solve this, include the stdio.h header file which supplies a prototype. Second, if you want to see the printf output in the LPCXpresso IDE console, you'll need to link using the semihost libraries. You didn't elaborate on what debug_puts() is supposed to do, so I can't comment.

Not sure why you're seeing connection trouble with the LPC-Link1. The LPC-Link1 is pretty reliable, but they do occasionally go bad. If you want to get more help you'll need to specify what part you're using (e.g. LPC1347, etc.), and paste the debug console output from the failed connections. Also, what have you attempted to do to solve the problem? For example, have you tried using an alternate USB port, or different cable?

LessThanZero
0 件の賞賛
返信