Pull request #68: rtlibs v9.1 release item + artifacts
Merge in PINDSW/motor_control_sdk from rtlibs_9_01 to next * commit '306b984080aeb47efe35746bf47eb44158ae65d9': am243x/am263x: rtlibs: Add transforms libraries and examples
This commit is contained in:
commit
002db97cca
@ -255,6 +255,134 @@
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running NORTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"AM243x_GP_EVM"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"nortos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_nortos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running FREERTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"AM243x_GP_EVM"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"freertos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_freertos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running NORTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"AM243x_LAUNCHPAD"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"nortos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_nortos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running FREERTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"AM243x_LAUNCHPAD"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"freertos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_freertos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceType": "project.ccs",
|
"resourceType": "project.ccs",
|
||||||
"resourceClass": [
|
"resourceClass": [
|
||||||
|
|||||||
@ -255,6 +255,134 @@
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running NORTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"TMDSCNCD263"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"nortos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_nortos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running FREERTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"TMDSCNCD263"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"freertos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_freertos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running NORTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"LP-AM263"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"nortos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_nortos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceType": "project.ccs",
|
||||||
|
"resourceClass": [
|
||||||
|
"example"
|
||||||
|
],
|
||||||
|
"resourceSubClass": [
|
||||||
|
"example.gettingstarted"
|
||||||
|
],
|
||||||
|
"description": "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification CPU is R5FSS0-0 running FREERTOS.",
|
||||||
|
"name": "transforms_test",
|
||||||
|
"location": "../../examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang/example.projectspec",
|
||||||
|
"devtools": [
|
||||||
|
"LP-AM263"
|
||||||
|
],
|
||||||
|
"kernel": [
|
||||||
|
"freertos"
|
||||||
|
],
|
||||||
|
"compiler": [
|
||||||
|
"ticlang"
|
||||||
|
],
|
||||||
|
"subCategories": [
|
||||||
|
"transforms",
|
||||||
|
"transforms_test",
|
||||||
|
"r5fss0-0_freertos"
|
||||||
|
],
|
||||||
|
"mainCategories": [
|
||||||
|
[
|
||||||
|
"Examples",
|
||||||
|
"Development Tools"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceType": "project.ccs",
|
"resourceType": "project.ccs",
|
||||||
"resourceClass": [
|
"resourceClass": [
|
||||||
|
|||||||
@ -18,6 +18,7 @@ const device_defines = {
|
|||||||
const example_file_list = [
|
const example_file_list = [
|
||||||
"examples/dcl/dcl_df22/.project/mcsdk_project.js",
|
"examples/dcl/dcl_df22/.project/mcsdk_project.js",
|
||||||
"examples/dcl/dcl_pi/.project/mcsdk_project.js",
|
"examples/dcl/dcl_pi/.project/mcsdk_project.js",
|
||||||
|
"examples/transforms/transforms_test/.project/mcsdk_project.js",
|
||||||
"examples/position_sense/endat_diagnostic/single_channel/.project/project.js",
|
"examples/position_sense/endat_diagnostic/single_channel/.project/project.js",
|
||||||
"examples/position_sense/endat_diagnostic/multi_channel_load_share/.project/project.js",
|
"examples/position_sense/endat_diagnostic/multi_channel_load_share/.project/project.js",
|
||||||
"examples/position_sense/endat_diagnostic/multi_channel_single_pru/.project/project.js",
|
"examples/position_sense/endat_diagnostic/multi_channel_single_pru/.project/project.js",
|
||||||
|
|||||||
@ -13,6 +13,7 @@ const device_defines = {
|
|||||||
const example_file_list = [
|
const example_file_list = [
|
||||||
"examples/dcl/dcl_df22/.project/mcsdk_project.js",
|
"examples/dcl/dcl_df22/.project/mcsdk_project.js",
|
||||||
"examples/dcl/dcl_pi/.project/mcsdk_project.js",
|
"examples/dcl/dcl_pi/.project/mcsdk_project.js",
|
||||||
|
"examples/transforms/transforms_test/.project/mcsdk_project.js",
|
||||||
"examples/position_sense/tamagawa_diagnostic_over_soc_uart/.project/project.js",
|
"examples/position_sense/tamagawa_diagnostic_over_soc_uart/.project/project.js",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,5 @@
|
|||||||
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/components/transforms/transforms.md
|
||||||
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/source/transforms/clarke/clarke.h
|
||||||
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/source/transforms/park/park.h
|
||||||
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/source/transforms/ipark/ipark.h
|
||||||
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/source/transforms/svgen/svgen.h
|
||||||
85
docs_src/docs/api_guide/components/transforms/transforms.md
Normal file
85
docs_src/docs/api_guide/components/transforms/transforms.md
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# Transformation Algorithm {#Transforms}
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
The Transformation module consists of transformation commonly found in motor-control applications.
|
||||||
|
|
||||||
|
## Features Supported
|
||||||
|
|
||||||
|
Transformation module includes:
|
||||||
|
|
||||||
|
- Clarke transformation
|
||||||
|
- Park transformation
|
||||||
|
- Inverse Park transformation
|
||||||
|
- Space Vector Generation (SVGEN)
|
||||||
|
- Common-mode subtraction approach
|
||||||
|
- DPWM Generation (Part of SVGEN)
|
||||||
|
- Maximum Modulation
|
||||||
|
- Minimum Modulation
|
||||||
|
|
||||||
|
## Features Not Supported
|
||||||
|
|
||||||
|
N/A
|
||||||
|
|
||||||
|
## Benchmark Results
|
||||||
|
|
||||||
|
A benchmark on R5F core has been conducted to observe the following results when running the following functions:
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Transform Function
|
||||||
|
<th>Cpu Cycles
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2" bgcolor=#F0F0F0> Clarke Transform </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>CLARKE_run_twoInput</td>
|
||||||
|
<td>16</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>CLARKE_run_threeInput</td>
|
||||||
|
<td>18</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2" bgcolor=#F0F0F0> Park Transform </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>PARK_run</td>
|
||||||
|
<td>19*</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2" bgcolor=#F0F0F0> Inverse Park Transform </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>IPARK_run</td>
|
||||||
|
<td>19*</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2" bgcolor=#F0F0F0> Space Vector Generation </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>SVGEN_runCom</td>
|
||||||
|
<td>41</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2" bgcolor=#F0F0F0> DPWM Generation </td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>SVGEN_runMax</td>
|
||||||
|
<td>36</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>SVGEN_runMin</td>
|
||||||
|
<td>36</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
\* Note both PARK and IPARK does not include trigonometric calculations of phasor. For R5F core, it's recommened to leverage the fast ti_arm_sincos() function found in ti_arm_trig/mathlib of MCU+ SDK.
|
||||||
|
- Ran with TI Clang Compiler v3.2.0.LTS, with -Os flag and functions force-inlined onto the benchmarking function placed in TCM memory. Obtained the average result from 600 consecutive loops of running transform functions with DPL CycleCountP, mimicking the usage of a control loop.
|
||||||
|
- Actual result may vary depending on provided datasets and memory configuration. For R5F, it is recommended for users to map control loops to TCM for the best performance.
|
||||||
|
## Provided Examples
|
||||||
|
|
||||||
|
The following examples has been provided to demonstrate transformation module:
|
||||||
|
|
||||||
|
- \ref EXAMPLES_TRANSFORMS_TEST
|
||||||
|
|
||||||
|
## Additional References {#DCL_ADDITIONAL_REFERENCES}
|
||||||
|
|
||||||
|
N/A
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
\ref TRANSFORMS_API_MODULE
|
||||||
@ -8,3 +8,4 @@ INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/dcl/dcl_pi/dc
|
|||||||
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/dcl/dcl_df22/dcl_df22.md
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/dcl/dcl_df22/dcl_df22.md
|
||||||
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/pruicss_pwm_dutycycle.md
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/pruicss_pwm_dutycycle.md
|
||||||
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/pruicss_pwm_epwm_sync.md
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/pruicss_pwm_epwm_sync.md
|
||||||
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/transforms/transforms_test/transforms_test.md
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/examples.md
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/examples.md
|
||||||
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/tamagawa_uart_example.md
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/tamagawa_uart_example.md
|
||||||
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/dcl/dcl_pi/dcl_pi.md
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/dcl/dcl_pi/dcl_pi.md
|
||||||
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/dcl/dcl_df22/dcl_df22.md
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/dcl/dcl_df22/dcl_df22.md
|
||||||
|
INPUT+= $(MOTOR_CONTROL_SDK_PATH)/docs_src/docs/api_guide/examples/transforms/transforms_test/transforms_test.md
|
||||||
@ -23,6 +23,7 @@ This page lists all the examples and demos supported in this SDK.
|
|||||||
- RTLibs
|
- RTLibs
|
||||||
-# \subpage EXAMPLES_DCL_PI
|
-# \subpage EXAMPLES_DCL_PI
|
||||||
-# \subpage EXAMPLES_DCL_DF22
|
-# \subpage EXAMPLES_DCL_DF22
|
||||||
|
-# \subpage EXAMPLES_TRANSFORMS_TEST
|
||||||
- PRUICSS PWM
|
- PRUICSS PWM
|
||||||
-# \subpage EXAMPLE_PRUICSS_PWM_DUTY_CYCLE
|
-# \subpage EXAMPLE_PRUICSS_PWM_DUTY_CYCLE
|
||||||
-# \subpage EXAMPLE_PRUICSS_PWM_EPWM_SYNC
|
-# \subpage EXAMPLE_PRUICSS_PWM_EPWM_SYNC
|
||||||
@ -34,4 +35,5 @@ This page lists all the examples and demos supported in this SDK.
|
|||||||
- RTLibs
|
- RTLibs
|
||||||
-# \subpage EXAMPLES_DCL_PI
|
-# \subpage EXAMPLES_DCL_PI
|
||||||
-# \subpage EXAMPLES_DCL_DF22
|
-# \subpage EXAMPLES_DCL_DF22
|
||||||
|
-# \subpage EXAMPLES_TRANSFORMS_TEST
|
||||||
\endcond
|
\endcond
|
||||||
|
|||||||
@ -0,0 +1,109 @@
|
|||||||
|
# CLAKRE-PARK-ICLARKE-SVGEN Test {#EXAMPLES_TRANSFORMS_TEST}
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
Simple data test incorporating foc-related libraries
|
||||||
|
|
||||||
|
This example runs verifies various transforms libraries used in motor-control application,
|
||||||
|
specifically as a building block of Field of Control (FOC) motor design.
|
||||||
|
|
||||||
|
It demonstrates how to run clarke, park, inverse park transform and
|
||||||
|
space-vector generation (svgen). This test trys to mimic a conventional
|
||||||
|
workflow of passing current values into clarke transform, then park, then
|
||||||
|
inverse park (PI controllers are neglected here but should exist for both open and close-loop design)
|
||||||
|
and finally passing to svgen to generate the three-phase ABC value.
|
||||||
|
|
||||||
|
The test used an aribitary phasor angle that feeds into park/ipark,
|
||||||
|
as opposed to an angle generation module required by an actual FOC design.
|
||||||
|
|
||||||
|
The test vector then compares the PARK, SVGEN results to ensure the integraty of the library.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Files and directory structure
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Folder/Files
|
||||||
|
<th>Description
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2" bgcolor=#F0F0F0> ${SDK_INSTALL_PATH}/examples/transforms/transforms_test</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>transforms_test.c</td>
|
||||||
|
<td>Main function for transforms library testing</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>transforms_test.h</td>
|
||||||
|
<td>Contains all initialization of test strctures and variables</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr><td colspan="2" bgcolor=#F0F0F0> ${SDK_INSTALL_PATH}/source/transforms</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td>clarke/</td>
|
||||||
|
<td>Folder containing CLARKE library source</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>park/</td>
|
||||||
|
<td>Folder containing PARK library source</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ipark/</td>
|
||||||
|
<td>Folder containing IPARK library source</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>svgen/</td>
|
||||||
|
<td>Folder containing SVGEN library source</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
# Supported Combinations {#EXAMPLES_TRANSFORMS_TEST_COMBO}
|
||||||
|
|
||||||
|
\cond SOC_AM64X
|
||||||
|
|
||||||
|
Parameter | Value
|
||||||
|
---------------|-----------
|
||||||
|
CPU + OS | r5fss0-0 nortos
|
||||||
|
^ | r5fss0-0 freertos
|
||||||
|
Toolchain | ti-arm-clang
|
||||||
|
Board | @VAR_BOARD_NAME_LOWER, @VAR_SK_BOARD_NAME_LOWER
|
||||||
|
Example folder | examples/transforms/transforms_test
|
||||||
|
|
||||||
|
\endcond
|
||||||
|
|
||||||
|
\cond SOC_AM243X
|
||||||
|
|
||||||
|
Parameter | Value
|
||||||
|
---------------|-----------
|
||||||
|
CPU + OS | r5fss0-0 nortos
|
||||||
|
^ | r5fss0-0 freertos
|
||||||
|
Toolchain | ti-arm-clang
|
||||||
|
Boards | @VAR_BOARD_NAME_LOWER, @VAR_LP_BOARD_NAME_LOWER
|
||||||
|
Example folder | examples/transforms/transforms_test
|
||||||
|
|
||||||
|
\endcond
|
||||||
|
|
||||||
|
\cond SOC_AM263X
|
||||||
|
|
||||||
|
Parameter | Value
|
||||||
|
---------------|-----------
|
||||||
|
CPU + OS | r5fss0-0 nortos
|
||||||
|
^ | r5fss0-0 freertos
|
||||||
|
Toolchain | ti-arm-clang
|
||||||
|
Boards | @VAR_BOARD_NAME_LOWER, @VAR_LP_BOARD_NAME_LOWER
|
||||||
|
Example folder | examples/transforms/transforms_test
|
||||||
|
|
||||||
|
\endcond
|
||||||
|
|
||||||
|
# Steps to Run the Example
|
||||||
|
|
||||||
|
- **When using CCS projects to build**, import the CCS project for the required combination and build it using the CCS project menu (see <a href="@VAR_MCU_SDK_DOCS_PATH/CCS_PROJECTS_PAGE.html" target="_blank"> Using SDK with CCS Projects </a>).
|
||||||
|
- **When using makefiles to build**, note the required combination and build using make command (see <a href="@VAR_MCU_SDK_DOCS_PATH/MAKEFILE_BUILD_PAGE.html" target="_blank"> Using SDK with Makefiles </a>).
|
||||||
|
- Launch a CCS debug session and run the executable, see <a href="@VAR_MCU_SDK_DOCS_PATH/CCS_LAUNCH_PAGE.html" target="_blank"> CCS Launch, Load and Run </a>
|
||||||
|
|
||||||
|
### Sample Output
|
||||||
|
|
||||||
|
Shown below is a sample output when the application is run, assuming when all test passes:
|
||||||
|
|
||||||
|
\code
|
||||||
|
Transforms test produced 0 error
|
||||||
|
\endcode
|
||||||
@ -189,8 +189,12 @@ const templates_freertos_m4f =
|
|||||||
const buildOptionCombos = [
|
const buildOptionCombos = [
|
||||||
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "nortos"},
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "nortos"},
|
||||||
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "freertos"},
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "freertos"},
|
||||||
|
//{ device: device, cpu: "m4fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "nortos"},
|
||||||
|
//{ device: device, cpu: "m4fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "freertos"},
|
||||||
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "nortos"},
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "nortos"},
|
||||||
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "freertos"},
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "freertos"},
|
||||||
|
//{ device: device, cpu: "m4fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "nortos"},
|
||||||
|
//{ device: device, cpu: "m4fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "freertos"},
|
||||||
];
|
];
|
||||||
|
|
||||||
function getComponentProperty() {
|
function getComponentProperty() {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
* @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM243X@09.01.00"
|
* @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM243x@09.01.00"
|
||||||
* @versions {"tool":"1.18.0+3266"}
|
* @versions {"tool":"1.18.0+3266"}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
* @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM263X@09.01.00"
|
* @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM263x@09.01.00"
|
||||||
* @versions {"tool":"1.18.0+3266"}
|
* @versions {"tool":"1.18.0+3266"}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@ -64,10 +64,12 @@ int PI_runTest(DCL_PI *ctrl_handle, DCL_PI_FUNC dcl_pi_func);
|
|||||||
//!
|
//!
|
||||||
DCL_PI *pi_controller = &(DCL_PI)
|
DCL_PI *pi_controller = &(DCL_PI)
|
||||||
{
|
{
|
||||||
.Kp = 2.50000f,
|
.Kp = 2.5f,
|
||||||
.Ki = 0.01000f,
|
.Ki = 0.01f,
|
||||||
.Umax = 2.00000f,
|
.Umax = 2.0f,
|
||||||
.Umin = -2.00000f,
|
.Umin = -2.0f,
|
||||||
|
.Imax = 1.0f,
|
||||||
|
.Imin = -1.0f,
|
||||||
PI_INT_DEFAULTS // macro for default values of internal attributes
|
PI_INT_DEFAULTS // macro for default values of internal attributes
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
function getComponentProperty(device)
|
||||||
|
{
|
||||||
|
return require(`./mcsdk_project_${device}`).getComponentProperty();
|
||||||
|
};
|
||||||
|
|
||||||
|
function getComponentBuildProperty(buildOption)
|
||||||
|
{
|
||||||
|
return require(`./mcsdk_project_${buildOption.device}`).getComponentBuildProperty(buildOption);
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
getComponentProperty,
|
||||||
|
getComponentBuildProperty,
|
||||||
|
};
|
||||||
@ -0,0 +1,267 @@
|
|||||||
|
let path = require('path');
|
||||||
|
|
||||||
|
let device = "am243x";
|
||||||
|
|
||||||
|
const files = {
|
||||||
|
common: [
|
||||||
|
/* Project Files */
|
||||||
|
"transforms_test.c",
|
||||||
|
"main.c",
|
||||||
|
/* Dataset */
|
||||||
|
/* Libraries */
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const projectspec_files = {
|
||||||
|
common: [
|
||||||
|
"../../../transforms_test.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Relative to where the makefile will be generated
|
||||||
|
* Typically at <example_folder>/<BOARD>/<core_os_combo>/<compiler>
|
||||||
|
*/
|
||||||
|
const filedirs = {
|
||||||
|
common: [
|
||||||
|
"..", /* core_os_combo base */
|
||||||
|
"../../..", /* Example base */
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libdirs_nortos = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libdirs_freertos = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const includes_nortos_r5f = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/park",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const includes_freertos_r5f = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am243x/r5f",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/park",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const includes_nortos_m4f = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/park",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen"
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const includes_freertos_m4f = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CM4F",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am243x/m4f",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/park",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen"
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libs_nortos_r5f = {
|
||||||
|
common: [
|
||||||
|
"nortos.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"drivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"board.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"mathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libs_freertos_r5f = {
|
||||||
|
common: [
|
||||||
|
"freertos.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"drivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"board.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"mathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libs_nortos_m4f = {
|
||||||
|
common: [
|
||||||
|
"nortos.am243x.m4f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"drivers.am243x.m4f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"board.am243x.m4f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libs_freertos_m4f = {
|
||||||
|
common: [
|
||||||
|
"freertos.am243x.m4f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"drivers.am243x.m4f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"board.am243x.m4f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const lnkfiles = {
|
||||||
|
common: [
|
||||||
|
"linker.cmd",
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
const syscfgfile = "../example.syscfg";
|
||||||
|
|
||||||
|
const readmeDoxygenPageTag = "EXAMPLES_TRANSFORMS_TEST";
|
||||||
|
|
||||||
|
const templates_nortos_r5f =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/common/linker_r5f.cmd.xdt",
|
||||||
|
output: "linker.cmd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/nortos/main_nortos.c.xdt",
|
||||||
|
output: "../main.c",
|
||||||
|
options: {
|
||||||
|
entryFunction: "transforms_test_main",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const templates_freertos_r5f =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/common/linker_r5f.cmd.xdt",
|
||||||
|
output: "linker.cmd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/freertos/main_freertos.c.xdt",
|
||||||
|
output: "../main.c",
|
||||||
|
options: {
|
||||||
|
entryFunction: "transforms_test_main",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
const templates_nortos_m4f =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/common/linker_m4f.cmd.xdt",
|
||||||
|
output: "linker.cmd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/nortos/main_nortos.c.xdt",
|
||||||
|
output: "../main.c",
|
||||||
|
options: {
|
||||||
|
entryFunction: "transforms_test_main",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const templates_freertos_m4f =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/common/linker_m4f.cmd.xdt",
|
||||||
|
output: "linker.cmd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: ".project/templates/am243x/freertos/main_freertos.c.xdt",
|
||||||
|
output: "../main.c",
|
||||||
|
options: {
|
||||||
|
entryFunction: "transforms_test_main",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const buildOptionCombos = [
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "nortos"},
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-evm", os: "freertos"},
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "nortos"},
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am243x-lp", os: "freertos"},
|
||||||
|
];
|
||||||
|
|
||||||
|
function getComponentProperty() {
|
||||||
|
let property = {};
|
||||||
|
|
||||||
|
property.dirPath = path.resolve(__dirname, "..");
|
||||||
|
property.type = "executable";
|
||||||
|
property.name = "transforms_test";
|
||||||
|
property.isInternal = false;
|
||||||
|
property.tirexResourceSubClass = [ "example.gettingstarted" ];
|
||||||
|
property.description = "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification"
|
||||||
|
property.buildOptionCombos = buildOptionCombos;
|
||||||
|
|
||||||
|
return property;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getComponentBuildProperty(buildOption) {
|
||||||
|
let build_property = {};
|
||||||
|
|
||||||
|
build_property.files = files;
|
||||||
|
build_property.filedirs = filedirs;
|
||||||
|
build_property.libdirs = libdirs_nortos;
|
||||||
|
build_property.lnkfiles = lnkfiles;
|
||||||
|
build_property.syscfgfile = syscfgfile;
|
||||||
|
build_property.readmeDoxygenPageTag = readmeDoxygenPageTag;
|
||||||
|
build_property.projectspec_files = projectspec_files;
|
||||||
|
|
||||||
|
if(buildOption.cpu.match(/r5f*/)) {
|
||||||
|
if(buildOption.os.match(/freertos*/) )
|
||||||
|
{
|
||||||
|
build_property.includes = includes_freertos_r5f;
|
||||||
|
build_property.libdirs = libdirs_freertos;
|
||||||
|
build_property.libs = libs_freertos_r5f;
|
||||||
|
build_property.templates = templates_freertos_r5f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
build_property.includes = includes_nortos_r5f;
|
||||||
|
build_property.libs = libs_nortos_r5f;
|
||||||
|
build_property.templates = templates_nortos_r5f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(buildOption.cpu.match(/m4f*/)) {
|
||||||
|
if(buildOption.os.match(/freertos*/) )
|
||||||
|
{
|
||||||
|
build_property.includes = includes_freertos_m4f;
|
||||||
|
build_property.libdirs = libdirs_freertos;
|
||||||
|
build_property.libs = libs_freertos_m4f;
|
||||||
|
build_property.templates = templates_freertos_m4f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
build_property.includes = includes_nortos_m4f;
|
||||||
|
build_property.libs = libs_nortos_m4f;
|
||||||
|
build_property.templates = templates_nortos_m4f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return build_property;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
getComponentProperty,
|
||||||
|
getComponentBuildProperty,
|
||||||
|
};
|
||||||
@ -0,0 +1,186 @@
|
|||||||
|
let path = require('path');
|
||||||
|
|
||||||
|
let device = "am263x";
|
||||||
|
|
||||||
|
const files = {
|
||||||
|
common: [
|
||||||
|
/* Project Files */
|
||||||
|
"transforms_test.c",
|
||||||
|
"main.c",
|
||||||
|
/* Dataset */
|
||||||
|
/* Libraries */
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const projectspec_files = {
|
||||||
|
common: [
|
||||||
|
"../../../transforms_test.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Relative to where the makefile will be generated
|
||||||
|
* Typically at <example_folder>/<BOARD>/<core_os_combo>/<compiler>
|
||||||
|
*/
|
||||||
|
const filedirs = {
|
||||||
|
common: [
|
||||||
|
"..", /* core_os_combo base */
|
||||||
|
"../../..", /* Example base */
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libdirs_nortos = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libdirs_freertos = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const includes_nortos_r5f = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/park",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const includes_freertos_r5f = {
|
||||||
|
common: [
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am263x/r5f",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/park",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen",
|
||||||
|
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libs_nortos_r5f = {
|
||||||
|
common: [
|
||||||
|
"nortos.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"drivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"board.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"mathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const libs_freertos_r5f = {
|
||||||
|
common: [
|
||||||
|
"freertos.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"drivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"board.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
"mathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const lnkfiles = {
|
||||||
|
common: [
|
||||||
|
"linker.cmd",
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
const syscfgfile = "../example.syscfg";
|
||||||
|
|
||||||
|
const readmeDoxygenPageTag = "EXAMPLES_TRANSFORMS_TEST";
|
||||||
|
|
||||||
|
const templates_nortos_r5f =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: ".project/templates/am263x/common/linker_r5f.cmd.xdt",
|
||||||
|
output: "linker.cmd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: ".project/templates/am263x/nortos/main_nortos.c.xdt",
|
||||||
|
output: "../main.c",
|
||||||
|
options: {
|
||||||
|
entryFunction: "transforms_test_main",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const templates_freertos_r5f =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: ".project/templates/am263x/common/linker_r5f.cmd.xdt",
|
||||||
|
output: "linker.cmd",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: ".project/templates/am263x/freertos/main_freertos.c.xdt",
|
||||||
|
output: "../main.c",
|
||||||
|
options: {
|
||||||
|
entryFunction: "transforms_test_main",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
const buildOptionCombos = [
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am263x-cc", os: "nortos"},
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am263x-cc", os: "freertos"},
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am263x-lp", os: "nortos"},
|
||||||
|
{ device: device, cpu: "r5fss0-0", cgt: "ti-arm-clang", board: "am263x-lp", os: "freertos"},
|
||||||
|
];
|
||||||
|
|
||||||
|
function getComponentProperty() {
|
||||||
|
let property = {};
|
||||||
|
|
||||||
|
property.dirPath = path.resolve(__dirname, "..");
|
||||||
|
property.type = "executable";
|
||||||
|
property.name = "transforms_test";
|
||||||
|
property.isInternal = false;
|
||||||
|
property.tirexResourceSubClass = [ "example.gettingstarted" ];
|
||||||
|
property.description = "A simple test vector of ClARKE-PARK-IPARK-SVGEN data verification"
|
||||||
|
property.buildOptionCombos = buildOptionCombos;
|
||||||
|
|
||||||
|
return property;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getComponentBuildProperty(buildOption) {
|
||||||
|
let build_property = {};
|
||||||
|
|
||||||
|
build_property.files = files;
|
||||||
|
build_property.filedirs = filedirs;
|
||||||
|
build_property.libdirs = libdirs_nortos;
|
||||||
|
build_property.lnkfiles = lnkfiles;
|
||||||
|
build_property.syscfgfile = syscfgfile;
|
||||||
|
build_property.readmeDoxygenPageTag = readmeDoxygenPageTag;
|
||||||
|
build_property.projectspec_files = projectspec_files;
|
||||||
|
|
||||||
|
if(buildOption.cpu.match(/r5f*/)) {
|
||||||
|
if(buildOption.os.match(/freertos*/) )
|
||||||
|
{
|
||||||
|
build_property.includes = includes_freertos_r5f;
|
||||||
|
build_property.libdirs = libdirs_freertos;
|
||||||
|
build_property.libs = libs_freertos_r5f;
|
||||||
|
build_property.templates = templates_freertos_r5f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
build_property.includes = includes_nortos_r5f;
|
||||||
|
build_property.libs = libs_nortos_r5f;
|
||||||
|
build_property.templates = templates_nortos_r5f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return build_property;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
getComponentProperty,
|
||||||
|
getComponentBuildProperty,
|
||||||
|
};
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM243x_ALV_beta" --package "ALV" --part "ALV" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM243X@07.03.00"
|
||||||
|
* @versions {"data":"2021012919","timestamp":"2021012919","tool":"1.8.0+1785","templates":null}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv76 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART_CONSOLE";
|
||||||
|
debug_log.uartLog.UART.$assign = "USART0";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x41010000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x60000000;
|
||||||
|
mpu_armv75.size = 28;
|
||||||
|
mpu_armv75.accessPermissions = "Supervisor RD, User RD";
|
||||||
|
|
||||||
|
mpu_armv76.$name = "CONFIG_MPU_REGION5";
|
||||||
|
mpu_armv76.baseAddr = 0x80000000;
|
||||||
|
mpu_armv76.size = 31;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
|
||||||
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
||||||
|
* re-solve from scratch.
|
||||||
|
*/
|
||||||
|
debug_log.uartLog.UART.RXD.$suggestSolution = "UART0_RXD";
|
||||||
|
debug_log.uartLog.UART.TXD.$suggestSolution = "UART0_TXD";
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2021 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <kernel/dpl/DebugP.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
|
#define MAIN_TASK_PRI (configMAX_PRIORITIES-1)
|
||||||
|
|
||||||
|
#define MAIN_TASK_SIZE (16384U/sizeof(configSTACK_DEPTH_TYPE))
|
||||||
|
StackType_t gMainTaskStack[MAIN_TASK_SIZE] __attribute__((aligned(32)));
|
||||||
|
|
||||||
|
StaticTask_t gMainTaskObj;
|
||||||
|
TaskHandle_t gMainTask;
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
void freertos_main(void *args)
|
||||||
|
{
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
vTaskDelete(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
/* init SOC specific modules */
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
/* This task is created at highest priority, it should create more tasks and then delete itself */
|
||||||
|
gMainTask = xTaskCreateStatic( freertos_main, /* Pointer to the function that implements the task. */
|
||||||
|
"freertos_main", /* Text name for the task. This is to facilitate debugging only. */
|
||||||
|
MAIN_TASK_SIZE, /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
|
||||||
|
NULL, /* We are not using the task parameter. */
|
||||||
|
MAIN_TASK_PRI, /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
|
||||||
|
gMainTaskStack, /* pointer to stack base */
|
||||||
|
&gMainTaskObj ); /* pointer to statically allocated task object memory */
|
||||||
|
configASSERT(gMainTask != NULL);
|
||||||
|
|
||||||
|
/* Start the scheduler to start the tasks executing. */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
|
||||||
|
/* The following line should never be reached because vTaskStartScheduler()
|
||||||
|
will only return if there was not enough FreeRTOS heap memory available to
|
||||||
|
create the Idle and (if configured) Timer tasks. Heap management, and
|
||||||
|
techniques for trapping heap exhaustion, are described in the book text. */
|
||||||
|
DebugP_assertNoLog(0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* This linker file is optional, it's complementary to the device/core linker file
|
||||||
|
* Here it specifies the dcl function & data mapping allocated by __attribute__((section(...)))
|
||||||
|
* and link to a specific memory region for the best performance
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define core & platform specific variables */
|
||||||
|
#define FAST_RAM R5F_TCMB0 /* R5F_TCMA also works */
|
||||||
|
#define REG_RAM MSRAM
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* dcl functions mapped to on-chip fast ram */
|
||||||
|
dclfuncs : {} > FAST_RAM
|
||||||
|
|
||||||
|
/* optional -- map datas & variables to regular ram */
|
||||||
|
/* Sitara default linker should already map variables to ram */
|
||||||
|
dclDataSection : {} > REG_RAM
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM2434_ALV"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Release,
|
||||||
|
Debug,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM2434_ALV"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am243x/r5f
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM243X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am243x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part ALV --package ALV
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test FREERTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am243x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,148 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is disabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* General purpose non cacheable memory, used in some examples */
|
||||||
|
.bss.nocache (NOLOAD) : {} > NON_CACHE_MEM
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
NOTE: Below memory is reserved for DMSC usage
|
||||||
|
- During Boot till security handoff is complete
|
||||||
|
0x701E0000 - 0x701FFFFF (128KB)
|
||||||
|
- After "Security Handoff" is complete (i.e at run time)
|
||||||
|
0x701F4000 - 0x701FFFFF (48KB)
|
||||||
|
|
||||||
|
Security handoff is complete when this message is sent to the DMSC,
|
||||||
|
TISCI_MSG_SEC_HANDOVER
|
||||||
|
|
||||||
|
This should be sent once all cores are loaded and all application
|
||||||
|
specific firewall calls are setup.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB0 : ORIGIN = 0x41010000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* memory segment used to hold CPU specific non-cached data, MAKE to add a MPU entry to mark this as non-cached */
|
||||||
|
NON_CACHE_MEM : ORIGIN = 0x70060000 , LENGTH = 0x8000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
MSRAM : ORIGIN = 0x70080000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
/* shared memory segments */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x180
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D0000 + 0x180, LENGTH = 0x00004000 - 0x180
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x0000C000
|
||||||
|
}
|
||||||
@ -0,0 +1,312 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
BOOTIMAGE_NAME_HS:=transforms_test.$(PROFILE).appimage.hs
|
||||||
|
BOOTIMAGE_NAME_HS_FS:=transforms_test.$(PROFILE).appimage.hs_fs
|
||||||
|
TARGETS := $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
TARGETS += $(BOOTIMAGE_NAME_HS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am243x/r5f \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM243X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lfreertos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
freertos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am243x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am243x:r5fss0-0:freertos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(TARGETS)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am243x:r5fss0-0:freertos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am243x:r5fss0-0:freertos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am243x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am243x:r5fss0-0:freertos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part ALV --package ALV --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM243x_ALV_beta --context r5fss0-0 --part ALV --package ALV --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CERT_KEY=$(APP_SIGNING_KEY)
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS) Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME_HS): $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs_fs
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME).hs Done !!!
|
||||||
|
@echo .
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME).hs_fs Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM243x_ALV_beta" --package "ALV" --part "ALV" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM243X@07.03.00"
|
||||||
|
* @versions {"data":"2021012919","timestamp":"2021012919","tool":"1.8.0+1785","templates":null}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv76 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART_CONSOLE";
|
||||||
|
debug_log.uartLog.UART.$assign = "USART0";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x41010000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x60000000;
|
||||||
|
mpu_armv75.size = 28;
|
||||||
|
mpu_armv75.accessPermissions = "Supervisor RD, User RD";
|
||||||
|
|
||||||
|
mpu_armv76.$name = "CONFIG_MPU_REGION5";
|
||||||
|
mpu_armv76.baseAddr = 0x80000000;
|
||||||
|
mpu_armv76.size = 31;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
|
||||||
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
||||||
|
* re-solve from scratch.
|
||||||
|
*/
|
||||||
|
debug_log.uartLog.UART.RXD.$suggestSolution = "UART0_RXD";
|
||||||
|
debug_log.uartLog.UART.TXD.$suggestSolution = "UART0_TXD";
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2021 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
Board_deinit();
|
||||||
|
System_deinit();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM2434_ALV"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Release,
|
||||||
|
Debug,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM2434_ALV"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM243X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am243x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part ALV --package ALV
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test NORTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am243x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,148 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is disabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* General purpose non cacheable memory, used in some examples */
|
||||||
|
.bss.nocache (NOLOAD) : {} > NON_CACHE_MEM
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
NOTE: Below memory is reserved for DMSC usage
|
||||||
|
- During Boot till security handoff is complete
|
||||||
|
0x701E0000 - 0x701FFFFF (128KB)
|
||||||
|
- After "Security Handoff" is complete (i.e at run time)
|
||||||
|
0x701F4000 - 0x701FFFFF (48KB)
|
||||||
|
|
||||||
|
Security handoff is complete when this message is sent to the DMSC,
|
||||||
|
TISCI_MSG_SEC_HANDOVER
|
||||||
|
|
||||||
|
This should be sent once all cores are loaded and all application
|
||||||
|
specific firewall calls are setup.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB0 : ORIGIN = 0x41010000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* memory segment used to hold CPU specific non-cached data, MAKE to add a MPU entry to mark this as non-cached */
|
||||||
|
NON_CACHE_MEM : ORIGIN = 0x70060000 , LENGTH = 0x8000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
MSRAM : ORIGIN = 0x70080000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
/* shared memory segments */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x180
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D0000 + 0x180, LENGTH = 0x00004000 - 0x180
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x0000C000
|
||||||
|
}
|
||||||
@ -0,0 +1,309 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
BOOTIMAGE_NAME_HS:=transforms_test.$(PROFILE).appimage.hs
|
||||||
|
BOOTIMAGE_NAME_HS_FS:=transforms_test.$(PROFILE).appimage.hs_fs
|
||||||
|
TARGETS := $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
TARGETS += $(BOOTIMAGE_NAME_HS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM243X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lnortos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
nortos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am243x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am243x:r5fss0-0:nortos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(TARGETS)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am243x:r5fss0-0:nortos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am243x:r5fss0-0:nortos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am243x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am243x:r5fss0-0:nortos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part ALV --package ALV --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM243x_ALV_beta --context r5fss0-0 --part ALV --package ALV --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CERT_KEY=$(APP_SIGNING_KEY)
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS) Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME_HS): $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs_fs
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME).hs Done !!!
|
||||||
|
@echo .
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME).hs_fs Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM243X@07.03.00"
|
||||||
|
* @versions {"data":"2021040816","timestamp":"2021040816","tool":"1.8.1+1900","templates":null}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART_CONSOLE";
|
||||||
|
debug_log.uartLog.UART.$assign = "USART0";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x41010000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x60000000;
|
||||||
|
mpu_armv75.size = 28;
|
||||||
|
mpu_armv75.accessPermissions = "Supervisor RD, User RD";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
|
||||||
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
||||||
|
* re-solve from scratch.
|
||||||
|
*/
|
||||||
|
debug_log.uartLog.UART.RXD.$suggestSolution = "B10";
|
||||||
|
debug_log.uartLog.UART.TXD.$suggestSolution = "B11";
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2021 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <kernel/dpl/DebugP.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
|
#define MAIN_TASK_PRI (configMAX_PRIORITIES-1)
|
||||||
|
|
||||||
|
#define MAIN_TASK_SIZE (16384U/sizeof(configSTACK_DEPTH_TYPE))
|
||||||
|
StackType_t gMainTaskStack[MAIN_TASK_SIZE] __attribute__((aligned(32)));
|
||||||
|
|
||||||
|
StaticTask_t gMainTaskObj;
|
||||||
|
TaskHandle_t gMainTask;
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
void freertos_main(void *args)
|
||||||
|
{
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
vTaskDelete(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
/* init SOC specific modules */
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
/* This task is created at highest priority, it should create more tasks and then delete itself */
|
||||||
|
gMainTask = xTaskCreateStatic( freertos_main, /* Pointer to the function that implements the task. */
|
||||||
|
"freertos_main", /* Text name for the task. This is to facilitate debugging only. */
|
||||||
|
MAIN_TASK_SIZE, /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
|
||||||
|
NULL, /* We are not using the task parameter. */
|
||||||
|
MAIN_TASK_PRI, /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
|
||||||
|
gMainTaskStack, /* pointer to stack base */
|
||||||
|
&gMainTaskObj ); /* pointer to statically allocated task object memory */
|
||||||
|
configASSERT(gMainTask != NULL);
|
||||||
|
|
||||||
|
/* Start the scheduler to start the tasks executing. */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
|
||||||
|
/* The following line should never be reached because vTaskStartScheduler()
|
||||||
|
will only return if there was not enough FreeRTOS heap memory available to
|
||||||
|
create the Idle and (if configured) Timer tasks. Heap management, and
|
||||||
|
techniques for trapping heap exhaustion, are described in the book text. */
|
||||||
|
DebugP_assertNoLog(0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM2434_ALX"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Release,
|
||||||
|
Debug,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM2434_ALX"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am243x/r5f
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM243X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am243x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part ALX --package ALX
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test FREERTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am243x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,148 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is disabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* General purpose non cacheable memory, used in some examples */
|
||||||
|
.bss.nocache (NOLOAD) : {} > NON_CACHE_MEM
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
NOTE: Below memory is reserved for DMSC usage
|
||||||
|
- During Boot till security handoff is complete
|
||||||
|
0x701E0000 - 0x701FFFFF (128KB)
|
||||||
|
- After "Security Handoff" is complete (i.e at run time)
|
||||||
|
0x701F4000 - 0x701FFFFF (48KB)
|
||||||
|
|
||||||
|
Security handoff is complete when this message is sent to the DMSC,
|
||||||
|
TISCI_MSG_SEC_HANDOVER
|
||||||
|
|
||||||
|
This should be sent once all cores are loaded and all application
|
||||||
|
specific firewall calls are setup.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB0 : ORIGIN = 0x41010000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* memory segment used to hold CPU specific non-cached data, MAKE to add a MPU entry to mark this as non-cached */
|
||||||
|
NON_CACHE_MEM : ORIGIN = 0x70060000 , LENGTH = 0x8000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
MSRAM : ORIGIN = 0x70080000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
/* shared memory segments */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x180
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D0000 + 0x180, LENGTH = 0x00004000 - 0x180
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x0000C000
|
||||||
|
}
|
||||||
@ -0,0 +1,312 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
BOOTIMAGE_NAME_HS:=transforms_test.$(PROFILE).appimage.hs
|
||||||
|
BOOTIMAGE_NAME_HS_FS:=transforms_test.$(PROFILE).appimage.hs_fs
|
||||||
|
TARGETS := $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
TARGETS += $(BOOTIMAGE_NAME_HS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am243x/r5f \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM243X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lfreertos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
freertos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am243x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am243x:r5fss0-0:freertos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(TARGETS)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am243x:r5fss0-0:freertos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am243x:r5fss0-0:freertos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am243x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am243x:r5fss0-0:freertos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part ALX --package ALX --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM243x_ALX_beta --context r5fss0-0 --part ALX --package ALX --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CERT_KEY=$(APP_SIGNING_KEY)
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS) Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME_HS): $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs_fs
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME).hs Done !!!
|
||||||
|
@echo .
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME).hs_fs Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM243X@07.03.00"
|
||||||
|
* @versions {"data":"2021040816","timestamp":"2021040816","tool":"1.8.1+1900","templates":null}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART_CONSOLE";
|
||||||
|
debug_log.uartLog.UART.$assign = "USART0";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x41010000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x60000000;
|
||||||
|
mpu_armv75.size = 28;
|
||||||
|
mpu_armv75.accessPermissions = "Supervisor RD, User RD";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
|
||||||
|
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
|
||||||
|
* re-solve from scratch.
|
||||||
|
*/
|
||||||
|
debug_log.uartLog.UART.RXD.$suggestSolution = "B10";
|
||||||
|
debug_log.uartLog.UART.TXD.$suggestSolution = "B11";
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2021 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
Board_deinit();
|
||||||
|
System_deinit();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM2434_ALX"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Release,
|
||||||
|
Debug,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM2434_ALX"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM243X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am243x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part ALX --package ALX
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test NORTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am243x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,148 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is disabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > MSRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* General purpose non cacheable memory, used in some examples */
|
||||||
|
.bss.nocache (NOLOAD) : {} > NON_CACHE_MEM
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
NOTE: Below memory is reserved for DMSC usage
|
||||||
|
- During Boot till security handoff is complete
|
||||||
|
0x701E0000 - 0x701FFFFF (128KB)
|
||||||
|
- After "Security Handoff" is complete (i.e at run time)
|
||||||
|
0x701F4000 - 0x701FFFFF (48KB)
|
||||||
|
|
||||||
|
Security handoff is complete when this message is sent to the DMSC,
|
||||||
|
TISCI_MSG_SEC_HANDOVER
|
||||||
|
|
||||||
|
This should be sent once all cores are loaded and all application
|
||||||
|
specific firewall calls are setup.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB0 : ORIGIN = 0x41010000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* memory segment used to hold CPU specific non-cached data, MAKE to add a MPU entry to mark this as non-cached */
|
||||||
|
NON_CACHE_MEM : ORIGIN = 0x70060000 , LENGTH = 0x8000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
MSRAM : ORIGIN = 0x70080000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
/* shared memory segments */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x180
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D0000 + 0x180, LENGTH = 0x00004000 - 0x180
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x0000C000
|
||||||
|
}
|
||||||
@ -0,0 +1,309 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
BOOTIMAGE_NAME_HS:=transforms_test.$(PROFILE).appimage.hs
|
||||||
|
BOOTIMAGE_NAME_HS_FS:=transforms_test.$(PROFILE).appimage.hs_fs
|
||||||
|
TARGETS := $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
TARGETS += $(BOOTIMAGE_NAME_HS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM243X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lnortos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
nortos.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am243x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am243x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am243x:r5fss0-0:nortos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(TARGETS)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am243x:r5fss0-0:nortos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am243x:r5fss0-0:nortos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am243x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am243x:r5fss0-0:nortos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part ALX --package ALX --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM243x_ALX_beta --context r5fss0-0 --part ALX --package ALX --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CERT_KEY=$(APP_SIGNING_KEY)
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS_FS)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS) Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME_HS): $(BOOTIMAGE_NAME)
|
||||||
|
ifeq ($(DEVICE_TYPE), HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME_HS)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 4
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 5
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 6
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 7
|
||||||
|
BOOTIMAGE_CORE_ID_m4fss0-0 = 14
|
||||||
|
SBL_RUN_ADDRESS=0x70000000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
APP_IMAGE_SIGN_CMD = $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/appimage_x509_cert_gen.py
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
# Sign the appimage for HS-FS using appimage signing script
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs_fs
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
# Sign the appimage using appimage signing script
|
||||||
|
ifeq ($(ENC_ENABLED),no)
|
||||||
|
@echo Boot image signing: Encryption is disabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
else
|
||||||
|
@echo Boot image signing: Encryption is enabled.
|
||||||
|
$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 1 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME).hs
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)-enc
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
ifeq ($(DEVICE_TYPE),HS)
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME).hs Done !!!
|
||||||
|
@echo .
|
||||||
|
else
|
||||||
|
@echo Boot image: am243x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME).hs_fs Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM263x@09.01.00"
|
||||||
|
* @versions {"tool":"1.14.0+2667"}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv76 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART0";
|
||||||
|
debug_log.uartLog.UART.$assign = "UART0";
|
||||||
|
debug_log.uartLog.UART.RXD.$assign = "ball.A7";
|
||||||
|
debug_log.uartLog.UART.TXD.$assign = "ball.A6";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x80000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x50D00000;
|
||||||
|
mpu_armv75.size = 14;
|
||||||
|
mpu_armv75.allowExecute = false;
|
||||||
|
mpu_armv75.attributes = "Device";
|
||||||
|
|
||||||
|
mpu_armv76.$name = "CONFIG_MPU_REGION5";
|
||||||
|
mpu_armv76.baseAddr = 0x72000000;
|
||||||
|
mpu_armv76.size = 14;
|
||||||
|
mpu_armv76.allowExecute = false;
|
||||||
|
mpu_armv76.attributes = "NonCached";
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2022 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <kernel/dpl/DebugP.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
|
#define MAIN_TASK_PRI (configMAX_PRIORITIES-1)
|
||||||
|
|
||||||
|
#define MAIN_TASK_SIZE (16384U/sizeof(configSTACK_DEPTH_TYPE))
|
||||||
|
StackType_t gMainTaskStack[MAIN_TASK_SIZE] __attribute__((aligned(32)));
|
||||||
|
|
||||||
|
StaticTask_t gMainTaskObj;
|
||||||
|
TaskHandle_t gMainTask;
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
void freertos_main(void *args)
|
||||||
|
{
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
vTaskDelete(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
/* init SOC specific modules */
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
/* This task is created at highest priority, it should create more tasks and then delete itself */
|
||||||
|
gMainTask = xTaskCreateStatic( freertos_main, /* Pointer to the function that implements the task. */
|
||||||
|
"freertos_main", /* Text name for the task. This is to facilitate debugging only. */
|
||||||
|
MAIN_TASK_SIZE, /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
|
||||||
|
NULL, /* We are not using the task parameter. */
|
||||||
|
MAIN_TASK_PRI, /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
|
||||||
|
gMainTaskStack, /* pointer to stack base */
|
||||||
|
&gMainTaskObj ); /* pointer to statically allocated task object memory */
|
||||||
|
configASSERT(gMainTask != NULL);
|
||||||
|
|
||||||
|
/* Start the scheduler to start the tasks executing. */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
|
||||||
|
/* The following line should never be reached because vTaskStartScheduler()
|
||||||
|
will only return if there was not enough FreeRTOS heap memory available to
|
||||||
|
create the Idle and (if configured) Timer tasks. Heap management, and
|
||||||
|
techniques for trapping heap exhaustion, are described in the book text. */
|
||||||
|
DebugP_assertNoLog(0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM263x"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Debug,
|
||||||
|
Release,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM263x"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am263x/r5f
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM263X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am263x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part AM263x --package ZCZ
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test FREERTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am263x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* this is used only when Secure IPC is enabled */
|
||||||
|
.bss.sipc_hsm_queue_mem (NOLOAD) : {} > MAILBOX_HSM
|
||||||
|
.bss.sipc_r5f_queue_mem (NOLOAD) : {} > MAILBOX_R5F
|
||||||
|
}
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB : ORIGIN = 0x00080000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
OCRAM : ORIGIN = 0x70040000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
|
||||||
|
/* shared memories that are used by RTOS/NORTOS cores */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x00004000
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x00004000
|
||||||
|
/* MSS mailbox memory is used as shared memory, we dont use bottom 32*12 bytes, since its used as SW queue by ipc_notify */
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x72000000, LENGTH = 0x3E80
|
||||||
|
MAILBOX_HSM: ORIGIN = 0x44000000 , LENGTH = 0x000003CE
|
||||||
|
MAILBOX_R5F: ORIGIN = 0x44000400 , LENGTH = 0x000003CE
|
||||||
|
}
|
||||||
@ -0,0 +1,283 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am263x/r5f \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM263X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lfreertos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
freertos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am263x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am263x:r5fss0-0:freertos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(BOOTIMAGE_NAME)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am263x:r5fss0-0:freertos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am263x:r5fss0-0:freertos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am263x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am263x:r5fss0-0:freertos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM263x_beta --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM263x@09.01.00"
|
||||||
|
* @versions {"tool":"1.14.0+2667"}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv76 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART0";
|
||||||
|
debug_log.uartLog.UART.$assign = "UART0";
|
||||||
|
debug_log.uartLog.UART.RXD.$assign = "ball.A7";
|
||||||
|
debug_log.uartLog.UART.TXD.$assign = "ball.A6";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x80000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x50D00000;
|
||||||
|
mpu_armv75.size = 14;
|
||||||
|
mpu_armv75.allowExecute = false;
|
||||||
|
mpu_armv75.attributes = "Device";
|
||||||
|
|
||||||
|
mpu_armv76.$name = "CONFIG_MPU_REGION5";
|
||||||
|
mpu_armv76.baseAddr = 0x72000000;
|
||||||
|
mpu_armv76.size = 14;
|
||||||
|
mpu_armv76.allowExecute = false;
|
||||||
|
mpu_armv76.attributes = "NonCached";
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2022 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
Board_deinit();
|
||||||
|
System_deinit();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM263x"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Debug,
|
||||||
|
Release,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM263x"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM263X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am263x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part AM263x --package ZCZ
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test NORTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am263x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* this is used only when Secure IPC is enabled */
|
||||||
|
.bss.sipc_hsm_queue_mem (NOLOAD) : {} > MAILBOX_HSM
|
||||||
|
.bss.sipc_r5f_queue_mem (NOLOAD) : {} > MAILBOX_R5F
|
||||||
|
}
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB : ORIGIN = 0x00080000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
OCRAM : ORIGIN = 0x70040000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
|
||||||
|
/* shared memories that are used by RTOS/NORTOS cores */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x00004000
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x00004000
|
||||||
|
/* MSS mailbox memory is used as shared memory, we dont use bottom 32*12 bytes, since its used as SW queue by ipc_notify */
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x72000000, LENGTH = 0x3E80
|
||||||
|
MAILBOX_HSM: ORIGIN = 0x44000000 , LENGTH = 0x000003CE
|
||||||
|
MAILBOX_R5F: ORIGIN = 0x44000400 , LENGTH = 0x000003CE
|
||||||
|
}
|
||||||
@ -0,0 +1,280 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM263X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lnortos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
nortos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am263x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am263x:r5fss0-0:nortos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(BOOTIMAGE_NAME)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am263x:r5fss0-0:nortos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am263x:r5fss0-0:nortos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am263x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am263x:r5fss0-0:nortos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM263x_beta --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM263x@09.01.00"
|
||||||
|
* @versions {"tool":"1.14.0+2667"}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv76 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART0";
|
||||||
|
debug_log.uartLog.UART.$assign = "UART0";
|
||||||
|
debug_log.uartLog.UART.RXD.$assign = "ball.A7";
|
||||||
|
debug_log.uartLog.UART.TXD.$assign = "ball.A6";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x80000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x50D00000;
|
||||||
|
mpu_armv75.size = 14;
|
||||||
|
mpu_armv75.allowExecute = false;
|
||||||
|
mpu_armv75.attributes = "Device";
|
||||||
|
|
||||||
|
mpu_armv76.$name = "CONFIG_MPU_REGION5";
|
||||||
|
mpu_armv76.baseAddr = 0x72000000;
|
||||||
|
mpu_armv76.size = 14;
|
||||||
|
mpu_armv76.allowExecute = false;
|
||||||
|
mpu_armv76.attributes = "NonCached";
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2022 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <kernel/dpl/DebugP.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
|
#define MAIN_TASK_PRI (configMAX_PRIORITIES-1)
|
||||||
|
|
||||||
|
#define MAIN_TASK_SIZE (16384U/sizeof(configSTACK_DEPTH_TYPE))
|
||||||
|
StackType_t gMainTaskStack[MAIN_TASK_SIZE] __attribute__((aligned(32)));
|
||||||
|
|
||||||
|
StaticTask_t gMainTaskObj;
|
||||||
|
TaskHandle_t gMainTask;
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
void freertos_main(void *args)
|
||||||
|
{
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
vTaskDelete(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
/* init SOC specific modules */
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
/* This task is created at highest priority, it should create more tasks and then delete itself */
|
||||||
|
gMainTask = xTaskCreateStatic( freertos_main, /* Pointer to the function that implements the task. */
|
||||||
|
"freertos_main", /* Text name for the task. This is to facilitate debugging only. */
|
||||||
|
MAIN_TASK_SIZE, /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
|
||||||
|
NULL, /* We are not using the task parameter. */
|
||||||
|
MAIN_TASK_PRI, /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
|
||||||
|
gMainTaskStack, /* pointer to stack base */
|
||||||
|
&gMainTaskObj ); /* pointer to statically allocated task object memory */
|
||||||
|
configASSERT(gMainTask != NULL);
|
||||||
|
|
||||||
|
/* Start the scheduler to start the tasks executing. */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
|
||||||
|
/* The following line should never be reached because vTaskStartScheduler()
|
||||||
|
will only return if there was not enough FreeRTOS heap memory available to
|
||||||
|
create the Idle and (if configured) Timer tasks. Heap management, and
|
||||||
|
techniques for trapping heap exhaustion, are described in the book text. */
|
||||||
|
DebugP_assertNoLog(0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM263x"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Debug,
|
||||||
|
Release,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM263x"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am263x/r5f
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM263X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am263x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part AM263x --package ZCZ
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test FREERTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lfreertos.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am263x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* this is used only when Secure IPC is enabled */
|
||||||
|
.bss.sipc_hsm_queue_mem (NOLOAD) : {} > MAILBOX_HSM
|
||||||
|
.bss.sipc_r5f_queue_mem (NOLOAD) : {} > MAILBOX_R5F
|
||||||
|
}
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB : ORIGIN = 0x00080000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
OCRAM : ORIGIN = 0x70040000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
|
||||||
|
/* shared memories that are used by RTOS/NORTOS cores */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x00004000
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x00004000
|
||||||
|
/* MSS mailbox memory is used as shared memory, we dont use bottom 32*12 bytes, since its used as SW queue by ipc_notify */
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x72000000, LENGTH = 0x3E80
|
||||||
|
MAILBOX_HSM: ORIGIN = 0x44000000 , LENGTH = 0x000003CE
|
||||||
|
MAILBOX_R5F: ORIGIN = 0x44000400 , LENGTH = 0x000003CE
|
||||||
|
}
|
||||||
@ -0,0 +1,283 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/FreeRTOS-Kernel/include \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/config/am263x/r5f \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM263X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lfreertos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
freertos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/freertos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am263x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am263x:r5fss0-0:freertos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(BOOTIMAGE_NAME)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am263x:r5fss0-0:freertos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am263x:r5fss0-0:freertos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am263x:r5fss0-0:freertos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am263x:r5fss0-0:freertos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM263x_beta --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
|
||||||
|
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
|
||||||
|
* @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MOTOR_CONTROL_SDK_AM263x@09.01.00"
|
||||||
|
* @versions {"tool":"1.14.0+2667"}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import the modules used in this configuration.
|
||||||
|
*/
|
||||||
|
const debug_log = scripting.addModule("/kernel/dpl/debug_log");
|
||||||
|
const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
|
||||||
|
const mpu_armv71 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv72 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv73 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv74 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv75 = mpu_armv7.addInstance();
|
||||||
|
const mpu_armv76 = mpu_armv7.addInstance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write custom configuration values to the imported modules.
|
||||||
|
*/
|
||||||
|
debug_log.enableUartLog = true;
|
||||||
|
debug_log.uartLog.$name = "CONFIG_UART0";
|
||||||
|
debug_log.uartLog.UART.$assign = "UART0";
|
||||||
|
debug_log.uartLog.UART.RXD.$assign = "ball.A7";
|
||||||
|
debug_log.uartLog.UART.TXD.$assign = "ball.A6";
|
||||||
|
|
||||||
|
mpu_armv71.$name = "CONFIG_MPU_REGION0";
|
||||||
|
mpu_armv71.size = 31;
|
||||||
|
mpu_armv71.attributes = "Device";
|
||||||
|
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv71.allowExecute = false;
|
||||||
|
|
||||||
|
mpu_armv72.$name = "CONFIG_MPU_REGION1";
|
||||||
|
mpu_armv72.size = 15;
|
||||||
|
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv73.$name = "CONFIG_MPU_REGION2";
|
||||||
|
mpu_armv73.baseAddr = 0x80000;
|
||||||
|
mpu_armv73.size = 15;
|
||||||
|
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
|
||||||
|
mpu_armv74.$name = "CONFIG_MPU_REGION3";
|
||||||
|
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
|
||||||
|
mpu_armv74.baseAddr = 0x70000000;
|
||||||
|
mpu_armv74.size = 21;
|
||||||
|
|
||||||
|
mpu_armv75.$name = "CONFIG_MPU_REGION4";
|
||||||
|
mpu_armv75.baseAddr = 0x50D00000;
|
||||||
|
mpu_armv75.size = 14;
|
||||||
|
mpu_armv75.allowExecute = false;
|
||||||
|
mpu_armv75.attributes = "Device";
|
||||||
|
|
||||||
|
mpu_armv76.$name = "CONFIG_MPU_REGION5";
|
||||||
|
mpu_armv76.baseAddr = 0x72000000;
|
||||||
|
mpu_armv76.size = 14;
|
||||||
|
mpu_armv76.allowExecute = false;
|
||||||
|
mpu_armv76.attributes = "NonCached";
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2022 Texas Instruments Incorporated
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_board_config.h"
|
||||||
|
|
||||||
|
void transforms_test_main(void *args);
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
System_init();
|
||||||
|
Board_init();
|
||||||
|
|
||||||
|
transforms_test_main(NULL);
|
||||||
|
|
||||||
|
Board_deinit();
|
||||||
|
System_deinit();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectSpec>
|
||||||
|
<applicability>
|
||||||
|
<when>
|
||||||
|
<context
|
||||||
|
deviceFamily="ARM"
|
||||||
|
deviceId="Cortex R.AM263x"
|
||||||
|
/>
|
||||||
|
</when>
|
||||||
|
</applicability>
|
||||||
|
|
||||||
|
<project
|
||||||
|
title="Transforms Test"
|
||||||
|
name = "transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang"
|
||||||
|
products="sysconfig;com.ti.MOTOR_CONTROL_SDK_AMXXX;"
|
||||||
|
configurations="
|
||||||
|
Debug,
|
||||||
|
Release,
|
||||||
|
"
|
||||||
|
connection="TIXDS110_Connection.xml"
|
||||||
|
toolChain="TICLANG"
|
||||||
|
cgtVersion="3.2.0"
|
||||||
|
device="Cortex R.AM263x"
|
||||||
|
deviceCore="MAIN_PULSAR_Cortex_R5_0_0"
|
||||||
|
ignoreDefaultDeviceSettings="true"
|
||||||
|
ignoreDefaultCCSSettings="true"
|
||||||
|
endianness="little"
|
||||||
|
outputFormat="ELF"
|
||||||
|
outputType="executable"
|
||||||
|
|
||||||
|
compilerBuildOptions="
|
||||||
|
-I${CG_TOOL_ROOT}/include/c
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig
|
||||||
|
-mcpu=cortex-r5
|
||||||
|
-mfloat-abi=hard
|
||||||
|
-mfpu=vfpv3-d16
|
||||||
|
-mthumb
|
||||||
|
-Wall
|
||||||
|
-Werror
|
||||||
|
-g
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end
|
||||||
|
-Wno-unused-function
|
||||||
|
-DSOC_AM263X
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib
|
||||||
|
-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib
|
||||||
|
-i${CG_TOOL_ROOT}/lib
|
||||||
|
-m=transforms_test.${ConfigName}.map
|
||||||
|
--diag_suppress=10063
|
||||||
|
--ram_model
|
||||||
|
--reread_libs
|
||||||
|
"
|
||||||
|
|
||||||
|
postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MOTOR_CONTROL_SDK_PATH=${MOTOR_CONTROL_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE} DEVICE=am263x"
|
||||||
|
|
||||||
|
enableSysConfigTool="true"
|
||||||
|
sysConfigBuildOptions="
|
||||||
|
--context r5fss0-0 --part AM263x --package ZCZ
|
||||||
|
"
|
||||||
|
|
||||||
|
description="A Transforms Test NORTOS project">
|
||||||
|
|
||||||
|
<configuration name="Release"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-Os
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.release.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<configuration name="Debug"
|
||||||
|
compilerBuildOptions="
|
||||||
|
-D_DEBUG_=1
|
||||||
|
"
|
||||||
|
linkerBuildOptions="
|
||||||
|
-lnortos.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.debug.lib
|
||||||
|
-llibc.a
|
||||||
|
-llibsysbm.a
|
||||||
|
"
|
||||||
|
></configuration>
|
||||||
|
<pathVariable name="MOTOR_CONTROL_SDK_PATH" path="${COM_TI_MOTOR_CONTROL_SDK_AMXXX_INSTALL_DIR}" scope="project" />
|
||||||
|
<file path="../../../transforms_test.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="${MOTOR_CONTROL_SDK_PATH}/docs/api_guide_am263x/EXAMPLES_TRANSFORMS_TEST.html"
|
||||||
|
openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
|
||||||
|
</file>
|
||||||
|
<file path="../../../transforms_test.h" openOnCreation="false" excludeFromBuild="true" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
<file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
|
||||||
|
</file>
|
||||||
|
</project>
|
||||||
|
</projectSpec>
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
|
||||||
|
/* This is the stack that is used by code running within main()
|
||||||
|
* In case of NORTOS,
|
||||||
|
* - This means all the code outside of ISR uses this stack
|
||||||
|
* In case of FreeRTOS
|
||||||
|
* - This means all the code until vTaskStartScheduler() is called in main()
|
||||||
|
* uses this stack.
|
||||||
|
* - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
|
||||||
|
*/
|
||||||
|
--stack_size=16384
|
||||||
|
/* This is the heap size for malloc() API in NORTOS and FreeRTOS
|
||||||
|
* This is also the heap used by pvPortMalloc in FreeRTOS
|
||||||
|
*/
|
||||||
|
--heap_size=32768
|
||||||
|
-e_vectors /* This is the entry of the application, _vector MUST be plabed starting address 0x0 */
|
||||||
|
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* In NORTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is the stack used by ISRs registered as type IRQ
|
||||||
|
* In FreeRTOS,
|
||||||
|
* - Here interrupt nesting is enabled
|
||||||
|
* - This is stack that is used initally when a IRQ is received
|
||||||
|
* - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
|
||||||
|
* - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
|
||||||
|
*/
|
||||||
|
__IRQ_STACK_SIZE = 256;
|
||||||
|
/* This is the size of stack when R5 is in IRQ mode
|
||||||
|
* - In both NORTOS and FreeRTOS nesting is disabled for FIQ
|
||||||
|
*/
|
||||||
|
__FIQ_STACK_SIZE = 256;
|
||||||
|
__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
|
||||||
|
__ABORT_STACK_SIZE = 256; /* This is the size of stack when R5 is in ABORT mode */
|
||||||
|
__UNDEFINED_STACK_SIZE = 256; /* This is the size of stack when R5 is in UNDEF mode */
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* This has the R5F entry point and vector table, this MUST be at 0x0 */
|
||||||
|
.vectors:{} palign(8) > R5F_VECS
|
||||||
|
|
||||||
|
/* This has the R5F boot code until MPU is enabled, this MUST be at a address < 0x80000000
|
||||||
|
* i.e this cannot be placed in DDR
|
||||||
|
*/
|
||||||
|
GROUP {
|
||||||
|
.text.hwi: palign(8)
|
||||||
|
.text.cache: palign(8)
|
||||||
|
.text.mpu: palign(8)
|
||||||
|
.text.boot: palign(8)
|
||||||
|
.text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of code. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.text: {} palign(8) /* This is where code resides */
|
||||||
|
.rodata: {} palign(8) /* This is where const's go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of initialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
|
||||||
|
.data: {} palign(8) /* This is where initialized globals and static go */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
|
||||||
|
GROUP {
|
||||||
|
.bss: {} palign(8) /* This is where uninitialized globals go */
|
||||||
|
RUN_START(__BSS_START)
|
||||||
|
RUN_END(__BSS_END)
|
||||||
|
.sysmem: {} palign(8) /* This is where the malloc heap goes */
|
||||||
|
.stack: {} palign(8) /* This is where the main() stack goes */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* This is where the stacks for different R5F modes go */
|
||||||
|
GROUP {
|
||||||
|
.irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__IRQ_STACK_START)
|
||||||
|
RUN_END(__IRQ_STACK_END)
|
||||||
|
.fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__FIQ_STACK_START)
|
||||||
|
RUN_END(__FIQ_STACK_END)
|
||||||
|
.svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__SVC_STACK_START)
|
||||||
|
RUN_END(__SVC_STACK_END)
|
||||||
|
.abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__ABORT_STACK_START)
|
||||||
|
RUN_END(__ABORT_STACK_END)
|
||||||
|
.undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
|
||||||
|
RUN_START(__UNDEFINED_STACK_START)
|
||||||
|
RUN_END(__UNDEFINED_STACK_END)
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* Sections needed for C++ projects */
|
||||||
|
GROUP {
|
||||||
|
.ARM.exidx: {} palign(8) /* Needed for C++ exception handling */
|
||||||
|
.init_array: {} palign(8) /* Contains function pointers called before main */
|
||||||
|
.fini_array: {} palign(8) /* Contains function pointers called after main */
|
||||||
|
} > OCRAM
|
||||||
|
|
||||||
|
/* General purpose user shared memory, used in some examples */
|
||||||
|
.bss.user_shared_mem (NOLOAD) : {} > USER_SHM_MEM
|
||||||
|
/* this is used when Debug log's to shared memory are enabled, else this is not used */
|
||||||
|
.bss.log_shared_mem (NOLOAD) : {} > LOG_SHM_MEM
|
||||||
|
/* this is used only when IPC RPMessage is enabled, else this is not used */
|
||||||
|
.bss.ipc_vring_mem (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
|
||||||
|
/* this is used only when Secure IPC is enabled */
|
||||||
|
.bss.sipc_hsm_queue_mem (NOLOAD) : {} > MAILBOX_HSM
|
||||||
|
.bss.sipc_r5f_queue_mem (NOLOAD) : {} > MAILBOX_R5F
|
||||||
|
}
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
R5F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000040
|
||||||
|
R5F_TCMA : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
|
||||||
|
R5F_TCMB : ORIGIN = 0x00080000 , LENGTH = 0x00008000
|
||||||
|
|
||||||
|
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
|
||||||
|
* this memory does not overlap with other R5F's
|
||||||
|
*/
|
||||||
|
OCRAM : ORIGIN = 0x70040000 , LENGTH = 0x40000
|
||||||
|
|
||||||
|
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
|
||||||
|
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
|
||||||
|
*/
|
||||||
|
FLASH : ORIGIN = 0x60100000 , LENGTH = 0x80000
|
||||||
|
|
||||||
|
|
||||||
|
/* shared memories that are used by RTOS/NORTOS cores */
|
||||||
|
/* On R5F,
|
||||||
|
* - make sure there is a MPU entry which maps below regions as non-cache
|
||||||
|
*/
|
||||||
|
USER_SHM_MEM : ORIGIN = 0x701D0000, LENGTH = 0x00004000
|
||||||
|
LOG_SHM_MEM : ORIGIN = 0x701D4000, LENGTH = 0x00004000
|
||||||
|
/* MSS mailbox memory is used as shared memory, we dont use bottom 32*12 bytes, since its used as SW queue by ipc_notify */
|
||||||
|
RTOS_NORTOS_IPC_SHM_MEM : ORIGIN = 0x72000000, LENGTH = 0x3E80
|
||||||
|
MAILBOX_HSM: ORIGIN = 0x44000000 , LENGTH = 0x000003CE
|
||||||
|
MAILBOX_R5F: ORIGIN = 0x44000400 , LENGTH = 0x000003CE
|
||||||
|
}
|
||||||
@ -0,0 +1,280 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
|
||||||
|
|
||||||
|
CC=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROFILE?=release
|
||||||
|
ConfigName:=$(PROFILE)
|
||||||
|
|
||||||
|
OUTNAME:=transforms_test.$(PROFILE).out
|
||||||
|
|
||||||
|
BOOTIMAGE_PATH=$(abspath .)
|
||||||
|
BOOTIMAGE_NAME:=transforms_test.$(PROFILE).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=transforms_test.$(PROFILE).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=transforms_test.$(PROFILE).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=transforms_test.$(PROFILE).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=transforms_test.$(PROFILE).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=transforms_test.$(PROFILE).rprc_tmp
|
||||||
|
|
||||||
|
FILES_common := \
|
||||||
|
transforms_test.c \
|
||||||
|
main.c \
|
||||||
|
ti_drivers_config.c \
|
||||||
|
ti_drivers_open_close.c \
|
||||||
|
ti_board_config.c \
|
||||||
|
ti_board_open_close.c \
|
||||||
|
ti_dpl_config.c \
|
||||||
|
ti_pinmux_config.c \
|
||||||
|
ti_power_clock_config.c \
|
||||||
|
|
||||||
|
FILES_PATH_common = \
|
||||||
|
.. \
|
||||||
|
../../.. \
|
||||||
|
generated \
|
||||||
|
|
||||||
|
INCLUDES_common := \
|
||||||
|
-I${CG_TOOL_ROOT}/include/c \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/clarke \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/park \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/ipark \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/source/transforms/svgen \
|
||||||
|
-I${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/trig \
|
||||||
|
-Igenerated \
|
||||||
|
|
||||||
|
DEFINES_common := \
|
||||||
|
-DSOC_AM263X \
|
||||||
|
|
||||||
|
CFLAGS_common := \
|
||||||
|
-mcpu=cortex-r5 \
|
||||||
|
-mfloat-abi=hard \
|
||||||
|
-mfpu=vfpv3-d16 \
|
||||||
|
-mthumb \
|
||||||
|
-Wall \
|
||||||
|
-Werror \
|
||||||
|
-g \
|
||||||
|
-Wno-gnu-variable-sized-type-not-at-end \
|
||||||
|
-Wno-unused-function \
|
||||||
|
|
||||||
|
CFLAGS_cpp_common := \
|
||||||
|
-Wno-c99-designator \
|
||||||
|
-Wno-extern-c-compat \
|
||||||
|
-Wno-c++11-narrowing \
|
||||||
|
-Wno-reorder-init-list \
|
||||||
|
-Wno-deprecated-register \
|
||||||
|
-Wno-writable-strings \
|
||||||
|
-Wno-enum-compare \
|
||||||
|
-Wno-reserved-user-defined-literal \
|
||||||
|
-Wno-unused-const-variable \
|
||||||
|
-x c++ \
|
||||||
|
|
||||||
|
CFLAGS_debug := \
|
||||||
|
-D_DEBUG_=1 \
|
||||||
|
|
||||||
|
CFLAGS_release := \
|
||||||
|
-Os \
|
||||||
|
|
||||||
|
LNK_FILES_common = \
|
||||||
|
linker.cmd \
|
||||||
|
|
||||||
|
LIBS_PATH_common = \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
-Wl,-i${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
-Wl,-i${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
LIBS_common = \
|
||||||
|
-lnortos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-ldrivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lboard.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-lmathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
-llibc.a \
|
||||||
|
-llibsysbm.a \
|
||||||
|
|
||||||
|
LFLAGS_common = \
|
||||||
|
-Wl,--diag_suppress=10063 \
|
||||||
|
-Wl,--ram_model \
|
||||||
|
-Wl,--reread_libs \
|
||||||
|
|
||||||
|
|
||||||
|
LIBS_NAME = \
|
||||||
|
nortos.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
drivers.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
board.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
mathlib.am263x.r5f.ti-arm-clang.${ConfigName}.lib \
|
||||||
|
libc.a \
|
||||||
|
libsysbm.a \
|
||||||
|
|
||||||
|
LIBS_PATH_NAME = \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/kernel/nortos/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/drivers/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/board/lib \
|
||||||
|
${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source/mathlib/lib \
|
||||||
|
${CG_TOOL_ROOT}/lib \
|
||||||
|
|
||||||
|
FILES := $(FILES_common) $(FILES_$(PROFILE))
|
||||||
|
ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
|
||||||
|
FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
|
||||||
|
CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
|
||||||
|
DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
|
||||||
|
INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
|
||||||
|
LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
|
||||||
|
LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
|
||||||
|
LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
|
||||||
|
LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
|
||||||
|
LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
|
||||||
|
|
||||||
|
OBJDIR := obj/$(PROFILE)/
|
||||||
|
OBJS := $(FILES:%.c=%.obj)
|
||||||
|
OBJS += $(ASMFILES:%.S=%.obj)
|
||||||
|
DEPS := $(FILES:%.c=%.d)
|
||||||
|
|
||||||
|
vpath %.obj $(OBJDIR)
|
||||||
|
vpath %.c $(FILES_PATH)
|
||||||
|
vpath %.S $(FILES_PATH)
|
||||||
|
vpath %.lib $(LIBS_PATH_NAME)
|
||||||
|
vpath %.a $(LIBS_PATH_NAME)
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.c
|
||||||
|
@echo Compiling: am263x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
$(OBJDIR)/%.obj %.obj: %.S
|
||||||
|
@echo Compiling: am263x:r5fss0-0:nortos:ti-arm-clang $(LIBNAME): $<
|
||||||
|
$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
|
||||||
|
|
||||||
|
all: $(BOOTIMAGE_NAME)
|
||||||
|
|
||||||
|
SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
|
||||||
|
SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
|
||||||
|
|
||||||
|
$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
|
||||||
|
@echo .
|
||||||
|
@echo Linking: am263x:r5fss0-0:nortos:ti-arm-clang $@ ...
|
||||||
|
$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
|
||||||
|
@echo Linking: am263x:r5fss0-0:nortos:ti-arm-clang $@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning: am263x:r5fss0-0:nortos:ti-arm-clang $(OUTNAME) ...
|
||||||
|
$(RMDIR) $(OBJDIR)
|
||||||
|
$(RM) $(OUTNAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_XIP)
|
||||||
|
$(RM) $(BOOTIMAGE_NAME_SIGNED)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
|
||||||
|
$(RMDIR) generated/
|
||||||
|
|
||||||
|
scrub:
|
||||||
|
@echo Scrubing: am263x:r5fss0-0:nortos:ti-arm-clang transforms_test ...
|
||||||
|
$(RMDIR) obj
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
$(RM) \*.out
|
||||||
|
$(RM) \*.map
|
||||||
|
$(RM) \*.appimage*
|
||||||
|
$(RM) \*.rprc*
|
||||||
|
$(RM) \*.tiimage*
|
||||||
|
$(RM) \*.bin
|
||||||
|
else
|
||||||
|
$(RM) *.out
|
||||||
|
$(RM) *.map
|
||||||
|
$(RM) *.appimage*
|
||||||
|
$(RM) *.rprc*
|
||||||
|
$(RM) *.tiimage*
|
||||||
|
$(RM) *.bin
|
||||||
|
endif
|
||||||
|
$(RMDIR) generated
|
||||||
|
|
||||||
|
$(OBJS): | $(OBJDIR)
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
$(MKDIR) $@
|
||||||
|
|
||||||
|
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
.INTERMEDIATE: syscfg
|
||||||
|
$(SYSCFG_GEN_FILES): syscfg
|
||||||
|
|
||||||
|
syscfg: ../example.syscfg
|
||||||
|
@echo Generating SysConfig files ...
|
||||||
|
$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
syscfg-gui:
|
||||||
|
$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM263x_beta --context r5fss0-0 --part AM263x --package ZCZ --output generated/ ../example.syscfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(SYSCFG_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
$(BOOTIMAGE_NAME): $(OUTNAME)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
|
||||||
|
ifneq ($(OS),Windows_NT)
|
||||||
|
$(CHMOD) a+x $(XIPGEN_CMD)
|
||||||
|
endif
|
||||||
|
$(OUTRPRC_CMD) $(OUTNAME) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
|
||||||
|
@echo .
|
||||||
|
|
||||||
|
-include $(addprefix $(OBJDIR)/, $(DEPS))
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# Below variables need to be defined outside this file or via command line
|
||||||
|
# - MOTOR_CONTROL_SDK_PATH
|
||||||
|
# - PROFILE
|
||||||
|
# - CG_TOOL_ROOT
|
||||||
|
# - OUTNAME
|
||||||
|
# - CCS_INSTALL_DIR
|
||||||
|
# - CCS_IDE_MODE
|
||||||
|
|
||||||
|
CCS_PATH=$(CCS_INSTALL_DIR)
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/imports.mak
|
||||||
|
include ${MOTOR_CONTROL_SDK_PATH}/devconfig/devconfig.mak
|
||||||
|
|
||||||
|
STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
|
||||||
|
OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
PYTHON=python
|
||||||
|
else
|
||||||
|
PYTHON=python3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OUTFILE=$(PROFILE)/$(OUTNAME).out
|
||||||
|
BOOTIMAGE_PATH=$(abspath ${PROFILE})
|
||||||
|
BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
|
||||||
|
BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
|
||||||
|
BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
|
||||||
|
BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
|
||||||
|
BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
|
||||||
|
BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
|
||||||
|
#
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
EXE_EXT=.exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.ps1
|
||||||
|
else
|
||||||
|
BOOTIMAGE_CERT_GEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/signing/x509CertificateGen.sh
|
||||||
|
endif
|
||||||
|
BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
|
||||||
|
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-0 = 0
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss0-1 = 1
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-0 = 2
|
||||||
|
BOOTIMAGE_CORE_ID_r5fss1-1 = 3
|
||||||
|
SBL_RUN_ADDRESS=0x70002000
|
||||||
|
SBL_DEV_ID=55
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/multicoreImageGen/multicoreImageGen.js
|
||||||
|
OUTRPRC_CMD = $(CCS_NODE) $(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/out2rprc/elf2rprc.js
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.exe
|
||||||
|
else
|
||||||
|
XIPGEN_CMD=$(MOTOR_CONTROL_SDK_PATH)/mcu_plus_sdk/tools/boot/xipGen/xipGen.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
MULTI_CORE_IMAGE_PARAMS_XIP = \
|
||||||
|
$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_r5fss0-0) \
|
||||||
|
|
||||||
|
all:
|
||||||
|
ifeq ($(CCS_IDE_MODE),cloud)
|
||||||
|
# No post build steps
|
||||||
|
else
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) ...
|
||||||
|
$(OUTRPRC_CMD) $(OUTFILE) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME)
|
||||||
|
$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
|
||||||
|
$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
|
||||||
|
@echo Boot image: am263x:r5fss0-0:nortos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
|
||||||
|
@echo .
|
||||||
|
endif
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Auto generated makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
export MOTOR_CONTROL_SDK_PATH?=$(abspath ../../../../../..)
|
||||||
|
include $(MOTOR_CONTROL_SDK_PATH)/imports.mak
|
||||||
|
|
||||||
|
PROFILE?=Release
|
||||||
|
|
||||||
|
PROJECT_NAME=transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
|
||||||
|
|
||||||
|
export:
|
||||||
|
$(MKDIR) $(MOTOR_CONTROL_SDK_PATH)/ccs_projects
|
||||||
|
$(CCS_ECLIPSE) -noSplash -data $(MOTOR_CONTROL_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* ======== syscfg_c.rov.xs ========
|
||||||
|
* This file contains the information needed by the Runtime Object
|
||||||
|
* View (ROV) tool.
|
||||||
|
*/
|
||||||
|
var crovFiles = [
|
||||||
|
"mcu_plus_sdk/kernel/freertos/rov/FreeRTOS.rov.js",
|
||||||
|
];
|
||||||
90
examples/transforms/transforms_test/transforms_test.c
Normal file
90
examples/transforms/transforms_test/transforms_test.c
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* * Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "transforms_test.h"
|
||||||
|
|
||||||
|
int verify_output(int test_num,\
|
||||||
|
float32_t* alphaBetaCurrent, float32_t* dqCurrent, float32_t* alphaBetaVoltage, float32_t* abcOutput)
|
||||||
|
{
|
||||||
|
// Compares park output with expected park output
|
||||||
|
bool is_park_erroneous = is_different(testParams[test_num].refAlpha, dqCurrent[0]) || is_different(testParams[test_num].refBeta, dqCurrent[1]);
|
||||||
|
|
||||||
|
// Compares svgen output with expected svgen output
|
||||||
|
bool is_svgen_erroneous = is_different(testParams[test_num].refA, abcOutput[0]) || is_different(testParams[test_num].refB, abcOutput[1]) || is_different(testParams[test_num].refC, abcOutput[2]);
|
||||||
|
|
||||||
|
// Compares output make sure that running park then ipark would revert all the changes
|
||||||
|
bool is_park_ipark_erroneous = is_different(alphaBetaCurrent[0], alphaBetaVoltage[0]) || is_different(alphaBetaCurrent[1], alphaBetaVoltage[1]);
|
||||||
|
|
||||||
|
if (is_park_erroneous || is_svgen_erroneous || is_park_ipark_erroneous)
|
||||||
|
{
|
||||||
|
DebugP_log("Test case %d (zero-indexed) produced error:\n",test_num);
|
||||||
|
if(is_park_erroneous)\
|
||||||
|
DebugP_log("Incorrect park value, the resultant is %f %f, but the expected is %f %f\n",dqCurrent[0],dqCurrent[1], testParams[test_num].refAlpha, testParams[test_num].refBeta);
|
||||||
|
if(is_svgen_erroneous)\
|
||||||
|
DebugP_log("Incorrect svgen value, the resultant is %f %f %f, but the expected is %f %f %f\n", abcOutput[0], abcOutput[1], abcOutput[2], testParams[test_num].refA, testParams[test_num].refB, testParams[test_num].refC);
|
||||||
|
if(is_park_ipark_erroneous)\
|
||||||
|
DebugP_log("Incorrect value, the original clarke value is %f %f, but the value after park-ipark is %f %f, before and after value should be the same\n", alphaBetaCurrent[0], alphaBetaCurrent[1], alphaBetaVoltage[0], alphaBetaVoltage[1]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void transforms_test_main()
|
||||||
|
{
|
||||||
|
int testSize = sizeof(testParams)/sizeof(*testParams);
|
||||||
|
int error = 0;
|
||||||
|
|
||||||
|
|
||||||
|
for (int idx = 0; idx < testSize; idx++)
|
||||||
|
{
|
||||||
|
float32_t abcOutput[3], abcInput[3] = {testParams[idx].inA,testParams[idx].inB,testParams[idx].inC};
|
||||||
|
float32_t alphaBetaI[2], dqI[2], alphaBetaV[2];
|
||||||
|
|
||||||
|
float32_t sincosVal[2];
|
||||||
|
ti_arm_sincos(phasorOffset, &sincosVal[0]);
|
||||||
|
|
||||||
|
CLARKE_run_threeInput(abcInput[0], abcInput[1], abcInput[2], &alphaBetaI[0], &alphaBetaI[1]);
|
||||||
|
PARK_run(sincosVal[0], sincosVal[1], alphaBetaI[0], alphaBetaI[1], &dqI[0], &dqI[1]);
|
||||||
|
IPARK_run(sincosVal[0], sincosVal[1], dqI[0], dqI[1], &alphaBetaV[0], &alphaBetaV[1]);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Using common mode for SVM modulation, functions for DPWM min/max modulation are also provided
|
||||||
|
//
|
||||||
|
SVGEN_runCom(1.0f, alphaBetaV[0], alphaBetaV[1], &abcOutput[0], &abcOutput[1], &abcOutput[2]);
|
||||||
|
|
||||||
|
error += verify_output(idx, &alphaBetaI[0], &dqI[0], &alphaBetaV[0], &abcOutput[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugP_log("Transforms test produced %d error",error);
|
||||||
|
|
||||||
|
}
|
||||||
164
examples/transforms/transforms_test/transforms_test.h
Normal file
164
examples/transforms/transforms_test/transforms_test.h
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* * Neither the name of Texas Instruments Incorporated nor the names of
|
||||||
|
* its contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TRANSFORMS_TEST
|
||||||
|
#define TRANSFORMS_TEST
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <kernel/dpl/DebugP.h>
|
||||||
|
#include "ti_drivers_config.h"
|
||||||
|
#include "ti_drivers_open_close.h"
|
||||||
|
#include "ti_board_open_close.h"
|
||||||
|
|
||||||
|
#include "ti_arm_trig.h"
|
||||||
|
#include "clarke.h"
|
||||||
|
#include "park.h"
|
||||||
|
#include "ipark.h"
|
||||||
|
#include "svgen.h"
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
/* Provided Input */
|
||||||
|
float32_t inA;
|
||||||
|
float32_t inB;
|
||||||
|
float32_t inC;
|
||||||
|
/* Reference Output */
|
||||||
|
float32_t refAlpha; // expected value for PARK output
|
||||||
|
float32_t refBeta; // expected value for PARK output
|
||||||
|
float32_t refA; // expected value for SVGEN output
|
||||||
|
float32_t refB; // expected value for SVGEN output
|
||||||
|
float32_t refC; // expected value for SVGEN output
|
||||||
|
} transform_test_t;
|
||||||
|
|
||||||
|
#define ERROR_TOL 1e-05f
|
||||||
|
#define exceeds_tolerance(x) x > ERROR_TOL
|
||||||
|
#define is_different(x,y) exceeds_tolerance(fabsf(x - y))
|
||||||
|
|
||||||
|
static float32_t phasorOffset = M_PI_2;
|
||||||
|
|
||||||
|
static transform_test_t testParams[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
1.0f, -0.5f,-0.5f,
|
||||||
|
-0.0f, -1.0f,
|
||||||
|
0.75f, -0.75f, -0.75f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.75f, -0.158494f, -0.591506f,
|
||||||
|
0.250000f, -0.750000f,
|
||||||
|
0.670753f, -0.237741f, -0.670753f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.5f, 0.183013,-0.683013,
|
||||||
|
0.5f, -0.5f,
|
||||||
|
0.591506f, 0.274520f, -0.591506f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.25f,0.524519f,-0.774519f,
|
||||||
|
0.75f, -0.25f,
|
||||||
|
0.375f, 0.649519f, -0.649519f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.0f,0.866025f,-0.866025f,
|
||||||
|
1.0f, 0.0f,
|
||||||
|
0.0f, 0.866025f, -0.866025f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-0.25f,0.774519f,-0.524519f,
|
||||||
|
0.75f, 0.25f,
|
||||||
|
-0.375000f, 0.649519f, -0.649519f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-0.5f,0.683013f,-0.183013f,
|
||||||
|
0.5f, 0.5f,
|
||||||
|
-0.591506f, 0.591506f, -0.274519f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-0.75f,0.591506f,0.158494f,
|
||||||
|
0.25f, 0.75f,
|
||||||
|
-0.670753f, 0.670753f, 0.237741f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-1.0f,0.5f,0.5f,
|
||||||
|
0.0f, 1.0f,
|
||||||
|
-0.75f, 0.75f, 0.75f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-0.75f,0.591506f,0.158494f,
|
||||||
|
0.25f,0.75f,
|
||||||
|
-0.670753f, 0.670753f, 0.237741f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-0.500000f, 0.683013f, -0.183013f,
|
||||||
|
0.5f,0.5f,
|
||||||
|
-0.591506f, 0.591506f, -0.274519f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-0.250000f, -0.524519f, 0.774519f,
|
||||||
|
-0.75f,0.25f,
|
||||||
|
-0.375000f, -0.649519f, 0.649519f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.000000f, -0.866025f, 0.866025f,
|
||||||
|
-1.0f,0.0f,
|
||||||
|
0.0f, -0.866025f, 0.866025f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.250000f, -0.774519f, 0.524519f,
|
||||||
|
-0.75f,-0.25f,
|
||||||
|
0.375f, -0.649519, 0.649519f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.500000f, -0.683013f, 0.183013f,
|
||||||
|
-0.5f,-0.5f,
|
||||||
|
0.591506f, -0.591506f, 0.274519f
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0.750000f, -0.591506f, -0.158494f,
|
||||||
|
-0.25f,-0.75f,
|
||||||
|
0.670753f, -0.670753f, -0.237741f
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif // extern "C"
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -58,6 +58,10 @@ help:
|
|||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-evm/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-evm/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/multi_channel_load_share/am243x-evm/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/multi_channel_load_share/am243x-evm/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@ -229,6 +233,10 @@ BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am243x-evm_r5fss0-0_nortos_ti-arm-clang
|
|||||||
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang
|
||||||
@ -303,6 +311,18 @@ examples-private: $(BUILD_COMBO_EXAMPLE_PRIVATE_ALL)
|
|||||||
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang:
|
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang:
|
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang:
|
||||||
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
@ -434,6 +454,10 @@ BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am243x-evm_r5fss0-0_nortos_ti-arm-clang_
|
|||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
@ -508,6 +532,18 @@ examples-private-clean: $(BUILD_COMBO_EXAMPLE_PRIVATE_CLEAN_ALL)
|
|||||||
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean:
|
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
@ -639,6 +675,10 @@ BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am243x-evm_r5fss0-0_nortos_ti-arm-clang_
|
|||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
@ -713,6 +753,18 @@ examples-scrub-private: $(BUILD_COMBO_EXAMPLE_PRIVATE_SCRUB_ALL)
|
|||||||
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub:
|
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
|||||||
@ -48,6 +48,10 @@ help:
|
|||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-cc/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-cc/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
@echo $(MAKE) -s -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
|
||||||
@echo .
|
@echo .
|
||||||
@echo System Example build targets,
|
@echo System Example build targets,
|
||||||
@ -120,6 +124,10 @@ BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am263x-cc_r5fss0-0_nortos_ti-arm-clang
|
|||||||
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang
|
||||||
|
BUILD_COMBO_EXAMPLE_ALL += transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
BUILD_COMBO_EXAMPLE_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang
|
BUILD_COMBO_EXAMPLE_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang
|
||||||
# Various System Example Targets
|
# Various System Example Targets
|
||||||
|
|
||||||
@ -155,6 +163,18 @@ examples-private: $(BUILD_COMBO_EXAMPLE_PRIVATE_ALL)
|
|||||||
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang:
|
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang:
|
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang:
|
||||||
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile all
|
||||||
|
|
||||||
@ -169,6 +189,10 @@ BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am263x-cc_r5fss0-0_nortos_ti-arm-clang_c
|
|||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_CLEAN_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_CLEAN_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
# Various System Example Clean Targets
|
# Various System Example Clean Targets
|
||||||
|
|
||||||
@ -204,6 +228,18 @@ examples-private-clean: $(BUILD_COMBO_EXAMPLE_PRIVATE_CLEAN_ALL)
|
|||||||
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile clean
|
||||||
|
|
||||||
@ -218,6 +254,10 @@ BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am263x-cc_r5fss0-0_nortos_ti-arm-clang_s
|
|||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_scrub
|
||||||
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
BUILD_COMBO_EXAMPLE_SCRUB_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
BUILD_COMBO_EXAMPLE_SCRUB_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub
|
||||||
# Various System Example Scrub Targets
|
# Various System Example Scrub Targets
|
||||||
|
|
||||||
@ -253,6 +293,18 @@ examples-scrub-private: $(BUILD_COMBO_EXAMPLE_PRIVATE_SCRUB_ALL)
|
|||||||
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_scrub:
|
||||||
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile scrub
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,10 @@ BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am243x-evm_r5fss0-0_nortos_t
|
|||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
@ -89,6 +93,18 @@ all-private: $(BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_PRIVATE_ALL)
|
|||||||
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build:
|
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
@ -221,6 +237,10 @@ BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am243x-evm_r5fss0-0_nortos_t
|
|||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
@ -295,6 +315,18 @@ clean-private: $(BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_PRIVATE_ALL)
|
|||||||
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean:
|
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
@ -427,6 +459,10 @@ BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am243x-evm_r5fss0-0_nortos_
|
|||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am243x-lp_r5fss0-0_nortos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += endat_diagnostic_single_channel_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += endat_diagnostic_multi_channel_load_share_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
@ -501,6 +537,18 @@ export-private: $(BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_PRIVATE_ALL)
|
|||||||
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
dcl_pi_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
$(MAKE) -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_nortos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_nortos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am243x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export:
|
endat_diagnostic_single_channel_am243x-evm_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
$(MAKE) -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
@ -658,6 +706,10 @@ help:
|
|||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/single_channel/am243x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/multi_channel_load_share/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/position_sense/endat_diagnostic/multi_channel_load_share/am243x-evm/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
|||||||
@ -12,6 +12,10 @@ BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am263x-cc_r5fss0-0_nortos_ti
|
|||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_build
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build
|
||||||
# Various System Example Projectspec Build Targets
|
# Various System Example Projectspec Build Targets
|
||||||
|
|
||||||
@ -47,6 +51,18 @@ all-private: $(BUILD_COMBO_EXAMPLE_PROJECTSPEC_BUILD_PRIVATE_ALL)
|
|||||||
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_build:
|
||||||
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec all
|
||||||
|
|
||||||
@ -62,6 +78,10 @@ BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am263x-cc_r5fss0-0_nortos_ti
|
|||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean
|
||||||
# Various System Example Projectspec Clean Targets
|
# Various System Example Projectspec Clean Targets
|
||||||
|
|
||||||
@ -97,6 +117,18 @@ clean-private: $(BUILD_COMBO_EXAMPLE_PROJECTSPEC_CLEAN_PRIVATE_ALL)
|
|||||||
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_clean:
|
||||||
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec clean
|
||||||
|
|
||||||
@ -112,6 +144,10 @@ BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am263x-cc_r5fss0-0_nortos_t
|
|||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am263x-cc_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am263x-lp_r5fss0-0_nortos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_export
|
||||||
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_ALL += tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export
|
||||||
# Various System Example Projectspec Export Targets
|
# Various System Example Projectspec Export Targets
|
||||||
|
|
||||||
@ -147,6 +183,18 @@ export-private: $(BUILD_COMBO_EXAMPLE_PROJECTSPEC_EXPORT_PRIVATE_ALL)
|
|||||||
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
dcl_pi_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
$(MAKE) -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_nortos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am263x-cc_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_nortos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
|
transforms_test_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
|
$(MAKE) -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
tamagawa_diagnostic_soc_uart_am263x-lp_r5fss0-0_freertos_ti-arm-clang_export:
|
||||||
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
$(MAKE) -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec export
|
||||||
|
|
||||||
@ -178,6 +226,10 @@ help:
|
|||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/dcl/dcl_pi/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-cc/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_nortos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
|
@echo $(MAKE) -s -C examples/transforms/transforms_test/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo $(MAKE) -s -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
@echo $(MAKE) -s -C examples/position_sense/tamagawa_diagnostic_over_soc_uart/am263x-lp/r5fss0-0_freertos/ti-arm-clang -f makefile_projectspec [export all clean]
|
||||||
@echo .
|
@echo .
|
||||||
@echo System Example ProjectSpec build targets,
|
@echo System Example ProjectSpec build targets,
|
||||||
|
|||||||
@ -99,4 +99,4 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
#endif // extern "C"
|
#endif // extern "C"
|
||||||
|
|
||||||
#endif // _DCL_AUX_H_
|
#endif // _DCL_AUX_H_
|
||||||
|
|||||||
@ -56,7 +56,7 @@ extern "C" {
|
|||||||
//!
|
//!
|
||||||
typedef struct dcl_css {
|
typedef struct dcl_css {
|
||||||
float32_t tpt; //!< Test point
|
float32_t tpt; //!< Test point
|
||||||
float32_t t_sec; //!< Controller period in seconds
|
float32_t T; //!< Controller period in seconds
|
||||||
volatile uint32_t sts; //!< Status word
|
volatile uint32_t sts; //!< Status word
|
||||||
uint32_t err_line; //!< Error location line (errno)
|
uint32_t err_line; //!< Error location line (errno)
|
||||||
uint32_t err; //!< Error status code
|
uint32_t err; //!< Error status code
|
||||||
@ -71,7 +71,7 @@ typedef struct dcl_css {
|
|||||||
//!
|
//!
|
||||||
typedef struct dcl_css64 {
|
typedef struct dcl_css64 {
|
||||||
float64_t tpt; //!< Test point
|
float64_t tpt; //!< Test point
|
||||||
float64_t t_sec; //!< Controller period in seconds
|
float64_t T; //!< Controller period in seconds
|
||||||
volatile uint32_t sts; //!< Status word
|
volatile uint32_t sts; //!< Status word
|
||||||
uint32_t err_line; //!< Error location line (errno)
|
uint32_t err_line; //!< Error location line (errno)
|
||||||
uint32_t err; //!< Error status code
|
uint32_t err; //!< Error status code
|
||||||
@ -85,11 +85,11 @@ typedef struct dcl_css64 {
|
|||||||
//! \brief Loads the controller period in the CSS
|
//! \brief Loads the controller period in the CSS
|
||||||
//! CSS pointer must be configured first
|
//! CSS pointer must be configured first
|
||||||
//!
|
//!
|
||||||
//! \param[in] p Pointer to the controller structure
|
//! \param[in] p Pointer to the controller structure
|
||||||
//! \param[in] T Sample period in seconds
|
//! \param[in] t_sec Controller period in seconds
|
||||||
//! \return None
|
//! \return None
|
||||||
//!
|
//!
|
||||||
#define DCL_setControllerPeriod(p,T) ((p)->css->t_sec = T)
|
#define DCL_setControllerPeriod(p,t_sec) ((p)->css->T = t_sec)
|
||||||
|
|
||||||
//--- Status word ------------------------------------------------------------
|
//--- Status word ------------------------------------------------------------
|
||||||
|
|
||||||
@ -107,7 +107,6 @@ typedef enum
|
|||||||
{
|
{
|
||||||
dcl_sts_none = 0U, //!< Status empty
|
dcl_sts_none = 0U, //!< Status empty
|
||||||
dcl_sts_param_update = (1U << 0), //!< Parameter update-in-progress flag, high if ongoing parameter update
|
dcl_sts_param_update = (1U << 0), //!< Parameter update-in-progress flag, high if ongoing parameter update
|
||||||
dcl_sts_param_pending = (1U << 2), //!< Parameter pending-for-update flag, high if parameter needs to be updated
|
|
||||||
dcl_sts_ctrl_running = (1U << 1) //!< Controller operation-in-progress flag, high if operation is in progress
|
dcl_sts_ctrl_running = (1U << 1) //!< Controller operation-in-progress flag, high if operation is in progress
|
||||||
} dcl_status_bits;
|
} dcl_status_bits;
|
||||||
|
|
||||||
@ -123,11 +122,6 @@ typedef enum
|
|||||||
#define DCL_getUpdateStatus(p) (0U != ((p)->css->sts & dcl_sts_param_update))
|
#define DCL_getUpdateStatus(p) (0U != ((p)->css->sts & dcl_sts_param_update))
|
||||||
|
|
||||||
|
|
||||||
//! \brief Macros to set and clear the pending-for-update flag
|
|
||||||
//!
|
|
||||||
#define DCL_setPendingStatus(p) ((p)->css->sts |= dcl_sts_param_pending)
|
|
||||||
#define DCL_clearPendingStatus(p) ((p)->css->sts &= ~dcl_sts_param_pending)
|
|
||||||
|
|
||||||
//! \brief Determine whether a parameter pending-for-update flag is set
|
//! \brief Determine whether a parameter pending-for-update flag is set
|
||||||
//!
|
//!
|
||||||
//! \return 'true' if pending status is set, otherwise false
|
//! \return 'true' if pending status is set, otherwise false
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
* from this software without specific prior written permission.
|
* from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPgResS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
@ -49,8 +49,8 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//! \brief Library version number formatted for numerical comparison
|
//! \brief Library version number formatted for numerical comparison
|
||||||
//! v4.00.00.00
|
//! v4.00.01.00
|
||||||
#define DCL_VERSION 4000000
|
#define DCL_VERSION 4000100
|
||||||
|
|
||||||
//! \brief Enable voltaile flag for dcl strcutures
|
//! \brief Enable voltaile flag for dcl strcutures
|
||||||
//! Only enable the flag if the controller can
|
//! Only enable the flag if the controller can
|
||||||
@ -73,7 +73,7 @@ extern "C" {
|
|||||||
#include "misc/dcl_fdlog.h"
|
#include "misc/dcl_fdlog.h"
|
||||||
#include "misc/dcl_error.h"
|
#include "misc/dcl_error.h"
|
||||||
|
|
||||||
/* 32bit arthmetic */
|
/* 32bit arithmetic */
|
||||||
#include "pi/dcl_pi.h"
|
#include "pi/dcl_pi.h"
|
||||||
#include "pi/dcl_pi2.h"
|
#include "pi/dcl_pi2.h"
|
||||||
#include "pid/dcl_pid.h"
|
#include "pid/dcl_pid.h"
|
||||||
@ -83,7 +83,7 @@ extern "C" {
|
|||||||
#include "df/dcl_df22.h"
|
#include "df/dcl_df22.h"
|
||||||
#include "df/dcl_df23.h"
|
#include "df/dcl_df23.h"
|
||||||
|
|
||||||
/* 64bit arthmetic */
|
/* 64bit arithmetic */
|
||||||
#include "pid/dcl_pidf64.h"
|
#include "pid/dcl_pidf64.h"
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
* from this software without specific prior written permission.
|
* from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPgResS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
@ -45,6 +45,9 @@ extern "C" {
|
|||||||
* \brief Top level header that contains all DCL common strctures and functions
|
* \brief Top level header that contains all DCL common strctures and functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
//! \brief Defines single,double precision data type.
|
//! \brief Defines single,double precision data type.
|
||||||
//! Note: Assumes ABI to be __TI_EABI__,
|
//! Note: Assumes ABI to be __TI_EABI__,
|
||||||
//! does not support legacy __TI_COFF__.
|
//! does not support legacy __TI_COFF__.
|
||||||
@ -56,7 +59,7 @@ typedef double float64_t;
|
|||||||
|
|
||||||
//! \brief Defines dcl function section that users can specify in the linker file(.cmd)
|
//! \brief Defines dcl function section that users can specify in the linker file(.cmd)
|
||||||
//! and to accelerate performance by mapping to faster memory
|
//! and to accelerate performance by mapping to faster memory
|
||||||
//! Note: only DCL_runXXX and DCL_updateXXX/pendingUpdateXXX are included by default
|
//! Note: only DCL_run and DCL_update are included by default
|
||||||
#define _DCL_CODE_SECTION __attribute__((section("dclfuncs")))
|
#define _DCL_CODE_SECTION __attribute__((section("dclfuncs")))
|
||||||
|
|
||||||
//! \brief Defines volatile for DCL strctures
|
//! \brief Defines volatile for DCL strctures
|
||||||
@ -97,8 +100,6 @@ typedef double float64_t;
|
|||||||
#warning "DCL currently doesn't support interrupt operations for this architecture"
|
#warning "DCL currently doesn't support interrupt operations for this architecture"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "common/dcl_aux.h"
|
#include "common/dcl_aux.h"
|
||||||
#include "common/dcl_css.h"
|
#include "common/dcl_css.h"
|
||||||
#include "common/dcl_zpk3.h"
|
#include "common/dcl_zpk3.h"
|
||||||
|
|||||||
@ -140,77 +140,59 @@ typedef _DCL_VOLATILE struct dcl_df11
|
|||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_resetDF11(DCL_DF11 *df)
|
void DCL_resetDF11(DCL_DF11 *df)
|
||||||
{
|
{
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
dcl_interrupt_t ints;
|
||||||
|
ints = DCL_disableInts();
|
||||||
df->d1 = df->d2 = 0.0f;
|
df->d1 = df->d2 = 0.0f;
|
||||||
DCL_restoreInts(ints);
|
DCL_restoreInts(ints);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads DF11 tuning parameter from its SPS parameter
|
//! \brief Loads DF11 tuning parameter from its SPS parameter without interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the active DCL_DF11 controller structure
|
//! \param[in] df Pointer to the active DCL_DF11 controller structure
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_fupdateDF11(DCL_DF11 *df)
|
void DCL_forceUpdateDF11(DCL_DF11 *df)
|
||||||
{
|
{
|
||||||
df->b0 = df->sps->b0;
|
df->b0 = df->sps->b0;
|
||||||
df->b1 = df->sps->b1;
|
df->b1 = df->sps->b1;
|
||||||
df->a1 = df->sps->a1;
|
df->a1 = df->sps->a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Updates DF11 parameter from its SPS parameter with interrupt protection
|
//! \brief Loads DF11 tuning parameter from its SPS parameter with interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
||||||
//! \return 'true' if update is successful, otherwise 'false'
|
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_updateDF11(DCL_DF11 *df)
|
void DCL_updateDF11NoCheck(DCL_DF11 *df)
|
||||||
{
|
{
|
||||||
if (!DCL_getUpdateStatus(df))
|
dcl_interrupt_t ints;
|
||||||
{
|
ints = DCL_disableInts();
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
df->b0 = df->sps->b0;
|
||||||
DCL_setUpdateStatus(df);
|
df->b1 = df->sps->b1;
|
||||||
df->b0 = df->sps->b0;
|
df->a1 = df->sps->a1;
|
||||||
df->b1 = df->sps->b1;
|
DCL_restoreInts(ints);
|
||||||
df->a1 = df->sps->a1;
|
|
||||||
DCL_clearUpdateStatus(df);
|
|
||||||
DCL_restoreInts(ints);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief A conditional update based on the pending-for-update flag.
|
//! \brief A conditional update based on the update flag.
|
||||||
//! If the pending status is set, the function will update DF11
|
//! If the update status is set, the function will update DF11
|
||||||
//! parameter from its SPS parameter and clear the status flag on completion.
|
//! parameter from its SPS parameter and clear the status flag on completion.
|
||||||
//! Note: Use DCL_setPendingStatus(df) to set the pending status.
|
//! Note: Use DCL_setUpdateStatus(df) to set the update status.
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
||||||
//! \return 'true' if an update is applied, otherwise 'false'
|
//! \return 'true' if an update is applied, otherwise 'false'
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_pendingUpdateDF11(DCL_DF11 *df)
|
bool DCL_updateDF11(DCL_DF11 *df)
|
||||||
{
|
{
|
||||||
if (DCL_getPendingStatus(df) && DCL_updateDF11(df))
|
if (DCL_getUpdateStatus(df))
|
||||||
{
|
{
|
||||||
DCL_clearPendingStatus(df);
|
DCL_updateDF11NoCheck(df);
|
||||||
|
DCL_clearUpdateStatus(df);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Update SPS parameter with active param, userful when needing
|
|
||||||
//! to update only few active param from SPS and keep rest the same
|
|
||||||
//!
|
|
||||||
//! \param[in] df Pointer to the active DCL_DF11 controller structure
|
|
||||||
//!
|
|
||||||
_DCL_CODE_ACCESS
|
|
||||||
void DCL_updateDF11SPS(DCL_DF11 *df)
|
|
||||||
{
|
|
||||||
df->sps->b0 = df->b0;
|
|
||||||
df->sps->b1 = df->b1;
|
|
||||||
df->sps->a1 = df->a1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! \brief Determines stability of the shadow DF11 compensator
|
//! \brief Determines stability of the shadow DF11 compensator
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
||||||
@ -223,7 +205,7 @@ bool DCL_isStableDF11(DCL_DF11 *df)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads the DF11 shadow coefficients from a ZPK3 description
|
//! \brief Loads the DF11 shadow coefficients from a ZPK3 description
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF11().
|
//! New settings take effect after DCL_updateDF11().
|
||||||
//! Only real z1 & p1 considered, all other roots ignored.
|
//! Only real z1 & p1 considered, all other roots ignored.
|
||||||
//!
|
//!
|
||||||
@ -245,15 +227,15 @@ void DCL_loadDF11asZPK(DCL_DF11 *df, DCL_ZPK3 *zpk)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
float32_t a0p = 2.0f - (float32_t) crealf(zpk->p1) * t_sec;
|
float32_t a0p = 2.0f - (float32_t) crealf(zpk->p1) * T;
|
||||||
df->sps->b0 = zpk->K * (2.0f - (float32_t) crealf(zpk->z1) * t_sec) / a0p;
|
df->sps->b0 = zpk->K * (2.0f - (float32_t) crealf(zpk->z1) * T) / a0p;
|
||||||
df->sps->b1 = zpk->K * (-2.0f - (float32_t) crealf(zpk->z1) * t_sec) / a0p;
|
df->sps->b1 = zpk->K * (-2.0f - (float32_t) crealf(zpk->z1) * T) / a0p;
|
||||||
df->sps->a1 = (-2.0f - (float32_t) crealf(zpk->p1) * t_sec) / a0p;
|
df->sps->a1 = (-2.0f - (float32_t) crealf(zpk->p1) * T) / a0p;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads compensator coefficients to emulate series form PI
|
//! \brief Loads compensator coefficients to emulate series form PI
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF11().
|
//! New settings take effect after DCL_updateDF11().
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
//! \param[in] df Pointer to the DCL_DF11 controller structure
|
||||||
@ -275,9 +257,9 @@ void DCL_loadDF11asPI(DCL_DF11 *df, float32_t Kp, float32_t Ki)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
df->sps->b0 = Kp * ((Ki * t_sec) + 2.0f) / 2.0f;
|
df->sps->b0 = Kp * ((Ki * T) + 2.0f) / 2.0f;
|
||||||
df->sps->b1 = Kp * ((Ki * t_sec) - 2.0f) / 2.0f;
|
df->sps->b1 = Kp * ((Ki * T) - 2.0f) / 2.0f;
|
||||||
df->sps->a1 = -1.0f;
|
df->sps->a1 = -1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,33 @@ extern "C" {
|
|||||||
* \file dcl_df13.h
|
* \file dcl_df13.h
|
||||||
* \brief Contains direct form 1 3rd order DF13 compensator
|
* \brief Contains direct form 1 3rd order DF13 compensator
|
||||||
* with its related structures and functions
|
* with its related structures and functions
|
||||||
*/
|
*
|
||||||
|
* \details Due to compatibility reason, this file maintains a copy
|
||||||
|
* of legacy function DCL_runDF13_C5(), DCL_runDF13_C6().
|
||||||
|
* It is advised to not use these legacy functions for new development.
|
||||||
|
*
|
||||||
|
* \code Previously, C28 version of DCL did not implement a function
|
||||||
|
* to run DF13 with clamp. Instead, user had to implement a routine
|
||||||
|
* similar to the following:
|
||||||
|
*
|
||||||
|
* extern DCL_DF13 df;
|
||||||
|
* extern float32_t ek, uk;
|
||||||
|
* float32_t vk = 0;
|
||||||
|
*
|
||||||
|
* float32_t uk = DCL_runDF13_C2/C5(df, ek, vk);
|
||||||
|
* bool is_clamped = DCL_runClamp_C1/C2(&uk, Umax, Umin)
|
||||||
|
* if (!is_clamped)
|
||||||
|
* {
|
||||||
|
* vk = DCL_runDF13_C3/C6(df, ek, uk);
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* A new function DCL_runDF13Clamp() was implemented to replace it,
|
||||||
|
* therefore, user may change the aformentioned routine to just:
|
||||||
|
*
|
||||||
|
* uk = DCL_runDF13Clamp(df, ek, Umax, Umin);
|
||||||
|
* \endcode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../dcl_common.h"
|
#include "../dcl_common.h"
|
||||||
|
|
||||||
@ -62,9 +88,10 @@ typedef struct dcl_df13_sps {
|
|||||||
float32_t a1; //!< neg. coefficient to u(k-1)
|
float32_t a1; //!< neg. coefficient to u(k-1)
|
||||||
float32_t a2; //!< neg. coefficient to u(k-2)
|
float32_t a2; //!< neg. coefficient to u(k-2)
|
||||||
float32_t a3; //!< neg. coefficient to u(k-3)
|
float32_t a3; //!< neg. coefficient to u(k-3)
|
||||||
|
float32_t a0; //!< No Longer Needed
|
||||||
} DCL_DF13_SPS;
|
} DCL_DF13_SPS;
|
||||||
|
|
||||||
#define DF13_SPS_DEFAULTS { 0.25f, 0.25f, 0.25f, 0.25f, 0.0f, 0.0f, 0.0f }
|
#define DF13_SPS_DEFAULTS { 0.25f, 0.25f, 0.25f, 0.25f, 0.0f, 0.0f, 0.0f, 0.0f }
|
||||||
|
|
||||||
//! \brief DCL_DF13 object for storing df13 specific parameters
|
//! \brief DCL_DF13 object for storing df13 specific parameters
|
||||||
//!
|
//!
|
||||||
@ -87,6 +114,10 @@ typedef _DCL_VOLATILE struct dcl_df13
|
|||||||
float32_t d5; //!< u(k-2)
|
float32_t d5; //!< u(k-2)
|
||||||
float32_t d6; //!< u(k-3)
|
float32_t d6; //!< u(k-3)
|
||||||
|
|
||||||
|
float32_t a0; //!< No Longer Needed
|
||||||
|
float32_t d0; //!< No Longer Needed
|
||||||
|
float32_t d7; //!< No Longer Needed
|
||||||
|
|
||||||
/* miscellaneous */
|
/* miscellaneous */
|
||||||
DCL_DF13_SPS *sps; //!< updates compensator parameter
|
DCL_DF13_SPS *sps; //!< updates compensator parameter
|
||||||
DCL_CSS *css; //!< configuration & debugging
|
DCL_CSS *css; //!< configuration & debugging
|
||||||
@ -95,7 +126,7 @@ typedef _DCL_VOLATILE struct dcl_df13
|
|||||||
//! \brief Defines default values to initialize DCL_DF13
|
//! \brief Defines default values to initialize DCL_DF13
|
||||||
//!
|
//!
|
||||||
#define DF13_DEFAULTS { 0.25f, 0.25f, 0.25f, 0.25f, 0.0f, 0.0f, 0.0f, \
|
#define DF13_DEFAULTS { 0.25f, 0.25f, 0.25f, 0.25f, 0.0f, 0.0f, 0.0f, \
|
||||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, \
|
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, \
|
||||||
&(DCL_DF13_SPS)DF13_SPS_DEFAULTS, &(DCL_CSS)DCL_CSS_DEFAULTS }
|
&(DCL_DF13_SPS)DF13_SPS_DEFAULTS, &(DCL_CSS)DCL_CSS_DEFAULTS }
|
||||||
|
|
||||||
//! \brief Macro for internal default values to initialize DCL_DF13
|
//! \brief Macro for internal default values to initialize DCL_DF13
|
||||||
@ -107,8 +138,8 @@ typedef _DCL_VOLATILE struct dcl_df13
|
|||||||
//! DF13_INT_DEFAULTS
|
//! DF13_INT_DEFAULTS
|
||||||
//! };
|
//! };
|
||||||
#define DF13_INT_DEFAULTS .d1=0.0f, .d2=0.0f, .d3=0.0f, .d4=0.0f, .d5=0.0f, \
|
#define DF13_INT_DEFAULTS .d1=0.0f, .d2=0.0f, .d3=0.0f, .d4=0.0f, .d5=0.0f, \
|
||||||
.d6=0.0f, .sps=&(DCL_DF13_SPS)DF13_SPS_DEFAULTS, \
|
.d6=0.0f, .a0=0.0f, .d0=0.0f, .d7=0.0f, \
|
||||||
.css=&(DCL_CSS)DCL_CSS_DEFAULTS
|
.sps=&(DCL_DF13_SPS)DF13_SPS_DEFAULTS, .css=&(DCL_CSS)DCL_CSS_DEFAULTS
|
||||||
|
|
||||||
//! \brief Initialize DCL_DF13 struct with default parameters
|
//! \brief Initialize DCL_DF13 struct with default parameters
|
||||||
//! Example: DCL_DF13* df13_ctrl = DCL_initDF13();
|
//! Example: DCL_DF13* df13_ctrl = DCL_initDF13();
|
||||||
@ -143,8 +174,8 @@ typedef _DCL_VOLATILE struct dcl_df13
|
|||||||
if(sps_ptr) \
|
if(sps_ptr) \
|
||||||
{ \
|
{ \
|
||||||
*new_df =(DCL_DF13){ (new_sps)->b0, (new_sps)->b1, (new_sps)->b2, (new_sps)->b3, \
|
*new_df =(DCL_DF13){ (new_sps)->b0, (new_sps)->b1, (new_sps)->b2, (new_sps)->b3, \
|
||||||
(new_sps)->a1, (new_sps)->a2, (new_sps)->a3, 0.0f, 0.0f, 0.0f, 0.0f, \
|
(new_sps)->a1, (new_sps)->a2, (new_sps)->a3, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, \
|
||||||
0.0f, 0.0f, (DCL_DF13_SPS*)new_sps, &(DCL_CSS)DCL_CSS_DEFAULTS }; \
|
0.0f, 0.0f, 0.0f, (DCL_DF13_SPS*)new_sps, &(DCL_CSS)DCL_CSS_DEFAULTS }; \
|
||||||
} \
|
} \
|
||||||
new_df; \
|
new_df; \
|
||||||
})
|
})
|
||||||
@ -157,17 +188,18 @@ typedef _DCL_VOLATILE struct dcl_df13
|
|||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_resetDF13(DCL_DF13 *df)
|
void DCL_resetDF13(DCL_DF13 *df)
|
||||||
{
|
{
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
dcl_interrupt_t ints;
|
||||||
|
ints = DCL_disableInts();
|
||||||
df->d1 = df->d2 = df->d3 = df->d4 = df->d5 = df->d6 = 0.0f;
|
df->d1 = df->d2 = df->d3 = df->d4 = df->d5 = df->d6 = 0.0f;
|
||||||
DCL_restoreInts(ints);
|
DCL_restoreInts(ints);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads DF13 tuning parameter from its SPS parameter
|
//! \brief Loads DF13 tuning parameter from its SPS parameter without interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the active DCL_DF13 controller structure
|
//! \param[in] df Pointer to the active DCL_DF13 controller structure
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_fupdateDF13(DCL_DF13 *df)
|
void DCL_forceUpdateDF13(DCL_DF13 *df)
|
||||||
{
|
{
|
||||||
df->b0 = df->sps->b0;
|
df->b0 = df->sps->b0;
|
||||||
df->b1 = df->sps->b1;
|
df->b1 = df->sps->b1;
|
||||||
@ -178,68 +210,45 @@ void DCL_fupdateDF13(DCL_DF13 *df)
|
|||||||
df->a3 = df->sps->a3;
|
df->a3 = df->sps->a3;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Updates DF13 parameter from its SPS parameter with interrupt protection
|
//! \brief Loads DF13 tuning parameter from its SPS parameter with interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
||||||
//! \return 'true' if update is successful, otherwise 'false'
|
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_updateDF13(DCL_DF13 *df)
|
void DCL_updateDF13NoCheck(DCL_DF13 *df)
|
||||||
{
|
{
|
||||||
if (!DCL_getUpdateStatus(df))
|
dcl_interrupt_t ints;
|
||||||
{
|
ints = DCL_disableInts();
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
df->b0 = df->sps->b0;
|
||||||
DCL_setUpdateStatus(df);
|
df->b1 = df->sps->b1;
|
||||||
df->b0 = df->sps->b0;
|
df->b2 = df->sps->b2;
|
||||||
df->b1 = df->sps->b1;
|
df->b3 = df->sps->b3;
|
||||||
df->b2 = df->sps->b2;
|
df->a1 = df->sps->a1;
|
||||||
df->b3 = df->sps->b3;
|
df->a2 = df->sps->a2;
|
||||||
df->a1 = df->sps->a1;
|
df->a3 = df->sps->a3;
|
||||||
df->a2 = df->sps->a2;
|
DCL_restoreInts(ints);
|
||||||
df->a3 = df->sps->a3;
|
|
||||||
DCL_clearUpdateStatus(df);
|
|
||||||
DCL_restoreInts(ints);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief A conditional update based on the pending-for-update flag.
|
//! \brief A conditional update based on the update flag.
|
||||||
//! If the pending status is set, the function will update DF13
|
//! If the update status is set, the function will update DF13
|
||||||
//! parameter from its SPS parameter and clear the status flag on completion..
|
//! parameter from its SPS parameter and clear the status flag on completion..
|
||||||
//! Note: Use DCL_setPendingStatus(df) to set the pending status.
|
//! Note: Use DCL_setUpdateStatus(df) to set the update status.
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
||||||
//! \return 'true' if an update is applied, otherwise 'false'
|
//! \return 'true' if an update is applied, otherwise 'false'
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_pendingUpdateDF13(DCL_DF13 *df)
|
bool DCL_updateDF13(DCL_DF13 *df)
|
||||||
{
|
{
|
||||||
if (DCL_getPendingStatus(df) && DCL_updateDF13(df))
|
if (DCL_getUpdateStatus(df))
|
||||||
{
|
{
|
||||||
DCL_clearPendingStatus(df);
|
DCL_updateDF13NoCheck(df);
|
||||||
|
DCL_clearUpdateStatus(df);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Update SPS parameter with active param, userful when needing
|
|
||||||
//! to update only few active param from SPS and keep rest the same
|
|
||||||
//!
|
|
||||||
//! \param[in] df Pointer to the active DCL_DF13 controller structure
|
|
||||||
//!
|
|
||||||
_DCL_CODE_ACCESS
|
|
||||||
void DCL_updateDF13SPS(DCL_DF13 *df)
|
|
||||||
{
|
|
||||||
df->sps->b0 = df->b0;
|
|
||||||
df->sps->b1 = df->b1;
|
|
||||||
df->sps->b2 = df->b2;
|
|
||||||
df->sps->b3 = df->b3;
|
|
||||||
df->sps->a1 = df->a1;
|
|
||||||
df->sps->a2 = df->a2;
|
|
||||||
df->sps->a3 = df->a3;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! \brief Determines stability of the shadow compensator
|
//! \brief Determines stability of the shadow compensator
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
||||||
@ -252,7 +261,7 @@ bool DCL_isStableDF13(DCL_DF13 *df)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads the DF13 shadow coefficients from a ZPK3 description.
|
//! \brief Loads the DF13 shadow coefficients from a ZPK3 description.
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF13().
|
//! New settings take effect after DCL_updateDF13().
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
//! \param[in] df Pointer to the DCL_DF13 controller structure
|
||||||
@ -281,18 +290,18 @@ void DCL_loadDF13asZPK(DCL_DF13 *df, DCL_ZPK3 *zpk)
|
|||||||
float32_t alpha1 = (float32_t) crealf((zpk->p1 * zpk->p2) + (zpk->p2 * zpk->p3) + (zpk->p1 * zpk->p3));
|
float32_t alpha1 = (float32_t) crealf((zpk->p1 * zpk->p2) + (zpk->p2 * zpk->p3) + (zpk->p1 * zpk->p3));
|
||||||
float32_t alpha0 = -(float32_t) crealf(zpk->p1 * zpk->p2 * zpk->p3);
|
float32_t alpha0 = -(float32_t) crealf(zpk->p1 * zpk->p2 * zpk->p3);
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
|
|
||||||
float32_t a0p = 8.0f + (alpha2 * 4.0f * t_sec) + (alpha1 * 2.0f * t_sec * t_sec) + (alpha0 * t_sec * t_sec * t_sec);
|
float32_t a0p = 8.0f + (alpha2 * 4.0f * T) + (alpha1 * 2.0f * T * T) + (alpha0 * T * T * T);
|
||||||
|
|
||||||
df->sps->b0 = zpk->K * (8.0f + (beta2 * 4.0f * t_sec) + (beta1 * 2.0f * t_sec * t_sec) + (beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b0 = zpk->K * (8.0f + (beta2 * 4.0f * T) + (beta1 * 2.0f * T * T) + (beta0 * T * T * T)) / a0p;
|
||||||
df->sps->b1 = zpk->K * (-24.0f - (beta2 * 4.0f * t_sec) + (beta1 * 2.0f * t_sec * t_sec) + (3.0f * beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b1 = zpk->K * (-24.0f - (beta2 * 4.0f * T) + (beta1 * 2.0f * T * T) + (3.0f * beta0 * T * T * T)) / a0p;
|
||||||
df->sps->b2 = zpk->K * (24.0f - (beta2 * 4.0f * t_sec) - (beta1 * 2.0f * t_sec * t_sec) + (3.0f * beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b2 = zpk->K * (24.0f - (beta2 * 4.0f * T) - (beta1 * 2.0f * T * T) + (3.0f * beta0 * T * T * T)) / a0p;
|
||||||
df->sps->b3 = zpk->K * (-8.0f + (beta2 * 4.0f * t_sec) - (beta1 * 2.0f * t_sec * t_sec) + (beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b3 = zpk->K * (-8.0f + (beta2 * 4.0f * T) - (beta1 * 2.0f * T * T) + (beta0 * T * T * T)) / a0p;
|
||||||
|
|
||||||
df->sps->a1 = (-24.0f - (alpha2 * 4.0f * t_sec) + (alpha1 * 2.0f * t_sec * t_sec) + (3.0f * alpha0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->a1 = (-24.0f - (alpha2 * 4.0f * T) + (alpha1 * 2.0f * T * T) + (3.0f * alpha0 * T * T * T)) / a0p;
|
||||||
df->sps->a2 = (24.0f - (alpha2 * 4.0f * t_sec) - (alpha1 * 2.0f * t_sec * t_sec) + (3.0f * alpha0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->a2 = (24.0f - (alpha2 * 4.0f * T) - (alpha1 * 2.0f * T * T) + (3.0f * alpha0 * T * T * T)) / a0p;
|
||||||
df->sps->a3 = (-8.0f + (alpha2 * 4.0f * t_sec) - (alpha1 * 2.0f * t_sec * t_sec) + (alpha0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->a3 = (-8.0f + (alpha2 * 4.0f * T) - (alpha1 * 2.0f * T * T) + (alpha0 * T * T * T)) / a0p;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Executes a 3rd order Direct Form 1 controller
|
//! \brief Executes a 3rd order Direct Form 1 controller
|
||||||
@ -363,6 +372,44 @@ float32_t DCL_runDF13Clamp(DCL_DF13 *df, float32_t ek, float32_t Umax, float32_t
|
|||||||
return(uk);
|
return(uk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! \brief Legacy C28 Function for maintaining backwards compatibility.
|
||||||
|
//! It Executes an immediate 3rd order Direct Form 1 controller
|
||||||
|
//!
|
||||||
|
//! \param[in] p Pointer to the DCL_DF13 controller structure
|
||||||
|
//! \param[in] ek The servo error
|
||||||
|
//! \param[in] vk The partial pre-computed control effort
|
||||||
|
//! \return uk The control effort
|
||||||
|
//!
|
||||||
|
_DCL_CODE_ACCESS
|
||||||
|
float32_t DCL_runDF13_C5(DCL_DF13 *p, float32_t ek, float32_t vk)
|
||||||
|
{
|
||||||
|
p->d4 = (ek * p->b0) + vk;
|
||||||
|
|
||||||
|
return(p->d4);
|
||||||
|
}
|
||||||
|
|
||||||
|
//! \brief Legacy C28 Function for maintaining backwards compatibility.
|
||||||
|
//! It executes a partial pre-computed 3rd order Direct Form 1 controller
|
||||||
|
//!
|
||||||
|
//! \param[in] p Pointer to the DCL_DF13 controller structure
|
||||||
|
//! \param[in] ek The servo error
|
||||||
|
//! \param[in] uk The controller output in the previous sample interval
|
||||||
|
//! \return vk The control effort
|
||||||
|
//!
|
||||||
|
_DCL_CODE_ACCESS
|
||||||
|
float32_t DCL_runDF13_C6(DCL_DF13 *p, float32_t ek, float32_t uk)
|
||||||
|
{
|
||||||
|
float32_t v9;
|
||||||
|
|
||||||
|
v9 = (ek * p->b1) + (p->d1 * p->b2) + (p->d2 * p->b3) - (uk * p->a1) - (p->d5 * p->a2) - (p->d6 * p->a3);
|
||||||
|
p->d2 = p->d1;
|
||||||
|
p->d1 = ek;
|
||||||
|
p->d6 = p->d5;
|
||||||
|
p->d5 = uk;
|
||||||
|
|
||||||
|
return(v9);
|
||||||
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@ -146,17 +146,18 @@ typedef _DCL_VOLATILE struct dcl_df22
|
|||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_resetDF22(DCL_DF22 *df)
|
void DCL_resetDF22(DCL_DF22 *df)
|
||||||
{
|
{
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
dcl_interrupt_t ints;
|
||||||
|
ints = DCL_disableInts();
|
||||||
df->x1 = df->x2 = 0.0f;
|
df->x1 = df->x2 = 0.0f;
|
||||||
DCL_restoreInts(ints);
|
DCL_restoreInts(ints);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads DF22 tuning parameter from its SPS parameter
|
//! \brief Loads DF22 tuning parameter from its SPS parameter without interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the active DCL_DF22 controller structure
|
//! \param[in] df Pointer to the active DCL_DF22 controller structure
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_fupdateDF22(DCL_DF22 *df)
|
void DCL_forceUpdateDF22(DCL_DF22 *df)
|
||||||
{
|
{
|
||||||
df->b0 = df->sps->b0;
|
df->b0 = df->sps->b0;
|
||||||
df->b1 = df->sps->b1;
|
df->b1 = df->sps->b1;
|
||||||
@ -165,65 +166,43 @@ void DCL_fupdateDF22(DCL_DF22 *df)
|
|||||||
df->a2 = df->sps->a2;
|
df->a2 = df->sps->a2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Updates DF22 parameter from its SPS parameter with interrupt protection
|
//! \brief Loads DF22 tuning parameter from its SPS parameter with interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
||||||
//! \return 'true' if update is successful, otherwise 'false'
|
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_updateDF22(DCL_DF22 *df)
|
void DCL_updateDF22NoCheck(DCL_DF22 *df)
|
||||||
{
|
{
|
||||||
if (!DCL_getUpdateStatus(df))
|
dcl_interrupt_t ints;
|
||||||
{
|
ints = DCL_disableInts();
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
df->b0 = df->sps->b0;
|
||||||
DCL_setUpdateStatus(df);
|
df->b1 = df->sps->b1;
|
||||||
df->b0 = df->sps->b0;
|
df->b2 = df->sps->b2;
|
||||||
df->b1 = df->sps->b1;
|
df->a1 = df->sps->a1;
|
||||||
df->b2 = df->sps->b2;
|
df->a2 = df->sps->a2;
|
||||||
df->a1 = df->sps->a1;
|
DCL_restoreInts(ints);
|
||||||
df->a2 = df->sps->a2;
|
|
||||||
DCL_clearUpdateStatus(df);
|
|
||||||
DCL_restoreInts(ints);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief A conditional update based on the pending-for-update flag.
|
//! \brief A conditional update based on the update flag.
|
||||||
//! If the pending status is set, the function will update DF22
|
//! If the update status is set, the function will update DF22
|
||||||
//! parameter from its SPS parameter and clear the status flag on completion.
|
//! parameter from its SPS parameter and clear the status flag on completion.
|
||||||
//! Note: Use DCL_setPendingStatus(df) to set the pending status.
|
//! Note: Use DCL_setUpdateStatus(df) to set the update status.
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
||||||
//! \return 'true' if an update is applied, otherwise 'false'
|
//! \return 'true' if an update is applied, otherwise 'false'
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_pendingUpdateDF22(DCL_DF22 *df)
|
bool DCL_updateDF22(DCL_DF22 *df)
|
||||||
{
|
{
|
||||||
if (DCL_getPendingStatus(df) && DCL_updateDF22(df))
|
if (DCL_setUpdateStatus(df))
|
||||||
{
|
{
|
||||||
DCL_clearPendingStatus(df);
|
DCL_updateDF22NoCheck(df);
|
||||||
|
DCL_clearUpdateStatus(df);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Update SPS parameter with active param, userful when needing
|
|
||||||
//! to update only few active param from SPS and keep rest the same
|
|
||||||
//!
|
|
||||||
//! \param[in] df Pointer to the active DCL_DF22 controller structure
|
|
||||||
//!
|
|
||||||
_DCL_CODE_ACCESS
|
|
||||||
void DCL_updateDF22SPS(DCL_DF22 *df)
|
|
||||||
{
|
|
||||||
df->sps->b0 = df->b0;
|
|
||||||
df->sps->b1 = df->b1;
|
|
||||||
df->sps->b2 = df->b2;
|
|
||||||
df->sps->a1 = df->a1;
|
|
||||||
df->sps->a2 = df->a2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//! \brief Determines stability of the shadow compensator
|
//! \brief Determines stability of the shadow compensator
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
||||||
@ -236,7 +215,7 @@ bool DCL_isStableDF22(DCL_DF22 *df)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads the DF22 shadow coefficients from a ZPK3 description
|
//! \brief Loads the DF22 shadow coefficients from a ZPK3 description
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF22().
|
//! New settings take effect after DCL_updateDF22().
|
||||||
//! Only z1, z2, p1 & p2 are considered, z3 & p3 are ignored.
|
//! Only z1, z2, p1 & p2 are considered, z3 & p3 are ignored.
|
||||||
//!
|
//!
|
||||||
@ -264,19 +243,19 @@ void DCL_loadDF22asZPK(DCL_DF22 *df, DCL_ZPK3 *zpk)
|
|||||||
float32_t alpha1 = -(float32_t) crealf(zpk->p1 + zpk->p2);
|
float32_t alpha1 = -(float32_t) crealf(zpk->p1 + zpk->p2);
|
||||||
float32_t alpha0 = (float32_t) crealf(zpk->p1 * zpk->p2);
|
float32_t alpha0 = (float32_t) crealf(zpk->p1 * zpk->p2);
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
float32_t a0p = 4.0f + (alpha1 * 2.0f * t_sec) + (alpha0 * t_sec * t_sec);
|
float32_t a0p = 4.0f + (alpha1 * 2.0f * T) + (alpha0 * T * T);
|
||||||
|
|
||||||
df->sps->b0 = zpk->K * (4.0f + (beta1 * 2.0f * t_sec) + (beta0 * t_sec * t_sec)) / a0p;
|
df->sps->b0 = zpk->K * (4.0f + (beta1 * 2.0f * T) + (beta0 * T * T)) / a0p;
|
||||||
df->sps->b1 = zpk->K * (-8.0f + (2.0f * beta0 * t_sec * t_sec)) / a0p;
|
df->sps->b1 = zpk->K * (-8.0f + (2.0f * beta0 * T * T)) / a0p;
|
||||||
df->sps->b2 = zpk->K * (4.0f - (beta1 * 2.0f * t_sec) + (beta0 * t_sec * t_sec)) / a0p;
|
df->sps->b2 = zpk->K * (4.0f - (beta1 * 2.0f * T) + (beta0 * T * T)) / a0p;
|
||||||
df->sps->a1 = (-8.0f + (2.0f * alpha0 * t_sec * t_sec)) / a0p;
|
df->sps->a1 = (-8.0f + (2.0f * alpha0 * T * T)) / a0p;
|
||||||
df->sps->a2 = (4.0f - (alpha1 * 2.0f * t_sec) + (alpha0 * t_sec * t_sec)) / a0p;
|
df->sps->a2 = (4.0f - (alpha1 * 2.0f * T) + (alpha0 * T * T)) / a0p;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads the DF22 shadow coefficients from damping ratio and un-damped
|
//! \brief Loads the DF22 shadow coefficients from damping ratio and un-damped
|
||||||
//! natural frequency using sample rate in CSS.
|
//! natural frequency using sample rate in CSS.
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF22().
|
//! New settings take effect after DCL_updateDF22().
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
||||||
@ -299,18 +278,18 @@ void DCL_loadDF22asZwn(DCL_DF22 *df, float32_t z, float32_t wn)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
float32_t v1 = wn * wn * t_sec * t_sec;
|
float32_t v1 = wn * wn * T * T;
|
||||||
float32_t a2p = 1.0f / (4.0f + (4.0f * z * wn * t_sec) + v1);
|
float32_t a2p = 1.0f / (4.0f + (4.0f * z * wn * T) + v1);
|
||||||
df->sps->b0 = v1 * a2p;
|
df->sps->b0 = v1 * a2p;
|
||||||
df->sps->b1 = 2.0f * df->sps->b0;
|
df->sps->b1 = 2.0f * df->sps->b0;
|
||||||
df->sps->b2 = df->sps->b0;
|
df->sps->b2 = df->sps->b0;
|
||||||
df->sps->a1 = ((2.0f * v1) - 8.0f) * a2p;
|
df->sps->a1 = ((2.0f * v1) - 8.0f) * a2p;
|
||||||
df->sps->a2 = (4.0f - (4.0f * z * wn * t_sec) + v1) * a2p;
|
df->sps->a2 = (4.0f - (4.0f * z * wn * T) + v1) * a2p;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads the shadow DF22 compensator coefficients to emulate a series form PID.
|
//! \brief Loads the shadow DF22 compensator coefficients to emulate a series form PID.
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF22().
|
//! New settings take effect after DCL_updateDF22().
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
||||||
@ -337,10 +316,10 @@ void DCL_loadDF22asSeriesPID(DCL_DF22 *df, float32_t Kp, float32_t Ki, float32_t
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
float32_t tau = 1 / (2.0f * CONST_PI * fc);
|
float32_t tau = 1 / (2.0f * CONST_PI * fc);
|
||||||
float32_t c1 = 2.0f / (t_sec + (2.0f * tau));
|
float32_t c1 = 2.0f / (T + (2.0f * tau));
|
||||||
float32_t c2 = c1 * (t_sec - (2.0f * tau)) / 2.0f;
|
float32_t c2 = c1 * (T - (2.0f * tau)) / 2.0f;
|
||||||
float32_t Kdp = Kd * c1;
|
float32_t Kdp = Kd * c1;
|
||||||
df->sps->b0 = Kp * (1 + Ki + Kdp);
|
df->sps->b0 = Kp * (1 + Ki + Kdp);
|
||||||
df->sps->b1 = Kp * (c2 - 1 + Ki*c2 - 2*Kdp);
|
df->sps->b1 = Kp * (c2 - 1 + Ki*c2 - 2*Kdp);
|
||||||
@ -350,7 +329,7 @@ void DCL_loadDF22asSeriesPID(DCL_DF22 *df, float32_t Kp, float32_t Ki, float32_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads the shadow DF22 compensator coefficients to emulate a parallel form PID.
|
//! \brief Loads the shadow DF22 compensator coefficients to emulate a parallel form PID.
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF22().
|
//! New settings take effect after DCL_updateDF22().
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
//! \param[in] df Pointer to the DCL_DF22 controller structure
|
||||||
@ -369,7 +348,7 @@ void DCL_loadDF22asParallelPID(DCL_DF22 *df, float32_t Kp, float32_t Ki, float32
|
|||||||
err_code |= (Ki < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (Ki < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (Kd < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (Kd < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (fc < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (fc < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (fc > (1.0f / (2.0f * df->css->t_sec))) ? dcl_param_warn_err : dcl_none;
|
err_code |= (fc > (1.0f / (2.0f * df->css->T))) ? dcl_param_warn_err : dcl_none;
|
||||||
if (err_code)
|
if (err_code)
|
||||||
{
|
{
|
||||||
DCL_setError(df,err_code);
|
DCL_setError(df,err_code);
|
||||||
@ -378,10 +357,10 @@ void DCL_loadDF22asParallelPID(DCL_DF22 *df, float32_t Kp, float32_t Ki, float32
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
float32_t tau = 1.0f / (2.0f * CONST_PI * fc);
|
float32_t tau = 1.0f / (2.0f * CONST_PI * fc);
|
||||||
float32_t c1 = 2.0f / (t_sec + (2.0f * tau));
|
float32_t c1 = 2.0f / (T + (2.0f * tau));
|
||||||
float32_t c2 = c1 * (t_sec - (2.0f * tau)) / 2.0f;
|
float32_t c2 = c1 * (T - (2.0f * tau)) / 2.0f;
|
||||||
float32_t Kdp = Kd * c1;
|
float32_t Kdp = Kd * c1;
|
||||||
df->sps->b0 = Kp + Ki + Kdp;
|
df->sps->b0 = Kp + Ki + Kdp;
|
||||||
df->sps->b1 = (Kp * (c2 - 1)) + (Ki * c2) - (2.0f * Kdp);
|
df->sps->b1 = (Kp * (c2 - 1)) + (Ki * c2) - (2.0f * Kdp);
|
||||||
|
|||||||
@ -153,17 +153,18 @@ typedef _DCL_VOLATILE struct dcl_df23
|
|||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_resetDF23(DCL_DF23 *df)
|
void DCL_resetDF23(DCL_DF23 *df)
|
||||||
{
|
{
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
dcl_interrupt_t ints;
|
||||||
|
ints = DCL_disableInts();
|
||||||
df->x1 = df->x2 = df->x3 = 0.0f;
|
df->x1 = df->x2 = df->x3 = 0.0f;
|
||||||
DCL_restoreInts(ints);
|
DCL_restoreInts(ints);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads DF23 tuning parameter from its SPS parameter
|
//! \brief Loads DF23 tuning parameter from its SPS parameter without interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the active DCL_DF23 controller structure
|
//! \param[in] df Pointer to the active DCL_DF23 controller structure
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_fupdateDF23(DCL_DF23 *df)
|
void DCL_forceUpdateDF23(DCL_DF23 *df)
|
||||||
{
|
{
|
||||||
df->b0 = df->sps->b0;
|
df->b0 = df->sps->b0;
|
||||||
df->b1 = df->sps->b1;
|
df->b1 = df->sps->b1;
|
||||||
@ -177,65 +178,42 @@ void DCL_fupdateDF23(DCL_DF23 *df)
|
|||||||
//! \brief Updates DF23 parameter from its SPS parameter with interrupt protection
|
//! \brief Updates DF23 parameter from its SPS parameter with interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
||||||
//! \return 'true' if update is successful, otherwise 'false'
|
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_updateDF23(DCL_DF23 *df)
|
void DCL_updateDF23NoCheck(DCL_DF23 *df)
|
||||||
{
|
{
|
||||||
if (!DCL_getUpdateStatus(df))
|
dcl_interrupt_t ints;
|
||||||
{
|
ints = DCL_disableInts();
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
df->b0 = df->sps->b0;
|
||||||
DCL_setUpdateStatus(df);
|
df->b1 = df->sps->b1;
|
||||||
df->b0 = df->sps->b0;
|
df->b2 = df->sps->b2;
|
||||||
df->b1 = df->sps->b1;
|
df->b3 = df->sps->b3;
|
||||||
df->b2 = df->sps->b2;
|
df->a1 = df->sps->a1;
|
||||||
df->b3 = df->sps->b3;
|
df->a2 = df->sps->a2;
|
||||||
df->a1 = df->sps->a1;
|
df->a3 = df->sps->a3;
|
||||||
df->a2 = df->sps->a2;
|
DCL_restoreInts(ints);
|
||||||
df->a3 = df->sps->a3;
|
|
||||||
DCL_clearUpdateStatus(df);
|
|
||||||
DCL_restoreInts(ints);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief A conditional update based on the pending-for-update flag.
|
//! \brief A conditional update based on the update flag.
|
||||||
//! If the pending status is set, the function will update DF23
|
//! If the update status is set, the function will update DF23
|
||||||
//! parameter from its SPS parameter and clear the status flag on completion.
|
//! parameter from its SPS parameter and clear the status flag on completion.
|
||||||
//! Note: Use DCL_setPendingStatus(df) to set the pending status.
|
//! Note: Use DCL_setUpdateStatus(df) to set the update status.
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
||||||
//! \return 'true' if an update is applied, otherwise 'false'
|
//! \return 'true' if an update is applied, otherwise 'false'
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_pendingUpdateDF23(DCL_DF23 *df)
|
bool DCL_updateDF23(DCL_DF23 *df)
|
||||||
{
|
{
|
||||||
if (DCL_getPendingStatus(df) && DCL_updateDF23(df))
|
if (DCL_setUpdateStatus(df))
|
||||||
{
|
{
|
||||||
DCL_clearPendingStatus(df);
|
DCL_updateDF23NoCheck(df);
|
||||||
|
DCL_clearUpdateStatus(df);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Update SPS parameter with active param, userful when needing
|
|
||||||
//! to update only few active param from SPS and keep rest the same
|
|
||||||
//!
|
|
||||||
//! \param[in] df Pointer to the active DCL_DF23 controller structure
|
|
||||||
//!
|
|
||||||
_DCL_CODE_ACCESS
|
|
||||||
void DCL_updateDF23SPS(DCL_DF23 *df)
|
|
||||||
{
|
|
||||||
df->sps->b0 = df->b0;
|
|
||||||
df->sps->b1 = df->b1;
|
|
||||||
df->sps->b2 = df->b2;
|
|
||||||
df->sps->b3 = df->b3;
|
|
||||||
df->sps->a1 = df->a1;
|
|
||||||
df->sps->a2 = df->a2;
|
|
||||||
df->sps->a3 = df->a3;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! \brief Determines stability of the shadow compensator
|
//! \brief Determines stability of the shadow compensator
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
||||||
@ -248,7 +226,7 @@ bool DCL_isStableDF23(DCL_DF23 *df)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads the DF23 shadow coefficients from a ZPK3 description
|
//! \brief Loads the DF23 shadow coefficients from a ZPK3 description
|
||||||
//! Note: Sampling period df->css->t_sec are used in the calculation.
|
//! Note: Sampling period df->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updateDF23().
|
//! New settings take effect after DCL_updateDF23().
|
||||||
//!
|
//!
|
||||||
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
//! \param[in] df Pointer to the DCL_DF23 controller structure
|
||||||
@ -277,17 +255,17 @@ void DCL_loadDF23asZPK(DCL_DF23 *df, DCL_ZPK3 *zpk)
|
|||||||
float32_t alpha1 = (float32_t) crealf((zpk->p1 * zpk->p2) + (zpk->p2 * zpk->p3) + (zpk->p1 * zpk->p3));
|
float32_t alpha1 = (float32_t) crealf((zpk->p1 * zpk->p2) + (zpk->p2 * zpk->p3) + (zpk->p1 * zpk->p3));
|
||||||
float32_t alpha0 = -(float32_t) crealf(zpk->p1 * zpk->p2 * zpk->p3);
|
float32_t alpha0 = -(float32_t) crealf(zpk->p1 * zpk->p2 * zpk->p3);
|
||||||
|
|
||||||
float32_t t_sec = df->css->t_sec;
|
float32_t T = df->css->T;
|
||||||
float32_t a0p = 8.0f + (alpha2 * 4.0f * t_sec) + (alpha1 * 2.0f * t_sec * t_sec) + (alpha0 * t_sec * t_sec * t_sec);
|
float32_t a0p = 8.0f + (alpha2 * 4.0f * T) + (alpha1 * 2.0f * T * T) + (alpha0 * T * T * T);
|
||||||
|
|
||||||
df->sps->b0 = zpk->K * (8.0f + (beta2 * 4.0f * t_sec) + (beta1 * 2.0f * t_sec * t_sec) + (beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b0 = zpk->K * (8.0f + (beta2 * 4.0f * T) + (beta1 * 2.0f * T * T) + (beta0 * T * T * T)) / a0p;
|
||||||
df->sps->b1 = zpk->K * (-24.0f - (beta2 * 4.0f * t_sec) + (beta1 * 2.0f * t_sec * t_sec) + (3.0f * beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b1 = zpk->K * (-24.0f - (beta2 * 4.0f * T) + (beta1 * 2.0f * T * T) + (3.0f * beta0 * T * T * T)) / a0p;
|
||||||
df->sps->b2 = zpk->K * (24.0f - (beta2 * 4.0f * t_sec) - (beta1 * 2.0f * t_sec * t_sec) + (3.0f * beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b2 = zpk->K * (24.0f - (beta2 * 4.0f * T) - (beta1 * 2.0f * T * T) + (3.0f * beta0 * T * T * T)) / a0p;
|
||||||
df->sps->b3 = zpk->K * (-8.0f + (beta2 * 4.0f * t_sec) - (beta1 * 2.0f * t_sec * t_sec) + (beta0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->b3 = zpk->K * (-8.0f + (beta2 * 4.0f * T) - (beta1 * 2.0f * T * T) + (beta0 * T * T * T)) / a0p;
|
||||||
|
|
||||||
df->sps->a1 = (-24.0f - (alpha2 * 4.0f * t_sec) + (alpha1 * 2.0f * t_sec * t_sec) + (3.0f * alpha0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->a1 = (-24.0f - (alpha2 * 4.0f * T) + (alpha1 * 2.0f * T * T) + (3.0f * alpha0 * T * T * T)) / a0p;
|
||||||
df->sps->a2 = (24.0f - (alpha2 * 4.0f * t_sec) - (alpha1 * 2.0f * t_sec * t_sec) + (3.0f * alpha0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->a2 = (24.0f - (alpha2 * 4.0f * T) - (alpha1 * 2.0f * T * T) + (3.0f * alpha0 * T * T * T)) / a0p;
|
||||||
df->sps->a3 = (-8.0f + (alpha2 * 4.0f * t_sec) - (alpha1 * 2.0f * t_sec * t_sec) + (alpha0 * t_sec * t_sec * t_sec)) / a0p;
|
df->sps->a3 = (-8.0f + (alpha2 * 4.0f * T) - (alpha1 * 2.0f * T * T) + (alpha0 * T * T * T)) / a0p;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Executes a 3rd order Direct Form 2 controller
|
//! \brief Executes a 3rd order Direct Form 2 controller
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
* from this software without specific prior written permission.
|
* from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPgResS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
@ -33,14 +33,19 @@
|
|||||||
#ifndef _DCL_C28_COMPATIBILITY_H_
|
#ifndef _DCL_C28_COMPATIBILITY_H_
|
||||||
#define _DCL_C28_COMPATIBILITY_H_
|
#define _DCL_C28_COMPATIBILITY_H_
|
||||||
|
|
||||||
//! \file dcl_c28_compatibility.h
|
/**
|
||||||
//! \brief C28 compatibility macro
|
*
|
||||||
//! Contains backward compatbility mapping to C28 DCL's naming scheme
|
* @{
|
||||||
//!
|
*
|
||||||
//! Note:
|
* \file dcl_c28_compatibility.h
|
||||||
//! CLA functions are not compatible, nonetheless its
|
* \brief Contains backward compatbility mapping to C28 DCL's naming scheme
|
||||||
//! direct equivalent are listed in comments
|
* Not included in dcl.h by default, be sure to include this file seperately when using.
|
||||||
//! ASM functions will be alias into inline C code
|
*
|
||||||
|
* Note:
|
||||||
|
* All C28 ASM functions will be alias into its equivalent C functions
|
||||||
|
*
|
||||||
|
* CLA functions are not compatible, nonetheless its direct equivalent are listed in comments below
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -49,13 +54,14 @@ extern "C" {
|
|||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// PI
|
// PI
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runPI_C1 DCL_runPISeries
|
#define DCL_runPI_C1 DCL_runPISeries // C28 ASM function
|
||||||
#define DCL_runPI_C2 DCL_runPISeries
|
#define DCL_runPI_C2 DCL_runPISeries
|
||||||
#define DCL_runPI_C3 DCL_runPIParallel
|
#define DCL_runPI_C3 DCL_runPIParallel
|
||||||
#define DCL_runPI_C4 DCL_runPIParallel
|
#define DCL_runPI_C4 DCL_runPIParallel // C28 ASM function
|
||||||
#define DCL_runPI_C5 DCL_runPIParallelEnhanced
|
#define DCL_runPI_C5 DCL_runPIParallelEnhanced
|
||||||
#define DCL_runPI_C6 DCL_runPISeriesTustin
|
#define DCL_runPI_C6 DCL_runPISeriesTustin
|
||||||
#define DCL_runPI_C7 DCL_runPISeriesTustin
|
#define DCL_runPI_C7 DCL_runPISeriesTustin // C28 ASM function
|
||||||
|
#define DCL_fupdatePI DCL_updatePI // C28 ASM function
|
||||||
/*
|
/*
|
||||||
// C28 CLA Functions
|
// C28 CLA Functions
|
||||||
#define DCL_runPI_L1 DCL_runPISeries
|
#define DCL_runPI_L1 DCL_runPISeries
|
||||||
@ -69,15 +75,17 @@ extern "C" {
|
|||||||
// PI2
|
// PI2
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runPI2_C1 DCL_runPI2Series
|
#define DCL_runPI2_C1 DCL_runPI2Series
|
||||||
#define DCL_runPI2_C2 DCL_runPI2Series
|
#define DCL_runPI2_C2 DCL_runPI2Series // C28 ASM function
|
||||||
|
#define DCL_fupdatePI2 DCL_updatePI2 // C28 ASM function
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// PID
|
// PID
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runPID_C1 DCL_runPIDSeries
|
#define DCL_runPID_C1 DCL_runPIDSeries // C28 ASM function
|
||||||
#define DCL_runPID_C2 DCL_runPIDSeries
|
#define DCL_runPID_C2 DCL_runPIDSeries
|
||||||
#define DCL_runPID_C3 DCL_runPIDParallel
|
#define DCL_runPID_C3 DCL_runPIDParallel
|
||||||
#define DCL_runPID_C4 DCL_runPIDParallel
|
#define DCL_runPID_C4 DCL_runPIDParallel // C28 ASM function
|
||||||
|
#define DCL_fupdatePID DCL_updatePID // C28 ASM function
|
||||||
/*
|
/*
|
||||||
// C28 CLA Functions
|
// C28 CLA Functions
|
||||||
#define DCL_runPID_L1 DCL_runPIDSeries
|
#define DCL_runPID_L1 DCL_runPIDSeries
|
||||||
@ -89,8 +97,9 @@ extern "C" {
|
|||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// DF11
|
// DF11
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runDF11_C1 DCL_runDF11
|
#define DCL_runDF11_C1 DCL_runDF11 // C28 ASM function
|
||||||
#define DCL_runDF11_C2 DCL_runDF11
|
#define DCL_runDF11_C2 DCL_runDF11
|
||||||
|
#define DCL_fupdateDF11 DCL_updateDF11 // C28 ASM function
|
||||||
/*
|
/*
|
||||||
// C28 CLA Functions
|
// C28 CLA Functions
|
||||||
#define DCL_runDF11_L1 DCL_runDF11
|
#define DCL_runDF11_L1 DCL_runDF11
|
||||||
@ -99,31 +108,38 @@ extern "C" {
|
|||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// DF13
|
// DF13
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runDF13_C1 DCL_runDF13
|
/*
|
||||||
#define DCL_runDF13_C2 DCL_runDF13PartialCompute
|
* Note that due to incompatible changes with running DF13 w/ Clamp, the legacy
|
||||||
#define DCL_runDF13_C3 DCL_runDF13PartialUpdate
|
* implementation for both DCL_runDF13_C5 and DCL_runDF13_C6 are still included.
|
||||||
|
*
|
||||||
|
* It is advised to use the new function DCL_runDF13Clamp() for running DF13 w/ Clamp.
|
||||||
|
* For more info, refer to \details section of dcl_df13.h
|
||||||
|
*/
|
||||||
|
#define DCL_runDF13_C1 DCL_runDF13 // C28 ASM function
|
||||||
|
#define DCL_runDF13_C2 DCL_runDF13_C5 // Alias into local implementation of legacy function C5
|
||||||
|
#define DCL_runDF13_C3 DCL_runDF13_C6 // Alias into local implementation of legacy function C6
|
||||||
#define DCL_runDF13_C4 DCL_runDF13
|
#define DCL_runDF13_C4 DCL_runDF13
|
||||||
#define DCL_runDF13_C5 DCL_runDF13PartialCompute
|
#define DCL_fupdateDF13 DCL_updateDF13 // C28 ASM function
|
||||||
#define DCL_runDF13_C6 DCL_runDF13PartialUpdate
|
|
||||||
/*
|
/*
|
||||||
// C28 CLA Functions
|
// C28 CLA Functions
|
||||||
#define DCL_runDF13_L1 DCL_runDF13
|
#define DCL_runDF13_L1 DCL_runDF13
|
||||||
#define DCL_runDF13_L2 DCL_runDF13PartialCompute
|
#define DCL_runDF13_L2 DCL_runDF13_C5
|
||||||
#define DCL_runDF13_L3 DCL_runDF13PartialUpdate
|
#define DCL_runDF13_L3 DCL_runDF13_C6
|
||||||
#define DCL_runDF13_L4 DCL_runDF13
|
#define DCL_runDF13_L4 DCL_runDF13
|
||||||
#define DCL_runDF13_L5 DCL_runDF13PartialCompute
|
#define DCL_runDF13_L5 DCL_runDF13_C5
|
||||||
#define DCL_runDF13_L6 DCL_runDF13PartialUpdate
|
#define DCL_runDF13_L6 DCL_runDF13_C6
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// DF22
|
// DF22
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runDF22_C1 DCL_runDF22
|
#define DCL_runDF22_C1 DCL_runDF22 // C28 ASM function
|
||||||
#define DCL_runDF22_C2 DCL_runDF22PartialCompute
|
#define DCL_runDF22_C2 DCL_runDF22PartialCompute // C28 ASM function
|
||||||
#define DCL_runDF22_C3 DCL_runDF22PartialUpdate
|
#define DCL_runDF22_C3 DCL_runDF22PartialUpdate // C28 ASM function
|
||||||
#define DCL_runDF22_C4 DCL_runDF22
|
#define DCL_runDF22_C4 DCL_runDF22
|
||||||
#define DCL_runDF22_C5 DCL_runDF22PartialCompute
|
#define DCL_runDF22_C5 DCL_runDF22PartialCompute
|
||||||
#define DCL_runDF22_C6 DCL_runDF22PartialUpdate
|
#define DCL_runDF22_C6 DCL_runDF22PartialUpdate
|
||||||
|
#define DCL_fupdateDF22 DCL_updateDF22 // C28 ASM function
|
||||||
/*
|
/*
|
||||||
// C28 CLA Functions
|
// C28 CLA Functions
|
||||||
#define DCL_runDF22_L1 DCL_runDF22
|
#define DCL_runDF22_L1 DCL_runDF22
|
||||||
@ -135,12 +151,13 @@ extern "C" {
|
|||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// DF23
|
// DF23
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runDF23_C1 DCL_runDF23
|
#define DCL_runDF23_C1 DCL_runDF23 // C28 ASM function
|
||||||
#define DCL_runDF23_C2 DCL_runDF23PartialCompute
|
#define DCL_runDF23_C2 DCL_runDF23PartialCompute // C28 ASM function
|
||||||
#define DCL_runDF23_C3 DCL_runDF23PartialUpdate
|
#define DCL_runDF23_C3 DCL_runDF23PartialUpdate // C28 ASM function
|
||||||
#define DCL_runDF23_C4 DCL_runDF23
|
#define DCL_runDF23_C4 DCL_runDF23
|
||||||
#define DCL_runDF23_C5 DCL_runDF23PartialCompute
|
#define DCL_runDF23_C5 DCL_runDF23PartialCompute
|
||||||
#define DCL_runDF23_C6 DCL_runDF23PartialUpdate
|
#define DCL_runDF23_C6 DCL_runDF23PartialUpdate
|
||||||
|
#define DCL_fupdateDF23 DCL_updateDF23 // C28 ASM function
|
||||||
/*
|
/*
|
||||||
// C28 CLA Functions
|
// C28 CLA Functions
|
||||||
#define DCL_runDF23_L1 DCL_runDF23
|
#define DCL_runDF23_L1 DCL_runDF23
|
||||||
@ -151,7 +168,7 @@ extern "C" {
|
|||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
// Clamp
|
// Clamp
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runClamp_C1 DCL_runClamp
|
#define DCL_runClamp_C1 DCL_runClamp // C28 ASM function
|
||||||
#define DCL_runClamp_C2 DCL_runClamp
|
#define DCL_runClamp_C2 DCL_runClamp
|
||||||
#define DCL_runClamp_S1 DCL_runClampF64
|
#define DCL_runClamp_S1 DCL_runClampF64
|
||||||
/*
|
/*
|
||||||
@ -175,9 +192,9 @@ extern "C" {
|
|||||||
#define DCL_RESTORE_INTS DCL_restoreInts
|
#define DCL_RESTORE_INTS DCL_restoreInts
|
||||||
#define DCL_SET_CONTROLLER_PERIOD DCL_setControllerPeriod
|
#define DCL_SET_CONTROLLER_PERIOD DCL_setControllerPeriod
|
||||||
#define DCL_SET_SAMPLE_RATE DCL_setControllerPeriod
|
#define DCL_SET_SAMPLE_RATE DCL_setControllerPeriod
|
||||||
#define DCL_REQUEST_UPDATE DCL_setPendingStatus
|
#define DCL_REQUEST_UPDATE DCL_setUpdateStatus
|
||||||
#define DCL_CLEAR_UPDATE_REQUEST DCL_clearPendingStatus
|
#define DCL_CLEAR_UPDATE_REQUEST DCL_clearUpdateStatus
|
||||||
#define DCL_UPDATE_WAITING DCL_getPendingStatus
|
#define DCL_UPDATE_WAITING DCL_getUpdateStatus
|
||||||
#define DCL_CONTROLLER_BEGIN DCL_setControllerStatus
|
#define DCL_CONTROLLER_BEGIN DCL_setControllerStatus
|
||||||
#define DCL_CONTROLLER_END DCL_clearControllerStatus
|
#define DCL_CONTROLLER_END DCL_clearControllerStatus
|
||||||
#define DCL_CONTROLLER_IN_PROGRESS DCL_getControllerStatus
|
#define DCL_CONTROLLER_IN_PROGRESS DCL_getControllerStatus
|
||||||
@ -215,6 +232,8 @@ extern "C" {
|
|||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
#define DCL_runPIDF64_S1 DCL_runPIDF64Series
|
#define DCL_runPIDF64_S1 DCL_runPIDF64Series
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif // extern "C"
|
#endif // extern "C"
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
* from this software without specific prior written permission.
|
* from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPgResS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
* from this software without specific prior written permission.
|
* from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPgResS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
* from this software without specific prior written permission.
|
* from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPgResS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
@ -58,11 +58,13 @@ typedef struct dcl_pi_sps
|
|||||||
float32_t Ki; //!< Integral gain
|
float32_t Ki; //!< Integral gain
|
||||||
float32_t Umax; //!< Upper saturation limit
|
float32_t Umax; //!< Upper saturation limit
|
||||||
float32_t Umin; //!< Lower saturation limit
|
float32_t Umin; //!< Lower saturation limit
|
||||||
|
float32_t Imax; //!< Upper integrator saturation limit, only used in DCL_runPIParallelEnhanced()
|
||||||
|
float32_t Imin; //!< Lower integrator saturation limit, only used in DCL_runPIParallelEnhanced()
|
||||||
} DCL_PI_SPS;
|
} DCL_PI_SPS;
|
||||||
|
|
||||||
//! \brief Defines default values to initialize DCL_PI_SPS
|
//! \brief Defines default values to initialize DCL_PI_SPS
|
||||||
//!
|
//!
|
||||||
#define PI_SPS_DEFAULTS { 1.0f, 0.0f, 1.0f, -1.0f }
|
#define PI_SPS_DEFAULTS { 1.0f, 0.0f, 1.0f, -1.0f, 1.0f, -1.0f }
|
||||||
|
|
||||||
//! \brief DCL_PI object for storing PI specific parameters
|
//! \brief DCL_PI object for storing PI specific parameters
|
||||||
//!
|
//!
|
||||||
@ -73,6 +75,8 @@ typedef _DCL_VOLATILE struct dcl_pi
|
|||||||
float32_t Ki; //!< Integral gain
|
float32_t Ki; //!< Integral gain
|
||||||
float32_t Umax; //!< Upper control saturation limit
|
float32_t Umax; //!< Upper control saturation limit
|
||||||
float32_t Umin; //!< Lower control saturation limit
|
float32_t Umin; //!< Lower control saturation limit
|
||||||
|
float32_t Imax; //!< Upper integrator saturation limit, only used in DCL_runPIParallelEnhanced()
|
||||||
|
float32_t Imin; //!< Lower integrator saturation limit, only used in DCL_runPIParallelEnhanced()
|
||||||
|
|
||||||
/* internal storage */
|
/* internal storage */
|
||||||
float32_t i6; //!< Saturation storage
|
float32_t i6; //!< Saturation storage
|
||||||
@ -86,7 +90,7 @@ typedef _DCL_VOLATILE struct dcl_pi
|
|||||||
|
|
||||||
//! \brief Defines default values to initialize DCL_PI
|
//! \brief Defines default values to initialize DCL_PI
|
||||||
//!
|
//!
|
||||||
#define PI_DEFAULTS { 1.0f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, 0.0f, \
|
#define PI_DEFAULTS { 1.0f, 0.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 0.0f, \
|
||||||
&(DCL_PI_SPS)PI_SPS_DEFAULTS, &(DCL_CSS)DCL_CSS_DEFAULTS }
|
&(DCL_PI_SPS)PI_SPS_DEFAULTS, &(DCL_CSS)DCL_CSS_DEFAULTS }
|
||||||
|
|
||||||
//! \brief Macro for internal default values to initialize DCL_PI
|
//! \brief Macro for internal default values to initialize DCL_PI
|
||||||
@ -95,6 +99,8 @@ typedef _DCL_VOLATILE struct dcl_pi
|
|||||||
//! .Ki = 0.0f,
|
//! .Ki = 0.0f,
|
||||||
//! .Umax = 1.0f,
|
//! .Umax = 1.0f,
|
||||||
//! .Umin = -1.0f,
|
//! .Umin = -1.0f,
|
||||||
|
//! .Imax = 0.0f,
|
||||||
|
//! .Imin = 0.0f,
|
||||||
//! PI_INT_DEFAULTS
|
//! PI_INT_DEFAULTS
|
||||||
//! };
|
//! };
|
||||||
#define PI_INT_DEFAULTS .i6=1.0f, .i10=0.0f, .i11=0.0f, \
|
#define PI_INT_DEFAULTS .i6=1.0f, .i10=0.0f, .i11=0.0f, \
|
||||||
@ -133,7 +139,8 @@ typedef _DCL_VOLATILE struct dcl_pi
|
|||||||
if(sps_ptr) \
|
if(sps_ptr) \
|
||||||
{ \
|
{ \
|
||||||
*new_pi = (DCL_PI){ (new_sps)->Kp, (new_sps)->Ki, (new_sps)->Umax, (new_sps)->Umin,\
|
*new_pi = (DCL_PI){ (new_sps)->Kp, (new_sps)->Ki, (new_sps)->Umax, (new_sps)->Umin,\
|
||||||
1.0f, 0.0f, 0.0f, (DCL_PI_SPS*)new_sps, &(DCL_CSS)DCL_CSS_DEFAULTS }; \
|
(new_sps)->Imax, (new_sps)->Imin, 1.0f, 0.0f, 0.0f, \
|
||||||
|
(DCL_PI_SPS*)new_sps, &(DCL_CSS)DCL_CSS_DEFAULTS }; \
|
||||||
} \
|
} \
|
||||||
new_pi; \
|
new_pi; \
|
||||||
})
|
})
|
||||||
@ -145,24 +152,25 @@ typedef _DCL_VOLATILE struct dcl_pi
|
|||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_resetPI(DCL_PI *pi)
|
void DCL_resetPI(DCL_PI *pi)
|
||||||
{
|
{
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
dcl_interrupt_t ints;
|
||||||
|
ints = DCL_disableInts();
|
||||||
pi->i6 = 1.0f;
|
pi->i6 = 1.0f;
|
||||||
pi->i10 = pi->i11 = 0.0f;
|
pi->i10 = pi->i11 = 0.0f;
|
||||||
DCL_restoreInts(ints);
|
DCL_restoreInts(ints);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Loads PI tuning parameter from its SPS parameter
|
//! \brief Loads PI tuning parameter from its SPS parameter without interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] pi Pointer to the DCL_PI controller structure
|
//! \param[in] pi Pointer to the DCL_PI controller structure
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS
|
_DCL_CODE_ACCESS
|
||||||
void DCL_fupdatePI(DCL_PI *pi)
|
void DCL_forceUpdatePI(DCL_PI *pi)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef DCL_ERROR_HANDLING_ENABLED
|
#ifdef DCL_ERROR_HANDLING_ENABLED
|
||||||
uint32_t err_code = dcl_none;
|
uint32_t err_code = dcl_none;
|
||||||
err_code |= (pi->sps->Umax <= pi->sps->Umin) ? dcl_param_invalid_err : dcl_none;
|
err_code |= (pi->sps->Umax <= pi->sps->Umin) ? dcl_param_invalid_err : dcl_none;
|
||||||
err_code |= (pi->css->t_sec <= 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (pi->css->T <= 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (pi->sps->Kp < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (pi->sps->Kp < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (pi->sps->Ki < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (pi->sps->Ki < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
if (err_code)
|
if (err_code)
|
||||||
@ -177,21 +185,22 @@ void DCL_fupdatePI(DCL_PI *pi)
|
|||||||
pi->Ki = pi->sps->Ki;
|
pi->Ki = pi->sps->Ki;
|
||||||
pi->Umax = pi->sps->Umax;
|
pi->Umax = pi->sps->Umax;
|
||||||
pi->Umin = pi->sps->Umin;
|
pi->Umin = pi->sps->Umin;
|
||||||
|
pi->Imax = pi->sps->Imax;
|
||||||
|
pi->Imin = pi->sps->Imin;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Updates PI parameter from its SPS parameter with interrupt protection
|
//! \brief Loads PI tuning parameter from its SPS parameter with interrupt protection
|
||||||
//!
|
//!
|
||||||
//! \param[in] pi Pointer to the DCL_PI controller structure
|
//! \param[in] pi Pointer to the DCL_PI controller structure
|
||||||
//! \return 'true' if update is successful, otherwise 'false'
|
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_updatePI(DCL_PI *pi)
|
void DCL_updatePINoCheck(DCL_PI *pi)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef DCL_ERROR_HANDLING_ENABLED
|
#ifdef DCL_ERROR_HANDLING_ENABLED
|
||||||
uint32_t err_code = dcl_none;
|
uint32_t err_code = dcl_none;
|
||||||
err_code |= (pi->sps->Umax <= pi->sps->Umin) ? dcl_param_invalid_err : dcl_none;
|
err_code |= (pi->sps->Umax <= pi->sps->Umin) ? dcl_param_invalid_err : dcl_none;
|
||||||
err_code |= (pi->css->t_sec <= 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (pi->css->T <= 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (pi->sps->Kp < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (pi->sps->Kp < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (pi->sps->Ki < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (pi->sps->Ki < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
if (err_code)
|
if (err_code)
|
||||||
@ -202,56 +211,39 @@ bool DCL_updatePI(DCL_PI *pi)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!DCL_getUpdateStatus(pi))
|
dcl_interrupt_t ints;
|
||||||
{
|
ints = DCL_disableInts();
|
||||||
dcl_interrupt_t ints = DCL_disableInts();
|
pi->Kp = pi->sps->Kp;
|
||||||
DCL_setUpdateStatus(pi);
|
pi->Ki = pi->sps->Ki;
|
||||||
pi->Kp = pi->sps->Kp;
|
pi->Umax = pi->sps->Umax;
|
||||||
pi->Ki = pi->sps->Ki;
|
pi->Umin = pi->sps->Umin;
|
||||||
pi->Umax = pi->sps->Umax;
|
pi->Imax = pi->sps->Imax;
|
||||||
pi->Umin = pi->sps->Umin;
|
pi->Imin = pi->sps->Imin;
|
||||||
DCL_clearUpdateStatus(pi);
|
DCL_restoreInts(ints);
|
||||||
DCL_restoreInts(ints);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief A conditional update based on the pending-for-update flag.
|
//! \brief A conditional update based on the update flag.
|
||||||
//! If the pending status is set, the function will update PI
|
//! If the update status is set, the function will update PI
|
||||||
//! parameter from its SPS parameter and clear the status flag on completion.
|
//! parameter from its SPS parameter and clear the status flag on completion.
|
||||||
//! Note: Use DCL_setPendingStatus(pi) to set the pending status.
|
//! Note: Use DCL_setUpdateStatus(pi) to set the update status.
|
||||||
//!
|
//!
|
||||||
//! \param[in] pi Pointer to the DCL_PI controller structure
|
//! \param[in] pi Pointer to the DCL_PI controller structure
|
||||||
//! \return 'true' if an update is applied, otherwise 'false'
|
//! \return 'true' if an update is applied, otherwise 'false'
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
bool DCL_pendingUpdatePI(DCL_PI *pi)
|
bool DCL_updatePI(DCL_PI *pi)
|
||||||
{
|
{
|
||||||
if (DCL_getPendingStatus(pi) && DCL_updatePI(pi))
|
if (DCL_getUpdateStatus(pi))
|
||||||
{
|
{
|
||||||
DCL_clearPendingStatus(pi);
|
DCL_updatePINoCheck(pi);
|
||||||
|
DCL_clearUpdateStatus(pi);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Update SPS parameter with active param, userful when needing
|
|
||||||
//! to update only few active param from SPS and keep rest the same
|
|
||||||
//!
|
|
||||||
//! \param[in] pi Pointer to the active DCL_PI controller structure
|
|
||||||
//!
|
|
||||||
_DCL_CODE_ACCESS
|
|
||||||
void DCL_updatePISPS(DCL_PI *pi)
|
|
||||||
{
|
|
||||||
pi->sps->Kp = pi->Kp;
|
|
||||||
pi->sps->Ki = pi->Ki;
|
|
||||||
pi->sps->Umax = pi->Umax;
|
|
||||||
pi->sps->Umin = pi->Umin;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! \brief Configures a series PI controller in "zero-pole-gain" form
|
//! \brief Configures a series PI controller in "zero-pole-gain" form
|
||||||
//! Note: Sampling period pi->css->t_sec are used in the calculation.
|
//! Note: Sampling period pi->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updatePI().
|
//! New settings take effect after DCL_updatePI().
|
||||||
//! Only z1 considered in DCL_ZPK3, other poles & zeros ignored.
|
//! Only z1 considered in DCL_ZPK3, other poles & zeros ignored.
|
||||||
//! Zero frequency assumed to be in radians/sec.
|
//! Zero frequency assumed to be in radians/sec.
|
||||||
@ -265,7 +257,7 @@ void DCL_loadSeriesPIasZPK(DCL_PI *pi, DCL_ZPK3 *zpk)
|
|||||||
#ifdef DCL_ERROR_HANDLING_ENABLED
|
#ifdef DCL_ERROR_HANDLING_ENABLED
|
||||||
uint32_t err_code = dcl_none;
|
uint32_t err_code = dcl_none;
|
||||||
err_code |= (zpk->K < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (zpk->K < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (crealf(zpk->z1) > (1.0f / (2.0f * pi->css->t_sec))) ? dcl_param_warn_err : dcl_none;
|
err_code |= (crealf(zpk->z1) > (1.0f / (2.0f * pi->css->T))) ? dcl_param_warn_err : dcl_none;
|
||||||
if (err_code)
|
if (err_code)
|
||||||
{
|
{
|
||||||
DCL_setError(pi,err_code);
|
DCL_setError(pi,err_code);
|
||||||
@ -274,15 +266,15 @@ void DCL_loadSeriesPIasZPK(DCL_PI *pi, DCL_ZPK3 *zpk)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float32_t t_sec = pi->css->t_sec;
|
float32_t T = pi->css->T;
|
||||||
float32_t z1 = (float32_t) crealf(zpk->z1);
|
float32_t z1 = (float32_t) crealf(zpk->z1);
|
||||||
pi->sps->Kp = zpk->K * (1.0f + (t_sec * z1) / 2.0f);
|
pi->sps->Kp = zpk->K * (1.0f + (T * z1) / 2.0f);
|
||||||
pi->sps->Ki = (-2.0f * t_sec * z1) / (2.0f + (t_sec * z1));
|
pi->sps->Ki = (-2.0f * T * z1) / (2.0f + (T * z1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Configures a parallel PI controller in "zero-pole-gain" form
|
//! \brief Configures a parallel PI controller in "zero-pole-gain" form
|
||||||
//! Note: Sampling period pi->css->t_sec are used in the calculation.
|
//! Note: Sampling period pi->css->T are used in the calculation.
|
||||||
//! New settings take effect after DCL_updatePI().
|
//! New settings take effect after DCL_updatePI().
|
||||||
//! Zero frequency assumed to be in radians/sec.
|
//! Zero frequency assumed to be in radians/sec.
|
||||||
//!
|
//!
|
||||||
@ -295,7 +287,7 @@ void DCL_loadParallelPIasZPK(DCL_PI *pi, DCL_ZPK3 *zpk)
|
|||||||
#ifdef DCL_ERROR_HANDLING_ENABLED
|
#ifdef DCL_ERROR_HANDLING_ENABLED
|
||||||
uint32_t err_code = dcl_none;
|
uint32_t err_code = dcl_none;
|
||||||
err_code |= (zpk->K < 0.0f) ? dcl_param_range_err : dcl_none;
|
err_code |= (zpk->K < 0.0f) ? dcl_param_range_err : dcl_none;
|
||||||
err_code |= (crealf(zpk->z1) > (1.0f / (2.0f * pi->css->t_sec))) ? dcl_param_warn_err : dcl_none;
|
err_code |= (crealf(zpk->z1) > (1.0f / (2.0f * pi->css->T))) ? dcl_param_warn_err : dcl_none;
|
||||||
if (err_code)
|
if (err_code)
|
||||||
{
|
{
|
||||||
DCL_setError(pi,err_code);
|
DCL_setError(pi,err_code);
|
||||||
@ -304,10 +296,10 @@ void DCL_loadParallelPIasZPK(DCL_PI *pi, DCL_ZPK3 *zpk)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float32_t t_sec = pi->css->t_sec;
|
float32_t T = pi->css->T;
|
||||||
float32_t z1 = (float32_t) crealf(zpk->z1);
|
float32_t z1 = (float32_t) crealf(zpk->z1);
|
||||||
pi->sps->Kp = zpk->K * (1.0f + (t_sec * z1) / 2.0f);
|
pi->sps->Kp = zpk->K * (1.0f + (T * z1) / 2.0f);
|
||||||
pi->sps->Ki = -zpk->K * t_sec * z1;
|
pi->sps->Ki = -zpk->K * T * z1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Executes an inline series form PI controller
|
//! \brief Executes an inline series form PI controller
|
||||||
@ -371,12 +363,10 @@ float32_t DCL_runPIParallel(DCL_PI *pi, float32_t rk, float32_t yk)
|
|||||||
//! \param[in] pi Pointer to the DCL_PI structure
|
//! \param[in] pi Pointer to the DCL_PI structure
|
||||||
//! \param[in] rk The controller set-point reference
|
//! \param[in] rk The controller set-point reference
|
||||||
//! \param[in] yk The measured feedback value
|
//! \param[in] yk The measured feedback value
|
||||||
//! \param[in] Imax Upper integrator saturation limit
|
|
||||||
//! \param[in] Imin Lower integrator saturation limit
|
|
||||||
//! \return The control effort
|
//! \return The control effort
|
||||||
//!
|
//!
|
||||||
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
_DCL_CODE_ACCESS _DCL_CODE_SECTION
|
||||||
float32_t DCL_runPIParallelEnhanced(DCL_PI *pi, float32_t rk, float32_t yk, float32_t Imax, float32_t Imin)
|
float32_t DCL_runPIParallelEnhanced(DCL_PI *pi, float32_t rk, float32_t yk)
|
||||||
{
|
{
|
||||||
float32_t v1, v5, v7, v8;
|
float32_t v1, v5, v7, v8;
|
||||||
bool l11, l14, l17, l18, l19;
|
bool l11, l14, l17, l18, l19;
|
||||||
@ -387,7 +377,7 @@ float32_t DCL_runPIParallelEnhanced(DCL_PI *pi, float32_t rk, float32_t yk, floa
|
|||||||
v7 = (v1 * pi->Kp) + v5;
|
v7 = (v1 * pi->Kp) + v5;
|
||||||
v8 = DCL_runSat(v7, pi->Umax, pi->Umin);
|
v8 = DCL_runSat(v7, pi->Umax, pi->Umin);
|
||||||
l17 = (v7 == v8) ? true : false;
|
l17 = (v7 == v8) ? true : false;
|
||||||
l11 = (DCL_runSat(v5,Imax,Imin) == v5) ? true : false;
|
l11 = (DCL_runSat(v5, pi->Imax, pi->Imin) == v5) ? true : false;
|
||||||
l19 = (v5 > 0) ? true : false;
|
l19 = (v5 > 0) ? true : false;
|
||||||
l14 = (v1 > 0) ? true : false;
|
l14 = (v1 > 0) ? true : false;
|
||||||
l18 = l17 && (!l11 || (l19 ^ l14));
|
l18 = l17 && (!l11 || (l19 ^ l14));
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user