Author Topic: Working with LPC21xx and LPC23xx and Rowely Crossworks  (Read 16113 times)

Offline FAQ

  • Newbie
  • *
  • Posts: 27
    • View Profile
Working with LPC21xx and LPC23xx and Rowely Crossworks
« on: April 08, 2012, 10:44:17 PM »
Question:

I would like to work with both LPC21xx and LPC23xx parts and any using Rowely Crossworks. How do I change between the both?



Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3243
    • View Profile
    • uTasker
Re: Working with LPC21xx and LPC23xx and Rowely Crossworks
« Reply #1 on: April 08, 2012, 10:58:03 PM »
Hi

The Rowley Crossworks project contains the following files which need to be setelct or maybe adjusted when moving between different parts:
- uTaskerLPC23XX.ld - linker script used by the stand-alone application (or boot loaders)
- uTaskerLPC23XX_boot.ld - linker script used when building to work with a boot loader

The linker script file used will be swapped automatically when changing between the targets for standalone or bootloader builds, however this contains the memory sizes (Flash and RAM). Of particular importance is the RAM setting since it is used to define the stack pointer locations. When moving between devices with different RAM sizes this file should be adjusted accoringly to match the physical sizes available.

- startup_gnu.s - startup used by LPC23xx and LPC24xx parts
- startup_LPC21XX_gnu.s - startup used by LPC21xx parts

One of these is excluded and one is used. When moving between LPC21xx and LPC23xx or LPC24xx parts the properties of these files should be changed so that the correct one is used an dthe other excluded. The reason why there are two is because the interrupt controllers in the different families are different. If the wrong one is used the interrupts will fail.

Note that these two points are essentially the same when building with the stand-alone GCC make file.


Although there may be a better method, the following shows how to change the exact part type used when debugging with Crossworks - using the correct part will allow peripheral regusters to be display correctly for the part in question.

Originally there may be a list of LPC23xx parts that can be selected only - in order to get a list of LPC21xx parts do the following (and reverse to get back to LPC23xx parts etc.).


1.   In the project explorer expand the setting Project: ‘uTaskerSerialBoot’ -> Project Properties
2.   You will see an entry “Property Group Files” which you can double click (to ensure that the properties windows is open below – In this you will find the setting “$(TargetsDir)/Philips_LPC230X/propertyGroups23xx.xml” for Property Groups File.
3.   Modify this to “$(TargetsDir)/Philips_LPC210X/propertyGroups21xx.xml”. This will however not make the new ones show up yet.
4.   Close Crossworks (normal exit)
5.   Restart Crossworks (double click the project is easiest)
6.   Now you will see that you get a complete list of LPC21xx targets for target processor (although LPC2368 is still shown as selected). Select the one that you want and this should be fully ready to work with the new type.


Regards

Mark