Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] FreeRTOS on LPC2138

2005-11-10 by FreeRTOS Info

> I'm now at a point in deciding whether to convert the Keil demo to
> compile under GCC, or use the 2106 demo to run on a 2138.


Definitely start with the 2106 demo - this means you have the compiler
options, startup code and a linker script all ready (the linker script needs
editing).

1) Take the linker scripts lpc2106_ram.lk and lpc2106_rom.lk and edit them
for the correct memory map.  I think the only lines that need changing are
at the very top:

----------
MEMORY
{
 flash : ORIGIN = 0, LENGTH = 120K
 ram  : ORIGIN = 0x40000000, LENGTH = 64K
}

__stack_end__ = 0x40000000 + 64K - 4;
----------

It might just be that the 64K's need changing to 32K's, but check the data
sheet for the correct memory map.


2) In FreeRTOSConfig.h (demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h) change the
line #include <lpc210x.h> to include the correct header file for the
LPC2138.


3) The heap size is set to 23K within
demo/ARM7_LPC2106_GCC/FreeRTOSConfig.h, so this might be ok to leave.  If
this is too large then it can be reduced and some of the demo app tasks
removed.  If the function vTaskStartScheduler() returns then you know you
have run out of space.


4) The LED interface functions are found within
demo/ARM7_LPC2106_GCC/ParTest/ParTest.c.  You may want to take the set,
clear and toggle LED functions from the Keil demo into the GCC demo so you
can see the LED's flashing.  The functions within the GCC demo are correct
for the Olimex board rather than the Keil board.



Regards,
Richard.




>
> Cheers,
>
> Peter.
>
> FreeRTOS Info wrote:
> >>I'm trying to get FreeRTOS running on the LPC2138.
> >>
> >>I can use the Keil demo compiler to compile the Keil demo to work.
> >>
> >>I've managed to get the 2016 GCC demo compiled and downloaded to the
> >>board. Of course it doesn't work. :-)
> >>
> >>I'm new to the ARM LPC2138, GCC and FreeRTOS, so it is a steep learning
> >>curve.
> >>
> >>The LPC2016 GCC FreeRTOS demo is targeted at the Olimex board.
> >>
> >>Can anyone point me to a demo targeted at the LPC2138 or at least point
> >>me in the right direction to configure RTOS for the LPC2138.
> >
> >
> >
> > You are trying to target the LPC2138, but I'm a bit confused about the
> > compiler you are wanting to use.  Keil or GCC?
> >
> > The main difference between the devices as far as FreeRTOS is concerned
is
> > the differing amounts of RAM.
> >
> > LPC2129 (used with the standard Keil demo) has 16K.
> > LPC2106 has 65K.
> > LPC2138 has 32K.
> >
> > It is best to start with the demo project for the compiler you are
using.
> > This way you will get the correct compiler options and a ready made
working
> > project.  Once you have the demo for your compiler building (should
build
> > exactly as downloaded) you can make some small changes to target the
project
> > at a different chip.
> >
> > The changes are basically:
> >
> > + Change the value of configTOTAL_HEAP_SIZE within FreeRTOSConfig.h to
take
> > into account the amount of RAM available on the device.
> >
> > + Change any device specific header files (the compiler supplied headers
> > that contain all the register locations) that are included within
> > FreeRTOSConfig.h to ensure they are for whichever device you are using.
If
> > you are using Keil then maybe there is nothing to do as lpc21xx.h will
cover
> > both the LPC2106 and LPC2138.
> >
> > + Change the project target to be for the device you are using.  This
might
> > be done from within the Keil IDE and ensures the linker and debugger
know
> > the memory map.  Alternatively if you are using GCC you will have to
edit
> > the linker script as appropriate for the different memory map.
> >
> >
> > That should be it (?).
> >
> > Note that the demo applications can use up all the available RAM.  If
you
> > are taking a project targeted at an LPC2106 and running it on an LPC2129
> > then you may have to reduce the number of demo tasks that are created in
the
> > sample project.
> >
> > Regards,
> > Richard.
> >
> >
> >
> >>Once again that for the help with the flashing problem.
> >>
> >>Cheers,
> >>
> >>Peter.
> >>
> >>
> >>
> >>
> >>Peter Homann wrote:
> >>
> >>>Hi,
> >>>
> >>>Thanks guys. I'll break out the test gear tonight.
> >>>
> >>> From what is being said, it is either a hardware problem, or the LPC
is
> >>>not entering boot mode.
> >>>
> >>>I can hold P0.14 lo, then use a terminal program to issue '?' and see
if
> >>>there is  a response.
> >>>
> >>>Do you know what the rest of the command set is?, or will the '?'
> >>>character cause the boot loader to spit it out at me?
> >>>
> >>>Cheers,
> >>>
> >>>Peter.
> >>>
> >>>rtstofer wrote:
> >>>
> >>>
> >>>
> >>>>--- In lpc2000@yahoogroups.com, Tom Walsh <tom@o...> wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Peter Homann wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Richard,
> >>>>>>
> >>>>>>Yes, it had been working. I think I downloaded a Hex file for a
> >>>>>>processor other than the LPC2138 and then it seemed to stop
> >>>>
> >>>>working.
> >>>>
> >>>>
> >>>>
> >>>>>>I don't think it is a hardware problem.
> >>>>>>
> >>>>>>For the third time, is it possible to erase the boot loader or
> >>>>
> >>>>screw it up?
> >>>>
> >>>>
> >>>>
> >>>>>No, you cannot.  According to the Philips doc that 8K sector is
> >>>>>protected from erasure.
> >>>>>
> >>>>>Please refer to the Philips manual: "LPC213x User Manual"
> >>>>
> >>>>#UM10120, top
> >>>>
> >>>>
> >>>>
> >>>>>of page 221.
> >>>>>
> >>>>>
> >>>>>TomW
> >>>>
> >>>>
> >>>>I read all around that paragraph.  But that's the word - it can't be
> >>>>overwritten.
> >>>>
> >>>>Richard
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>Yahoo! Groups Links
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>-- 
> >>------------------------------------------------------------------
> >>Web:   www.homanndesigns.com
> >>email: homann@...
> >>Phone: +61 421 601 665
> >>www.homanndesigns.com/ModIO.html         - Modbus Interface Unit
> >>www.homanndesigns.com/DigiSpeedDeal.html - DC Spindle control
> >>www.homanndesigns.com/TurboTaig.html     - Taig Mill Upgrade board
> >>
> >>
> >>SPONSORED LINKS Microprocessor  Microcontrollers  Pic microcontrollers
> >>      8051 microprocessor
> >>
> >>
>
>>--------------------------------------------------------------------------
> >
> > ------
> >
> >>YAHOO! GROUPS LINKS
> >>
> >>  a..  Visit your group "lpc2000" on the web.
> >>
> >>  b..  To unsubscribe from this group, send an email to:
> >>   lpc2000-unsubscribe@yahoogroups.com
> >>
> >>  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >
> > Service.
> >
> >>
>
>>--------------------------------------------------------------------------
> >
> > ------
> >
> >>
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> -- 
> ------------------------------------------------------------------
> Web:   www.homanndesigns.com
> email: homann@...
> Phone: +61 421 601 665
> www.homanndesigns.com/ModIO.html         - Modbus Interface Unit
> www.homanndesigns.com/DigiSpeedDeal.html - DC Spindle control
> www.homanndesigns.com/TurboTaig.html     - Taig Mill Upgrade board
>
>
> --------------------------------------------------------------------------
------
> YAHOO! GROUPS LINKS
>
>   a..  Visit your group "lpc2000" on the web.
>
>   b..  To unsubscribe from this group, send an email to:
>    lpc2000-unsubscribe@yahoogroups.com
>
>   c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> --------------------------------------------------------------------------
------
>
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.