6.4 Creating a new MCC Harmony Project
This section briefs about the project generation, MCC configuration using CLI, Thread component and details about the default project configuration considered for thread SDK.
- Create MCC Project for any one of PIC32CXBZ2 devices (WBZ450 /WBZ451 /PIC32CX1012BZ25048 /PIC32CX1012BZ24032)
- OpenMCC Window. By default, the MCC
window will appear as follows.
- OnceProject graph is getting displayed for the created project, Double click on the
CLI component.Note: CLI and Thread Stack components will appear in Device Resources only ifwireless_thread is cloned in MCC framework path.
-
Upon selecting the component, the MCC will auto activate the Thread stack as dependent module. Thread stack and other inter dependent component dependencies will be auto activated and shows Popup for getting the approval. Select “Yes” for all of them.
- CLI will auto activate the Thread
USART capability as part of its functional usage. Then PHY component dependencies
auto activation will be triggered. Below are the list of PHY Component Dependencies.
- DeviceSupport Library
- Core
- TRNG
- SYSTEM Time Module (PHYUses one client of SYS_TIME_MODULE) – So, the number of SYS_TIME_CLIENT should be more than 1.
- IEEE802.15.4 PHY doesn't processes
request through a seperate Free RTOS task and below is the IEEE 802.15.4 PHY
configurtaion for Microchip Thread SDK.
- Below is the Device support library configuration considered for the Microchip
Thread SDK.
- Select the thread generation option as per the requirement(either source or library).
The default configured options is Source.
- Below is the Free RTOS Configuration considered for Microchip Thread SDK.
- The project graph will look like
- RightClick on TIME module for
selecting the timer source, Select any of the timer.
- Below is the TC0 configuration
considered for the Microchip Thread SDK.
- Choose the Thread role under CLI
configuration options as shown below.
Select the Device Role as FTD for CLI+Thread FTD project.
Select the Device Role as MTD for CLI+Thread MTD project.
- Right click onUSART Driver => Go
to Satisfiers => Click on SERCOM0(sercom0)
- Click on SERCOM 0 => Go to
configuration options => Change Receive pinout, Transmitpinout.
- Configure the SERCOM0 system setting
to enable the Direct High Speed inside system Configuration options → Generate Fues
→ DEVCFG1.
- Click on Generate Tab for Code
generation. Upon code generation, Thread files will be added to the project.
- Once Generation completes the header,
source files of Thread will be added under config => driver/thread.
For the thread generation as Library the .a file generation can be seen under libraries folder in Project window as shown below
Note: Source files will not be generated, if thread generation type is Library. - RTOS task for thread stack will be created tasks.c file and otSysInit () will be called fromSYS_Initialize() function.
- app_user_edits.cfile changes:
selected line should be commented.