element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog Creating multicore  Master- Slave project pair using LPCXpresso LPC54102 development board (Cortex-M4 core as master, M0+ as slave)
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 27 Jun 2016 7:35 AM Date Created
  • Views 1128 views
  • Likes 1 like
  • Comments 3 comments
  • om13077
  • lpc54102
  • lpcopen
  • lpcxpresso
  • dual core cortex m4f/m0+
Related
Recommended

Creating multicore  Master- Slave project pair using LPCXpresso LPC54102 development board (Cortex-M4 core as master, M0+ as slave)

bheemarao
bheemarao
27 Jun 2016

This blog is in continuation to my earlier blog “Working with Multicore blinky example (M4 core as master, M0 as slave) using OM13077[exploring multicore platform using existing example project using LPC54102 microcontroller on LPCXpresso]” the content in this blog has been cited from https://community.nxp.com/message/630715

 

The LPC54102 is a member of the LPC54100 family of devices, integrating two 32-bit ARM cores. Targeted for low power applications, this device is optimized for the lowest power consumption in active mode and also provides excellent power numbers in stand-by and power-down modes.

The two cores, a Cortex-M4F and a Cortex-M0+, can work independent of each other or team up to work on shared tasks.

image

Below are the steps involved in this activity:

 

1) Import the required LPC chip and board library project

2) Create a New Slave project

a) Import CMSIS_DSPLIB_CM0 library

b) Setting Memory configuration for slave project

3) Create a New Master project

a) Import CMSIS DSP Library for CM4 core

b) Memory Configuration for master project

4) Debugging a master / slave project pair

a) select the emulator and SWD configuration for master Cortex-M4

b) Add breakpoint inside master.c and resume the debugging process

c) Select SWD device as Cortex-M0+ and resume the debugging

 

Overview of creating a master / slave project pair

 

A multicore application in LPCXpresso consists of two linked projects - one project containing the slave code, and the other project containing the master code. The 'Master' project will also contain a link to the 'Slave' project which will cause the output image from the 'Slave' to be included into the 'Master' image.  The following steps detail how such a pair of projects can be created and linked.

 

Import the required LPC chip and board library project

 

You need to import the required chip library project and LPC board library project from “C:\nxp\LPCXpresso_8.1.4_606\lpcxpresso\Examples\LPCOpen\lpc5410x_lpcxpresso_54102_lpcxpresso_3.01a.zip”

 

  1. lpc_board_lpcxpresso_54102
  2. lpc_board_lpcxpresso_54102_m0
  3. lpc_chip_5410x
  4. lpc_chip_5410x_m0

image

 

Create slave project

 

Click on New project from quickstart panel

image

Select LPC5410x Multicore (M0+ slave) from New project window as shown:   And ‘LPCOpen - C Project’ need to be selected.

image

Enter project name of your choice i have selected as “example_M0+_slave”

image

Next select appropriate chip library and board library for the M0+ i.e lpc_chip_5410x_m0 and lpc_board_lpcxpresso_54102_m0

image

 

Import CMSIS_DSPLIB_CM0 library

Next import CMSIS_DSPLIB_CM0 lib as shown below:

image

Select the path “C:\nxp\LPCXpresso_8.1.4_606\lpcxpresso\Examples\CMSIS_DSPLIB”

image

Click Next

image

image

After selecting DSPLIB_CM0 proceed further by clicking Next

image

On 'Other options', ensure Code Read Protect (CRP) is unticked

image

 

Setting Memory configuration for slave project

On the Memory Configuration Editor page, you should see the various memory blocks defined by default for the target MCU.

We need to modify the default memory map to only use the memory that will be used by the Cortex-M0+ (rather than the Cortex-M4).

image

Only Ram1_32 should be retained

image

Then click finish to create the slave configuration project:

image

 

Create master project

Click on New project from quickstart panel as we did earlier

image

Create new project by entering name of your choice: “example_M4_master”

image

Select the required target MCU, say LPC54102J512, and click Next.

image

On the LPCOpen Library Project Selection page, select the LPC5410x chip library for the M4, say lpc_chip_5410x, and then the appropriate board library, for example lpc_board_lpcxpresso_54102, and click Next.

image

 

Import CMSIS DSP Library for CM4 core

Click Next through CMSIS DSP Library selection and Part specific options pages.

image

Proceed further by clicking next on other windows option and On 'Other options', ensure Code Read Protect (CRP) is ticked.

image

 

Memory Configuration for master project

On ‘Memory Configuration Editor’ leave the memory definitions as per the default.

image

On 'Multicore Project Setup' page, use the 'Browse' button in the Multicore Slave Project selection box to select the Multicore M0+ project that you created previously:

image

 

Click finish

image

If you now select the master project in the Project Properties view, then select the Build option in the Quickstart view, this should trigger a build of the slave project, followed by the master project (and if necessary also the LPCOpen library projects).

image

 

Note: that a copy of the executable generated by the Slave project will actually be embedded into the Master project executable.

 

 

Debugging a master / slave project pair

Start a debug session for Master project using the Debug option in the Quickstart view.

Click on Debug option as shown below:

image

 

Select the emulator and SWD configuration for master Cortex-M4

Now select the emulator LPC-LINK2 CMSIS-DAP as shown below:

image

Next select the SWD configuration devices as Cortex-M4 as shown below

image

Having selected the appropriate core, LPCXpresso should download the executable containing both the Master and Slave images into the target MCU flash memory.

 

Add breakpoint inside master.c and resume the debugging process

Once the connection has been made, you should hit the default breakpoint at the start of main() in the Master executable :

image

Click on Resume button as shown below:

image

The execution will come and wait at “boot_multicore_slave();”

At this point, select the Slave project in the Project Explorer view, then use the Quickstart view Debug option to start a second debug connection.

image

LPCXpresso should detect that this is a Slave project and make an ‘attach only’ connection (and hence not download code and leaving the slave image 'executing').

image

 

Select SWD device as Cortex-M0+ and resume the debugging

Now select the SWD device as Cortex-M0+ the only available option

image

Now there are two debug sessions available as shown below:

image

 

Now click again Resume button while debug session is in Master

image

 

Now step over the boot_multicore_slave() function in the master image, and the slave core will begin to execute, hitting the default breakpoint on it’s main():

You can now debug both cores in parallel, selecting which core to step, resume, suspend, etc by switching between them in the Debug View.

 

Note: Although there is no debug logic synchronising debug operations on the two cores, you can select both applications at the same time in the Debug View (typically by using CTRL-Click) and operations like step, resume, suspend, etc will then be carried out on both cores by the debugger in parallel.

 

The currently selected core will be the one used for displaying many of the debug related views, such as Registers and Locals. It is also possible to create copies of many of the debug related views, and lock each copy to a particular core.

 

 

Happy working on with multicore platform  image image image image

Select SWD device as Cortex-M0+ and resume the debugging

  • Sign in to reply

Top Comments

  • bheemarao
    bheemarao over 9 years ago in reply to DAB +1
    Hi DAB, Thanks for your reply. I have added and highlighted steps involved in my blog. Best Regards Bheema Rao
  • DAB
    DAB over 9 years ago in reply to bheemarao

    Much better thank you.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bheemarao
    bheemarao over 9 years ago in reply to DAB

    Hi DAB,

     

    Thanks for your reply.

    I have added and highlighted steps involved in my blog.

     

    Best Regards

    Bheema Rao

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 9 years ago

    Nice detail, but I got lost going through all of the screens.

     

    Could you add some context between major steps to remind us what each group of screens accomplishes in the overall system implementation?

     

    Thanks

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube