Using ARM7 port for LPC2129 and GCC

Hi Have anyone done an application with GCC and the LPC2129 processor, I can get it to run correctly on my MCB2100 demoboard. I have tried to use the keil-port and convert it for gcc with help of the arm7-gcc port.. but it wont run.. I dont know what im doing wrong, its like the mcu wont run, or like it wont start to run or someting…  Some makefiles would be great.. Thanks.. BR /Fredrik Martinsson, Sweden

Using ARM7 port for LPC2129 and GCC

Are trying to run from ROM or RAM?  Have you updated the MEMORY section of the linker script to account for the different memory maps of the two devices?  See the top of lpc2106-rom.ld.

Using ARM7 port for LPC2129 and GCC

I quess not.. I’ll check this right know and come back for result.. Thanks.. /Fredrik

Using ARM7 port for LPC2129 and GCC

It might be easier to do it the other way around.  Take the GCC port and convert it to run on the keil platform by using the keil port as a guide. Assuming the register locations are the same for both ports if you take the GCC port then cut it down to its minimum it should work. Change the linker script file as per previous post.   Change the portTOTAL_HEAP_SIZE macro for different RAM size. The portMINIMAL_STACK_SIZE macro may also need changing. Change the partest.c file so you access the IO pins for the LED’s as per the keil platform. Try starting with the minimum functionality – take out all the functions in main that start tasks other than the flash tasks, also remove these all the demo task files from the makefile other than the flash task file.  This way you will get the smallest exe file and the simplest application.

Using ARM7 port for LPC2129 and GCC

One question: the LENGHT define.. is it in bytes or bits? Is it right to define ram LENGHT to 16K for the LPC2129 ?  The ram memory has size 16 Kbyte from address 0x40000000 – 0x40003FFF The rom memory is from 0x00000000 – 0x0001FFFF = 128 Kbyte

Using ARM7 port for LPC2129 and GCC

The lpc2106 has 64K Bytes of RAM and 128K Byte flash. The linker script for the 2106 contains; MEMORY {     flash    : ORIGIN = 0, LENGTH = 120K     ram        : ORIGIN = 0x40000000, LENGTH = 64K } so it looks like length is in bytes.  I’m not sure why 120 is shown instead of 128 though.

Using ARM7 port for LPC2129 and GCC

Still something wrong.. Its just like the scheduler wont start…

Using ARM7 port for LPC2129 and GCC

Hey… I got it to work.. but i only have one task, and the only thing it does it so delay for 1000 ticks and then enter a critical section to send "hello task" string on serial port.. but this works very good.. What is the portTOTAL_HEAP_SIZE for? how small should portMINIMAL_STACK_SIZE be?

Using ARM7 port for LPC2129 and GCC

portTOTAL_HEAP_SIZE sets the amout of RAM the scheduler can use when allocating TCB’s, stacks, queue’s, etc.  See: http://www.freertos.org/a00111.html portMINIMAL_STACK_SIZE seems to be set differently for the two ARM ports.  The GCC port uses 128.  The best setting for this parameter is dependent on your own application. Do you have a debugger?  If so then step through the main() function and you will see how the memory is allocated as tasks are created.  You will probably find where the old problem was occurring. The setuphardware function in main does more in the GCC port than the keil.  I presume you have copied the setup routines from the GCC port.  [the Keil port does the setup automatically in the startup routine].

Using ARM7 port for LPC2129 and GCC

i am using lpc2106 port on lpc2138 and it did’nt work. it will not show the blinking of led at all. i have question that do i use lpc2106 port on 2138? becuase both have same pheripharal address. please help me 

Using ARM7 port for LPC2129 and GCC

You are using the LPC2106 GCC port and want to get this working on an LPC2138.  You have not said what you have done to achieve this.  People cannot provide help unless you provide more information. Have you changed the heap size to fit in the LPC2138 RAM. Have you changed the functions to write to the LED’s to be correct for your hardware. Have you successfully compiled the code? Etc.

Using ARM7 port for LPC2129 and GCC

Dear Sir, I am using LPC2138based hardware target board with on-chip flash of 512kb and RAM of 32kb. I am currently using the LPC2106 GCC port and as mentioned in the demo program of LED blinking, I have arranged for the hardware. I have successfully compiled the program using the provided batch file and tried to download the HEX file to the mentioned target. But the results are not available as required. I would therefore like to know what changes I have to make (either procedural or code changes) so that I can use the demo program for the 2106 port with my target system. I would be glad to receive your suggestions!!

Using ARM7 port for LPC2129 and GCC

>Dear Sir, >I am using LPC2138based hardware target board with on-chip flash of 512kb and >RAM of 32kb. Have you changed the size of the heap in FreeRTOSConfig.h to take into account the smaller amount of RAM available? >I am currently using the LPC2106 GCC port and as mentioned in the >demo program of LED blinking, I have arranged for the hardware. >I have successfully compiled the program using the provided batch file and >tried >to download the HEX file to the mentioned target. But the results are not >available >as required. Does this mean you cannot download the file?  Do you get an error in the download?  If so, what? >I would therefore like to know what changes I have to make (either procedural >or code changes) so that I can use the demo program for the 2106 port with my >target system. >I would be glad to receive your suggestions!! First get a program running that flashes the LED’s without using FreeRTOS.org.  You can do this by having a loop in main() to flash some LED’s before any tasks are created and without starting the scheduler.  Once you have this working, then try creating just the LED flash tasks and nothing else.  Then build up from there. Have you read the section on the FreeRTOS.org WEB site for the LPC2106 port titled "Using a part other than an LPC2106?".  This gives more information too. Regards.

Using ARM7 port for LPC2129 and GCC

sir   lpc2106 has 64k of ram and in the freertosconfig.h heap size is 23k i dont understand that how to change the heap size for lpc2138. is there any calclulation for writing the heap size?

Using ARM7 port for LPC2129 and GCC

That should be fine then.