Weird Problem (Codesize?)

nobody wrote on Monday, April 23, 2007:


I use the MCB2300FreeRTOSlwIP Port, removed the whole IP and Ethernet stuff.
Compiler is GCC, I flash with ulink2 and uVision3.

So this works fine.

I added some functions and code in main.c, and at some point - nothing is running. When I remove some lines (just function implementation, i do not even call it) it works. Then I add some other code anywhere in main.c and I have the same problem again. What could that be?

nobody wrote on Monday, April 23, 2007:

Seems unlikely that it is just code size if you removed a whole bunch of TCP/IP stuff first which presumably took up a lot of space.

Are you actually using an LPC23xx device or did you just base the project on that demo?  If using a different device then maybe there is a mistake in the linker configuration?

nobody wrote on Tuesday, April 24, 2007:

I use a MCB2300, but you sya it, at my board theres a LPC2368, the Port says LPC2378 - but I dont’t think there is a big difference…

I’m getting nuts!
Just I remove 2 lines of code (in a function I never call) and FreeRTOS stopped to work.
After i re-added these 2 lines, it worked again. And these were really stupid…

Here’s a link to the port I use:


nobody wrote on Tuesday, April 24, 2007:

Is this is the file from the LPC2000 Yahoo group files area?  If so then I managed to use it ok, but lwIP is implemented in its stand along configuration, for use without an RTOS.  It does this by having all the code in a single task, and running the task at the same priority as the other demo task.  I found this was as downloaded, but the WEB server was very flakey when adding in extra tasks etc.  You need to convert the lwIP port to use the proper RTOS method.

I don’t think this is the same as your problem though as you say the code you are adding is not ever called anyway.

Have you tried the official uIP demo from the FreeRTOS site?

nobody wrote on Tuesday, April 24, 2007:

As I said: I don not even use the IwIP stuff, I removed it.
I just need a port for the LPC2368 for GCC, with Makefiles, Startupcode and so on. The offical Port is for Rowley and I didn’t manage to transfer this to use with GCC.

My problem is that im to stupid to do the dirty work with Makefiles and whatever I need, I have no clue at all. Maybe I should continue programming .Net. :frowning:

nobody wrote on Tuesday, April 24, 2007:

Have you looked at the lwIP demo for the SAM7?  there is a rowley project and GCC makefile for the same code.  Rowley is just an IDE for GCC.  Maybe you could use this for your project?  You would need different startup code and a different linker script.