-
Notifications
You must be signed in to change notification settings - Fork 2
Added Example : Multicore Scheduler #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍(Review updated until commit d2d6c5a)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to d2d6c5a
Previous suggestionsSuggestions up to commit 81ed265
|
|||||||||||||||||||||||||||||||||||||||||||||||
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
pratheesh-ti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Aravind-Padma-Kumar Can you fix the build issue following the hint from Qodo bot. This looks overall in better shape. Please respond to all bot comments
|
|
||
| # Define build outputs | ||
| OUTPUT_NAME := multicore_scheduler_am243x-lp_icss_g0_tx_pru1_fw | ||
| HEX_ARRAY_PREFIX := PRU0Firmware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Fix incorrect hex array prefix
| HEX_ARRAY_PREFIX := PRU0Firmware | |
| HEX_ARRAY_PREFIX := TXPRU1Firmware |
Signed-off-by: Aravind-Padma-Kumar <[email protected]>
|
Review Fixes : |
81ed265 to
d2d6c5a
Compare
User description
This example demonstrates multicore time-based scheduling that uses 6 PRU cores
PR Type
Enhancement
Description
Added comprehensive multicore scheduler example demonstrating time-based scheduling across 6 PRU cores (PRU0, PRU1, RTU0, RTU1, TXPRU0, TXPRU1) on AM243x LaunchPad
Implemented IEP timer configuration with 250 MHz clock and compare registers (CMP0-CMP7) for task event triggering
Configured task manager for all 6 cores with event-to-task mappings and priority levels for sequential PWM control
Added device-specific pinmux header with GPIO pin configuration and base addresses for all cores
Implemented PWM toggle tasks for each core alternating between logic high and low outputs
Created complete build infrastructure including makefiles, linker scripts, and CCS project specifications for each core
Added comprehensive documentation with configuration details, timing diagrams, and step-by-step execution instructions
Updated top-level examples makefile to include the new multicore_scheduler example
Diagram Walkthrough
File Walkthrough
26 files
am243_am64_pru_pinmux.h
Device pinmux configuration header for AM243x PRU coresexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/am243_am64_pru_pinmux.h
configuration defines
RTU0, RTU1)
PRU configuration
linker.cmd
TXPRU0 linker script with memory map configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru0_fw/ti-pru-cgt/linker.cmd
data RAM
sections
registers
linker.cmd
TXPRU1 linker script with memory map configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru1_fw/ti-pru-cgt/linker.cmd
data RAM
sections
registers
linker.cmd
PRU0 linker script with memory map configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/linker.cmd
data RAM
registers
linker.cmd
RTU1 linker script with memory map configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru1_fw/ti-pru-cgt/linker.cmd
data RAM
registers
linker.cmd
RTU0 linker script with memory map configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru0_fw/ti-pru-cgt/linker.cmd
data RAM
registers
linker.cmd
PRU1 linker script with memory map configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru1_fw/ti-pru-cgt/linker.cmd
data RAM
registers
makefile
TXPRU0 firmware build makefile with compiler configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru0_fw/ti-pru-cgt/makefile
hex array prefix
integration
makefile_projectspec
RTU0 CCS project specification makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru0_fw/ti-pru-cgt/makefile_projectspec
makefile_projectspec
RTU1 CCS project specification makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru1_fw/ti-pru-cgt/makefile_projectspec
makefile_projectspec
TXPRU0 CCS project specification makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru0_fw/ti-pru-cgt/makefile_projectspec
makefile
TX_PRU1 firmware build configuration makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru1_fw/ti-pru-cgt/makefile
lines
optimization level O2
array generation
makefile
RTU_PRU0 firmware build configuration makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru0_fw/ti-pru-cgt/makefile
structure to other cores
settings
makefile
RTU_PRU1 firmware build configuration makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru1_fw/ti-pru-cgt/makefile
naming
makefile
PRU0 firmware build configuration makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile
makefile
PRU1 firmware build configuration makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru1_fw/ti-pru-cgt/makefile
options
example.projectspec
PRU0 CCS project specification and build configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/example.projectspec
example.projectspec
RTU_PRU0 CCS project specification and configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru0_fw/ti-pru-cgt/example.projectspec
launchpad
conventions
example.projectspec
RTU_PRU1 CCS project specification and configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru1_fw/ti-pru-cgt/example.projectspec
definitions
integration
makefile
Multicore scheduler top-level build configurationexamples/multicore_scheduler/makefile
support
RTU_PRU1, TX_PRU0, TX_PRU1)
example.projectspec
TX_PRU0 CCS project specification and configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru0_fw/ti-pru-cgt/example.projectspec
example.projectspec
TX_PRU1 CCS project specification and configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru1_fw/ti-pru-cgt/example.projectspec
definitions
makefile_projectspec
TX_PRU1 CCS project build wrapper makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru1_fw/ti-pru-cgt/makefile_projectspec
lines)
command-line interface
makefile_projectspec
PRU0 CCS project build wrapper makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec
makefile_projectspec
PRU1 CCS project build wrapper makefileexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru1_fw/ti-pru-cgt/makefile_projectspec
makefile
Add multicore_scheduler to examples build listexamples/makefile
multicore_schedulerexamplerpmsg_echo_linuxfrom the build subdirectories12 files
main.c
PRU0 multicore scheduler initialization and clock configurationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/main.c
IEP)
pinmux setup
FN_MCS_CFG()to configure IEP timer, compareregisters, and task manager
main.c
TXPRU0 task manager configuration for PWM togglingexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru0_fw/ti-pru-cgt/main.c
FN_PWM_INIT_TOGGLE_TXPRU0_TASKin TS2_0main.c
RTU1 task manager setup for scheduled PWM controlexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru1_fw/ti-pru-cgt/main.c
FN_PWM_INIT_TOGGLE_RTU1_TASKexecution in TS2_0execution
main.c
PRU1 task manager configuration for scheduled tasksexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru1_fw/ti-pru-cgt/main.c
FN_PWM_INIT_TOGGLE_PRU1_TASKto TS2_0 task slotmain.c
RTU0 task manager initialization for PWM controlexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru0_fw/ti-pru-cgt/main.c
FN_PWM_INIT_TOGGLE_RTU0_TASKfor execution in TS2_0main.c
TXPRU1 task manager configuration for PWM togglingexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru1_fw/ti-pru-cgt/main.c
FN_PWM_INIT_TOGGLE_TXPRU1_TASKto TS2_0 task slotpwm_toggle.asm
PRU0 multicore scheduler and PWM toggle task implementationexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/pwm_toggle.asm
FN_MCS_CFG()assembly routine for multicore schedulingconfiguration
(CMP0-CMP7) for task triggering
and priority levels
FN_PWM_INIT_TOGGLE_PRU0_TASKto toggle PWM pin via PWM initstate
pwm_toggle.asm
TXPRU1 PWM toggle task for logic low outputexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru1_fw/ti-pru-cgt/pwm_toggle.asm
FN_PWM_INIT_TOGGLE_TXPRU1_TASKto set PWM pin to logic lowpwm_toggle.asm
TXPRU0 PWM toggle task for logic high outputexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_tx_pru0_fw/ti-pru-cgt/pwm_toggle.asm
FN_PWM_INIT_TOGGLE_TXPRU0_TASKto set PWM pin to logic highpwm_toggle.asm
RTU1 PWM toggle task for logic high outputexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru1_fw/ti-pru-cgt/pwm_toggle.asm
FN_PWM_INIT_TOGGLE_RTU1_TASKto set PWM pin to logic highpwm_toggle.asm
RTU0 PWM toggle task for logic low outputexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_rtu_pru0_fw/ti-pru-cgt/pwm_toggle.asm
FN_PWM_INIT_TOGGLE_RTU0_TASKto set PWM pin to logic lowpwm_toggle.asm
PRU1 PWM toggle task for logic low outputexamples/multicore_scheduler/firmware/am243x-lp/icss_g0_pru1_fw/ti-pru-cgt/pwm_toggle.asm
FN_PWM_INIT_TOGGLE_PRU1_TASKto set PWM pin to logic low1 files
README.md
Multicore scheduler example documentation and usage guideexamples/multicore_scheduler/README.md
lines)
sequential scheduling
task mappings
diagrams and pin information
1 files