Skip to content

Commit

Permalink
update: demo project
Browse files Browse the repository at this point in the history
  • Loading branch information
KafCoppelia committed Aug 30, 2022
1 parent 53f0283 commit 6f0ad00
Show file tree
Hide file tree
Showing 551 changed files with 429,518 additions and 0 deletions.
408 changes: 408 additions & 0 deletions Configurations/Debug/sync_on_halt.c

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions Configurations/Ifx_Cfg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**********************************************************************************************************************
* \file Ifx_Cfg.h
* \brief Project configuration file.
* \copyright Copyright (C) Infineon Technologies AG 2019
*
* Use of this file is subject to the terms of use agreed between (i) you or the company in which ordinary course of
* business you are acting and (ii) Infineon Technologies AG or its licensees. If and as long as no such terms of use
* are agreed, use of this file is subject to following:
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and
* accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute,
* and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the
* Software is furnished to do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including the above license grant, this restriction
* and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all
* derivative works of the Software, unless such copies or derivative works are solely in the form of
* machine-executable object code generated by a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*********************************************************************************************************************/

#ifndef IFX_CFG_H
#define IFX_CFG_H 1

/*********************************************************************************************************************/
/*------------------------------------------Configuration for IfxScu_cfg.h-------------------------------------------*/
/*********************************************************************************************************************/
/* External oscillator frequency in Hz */
#define IFX_CFG_SCU_XTAL_FREQUENCY (20000000) /* Allowed values are: 16000000, 20000000 or 40000000 */
/* PLL frequency in Hz */
#define IFX_CFG_SCU_PLL_FREQUENCY (200000000) /* Allowed values are: 80000000, 133000000, 160000000
* or 200000000 */

/*********************************************************************************************************************/
/*-----------------------------------Configuration for Software managed interrupt------------------------------------*/
/*********************************************************************************************************************/
/* #define IFX_USE_SW_MANAGED_INT */ /* Decomment this line if the project needs to use Software managed interrupts */

/*********************************************************************************************************************/
/*---------------------------------Configuration for Trap Hook Functions' Extensions---------------------------------*/
/*********************************************************************************************************************/
/* #define IFX_CFG_EXTEND_TRAP_HOOKS */ /* Decomment this line if the project needs to extend trap hook functions */

#endif /* IFX_CFG_H */
59 changes: 59 additions & 0 deletions Cpu0_Main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**********************************************************************************************************************
* \file Cpu0_Main.c
* \copyright Copyright (C) Infineon Technologies AG 2019
*
* Use of this file is subject to the terms of use agreed between (i) you or the company in which ordinary course of
* business you are acting and (ii) Infineon Technologies AG or its licensees. If and as long as no such terms of use
* are agreed, use of this file is subject to following:
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and
* accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute,
* and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the
* Software is furnished to do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including the above license grant, this restriction
* and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all
* derivative works of the Software, unless such copies or derivative works are solely in the form of
* machine-executable object code generated by a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*********************************************************************************************************************/
#include <bsp_led_button.h>
#include <bsp_stm.h>
#include <scu_sleep.h>
#include <bsp_uart.h>
#include "Ifx_Types.h"
#include "IfxCpu.h"
#include "IfxScuWdt.h"

IfxCpu_syncEvent g_cpuSyncEvent = 0;

int core0_main(void)
{
IfxCpu_enableInterrupts();

/* !!WATCHDOG0 AND SAFETY WATCHDOG ARE DISABLED HERE!!
* Enable the watchdogs and service them periodically if it is required
*/
IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword());
IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafetyWatchdogPassword());

/* Wait for CPU sync event */
IfxCpu_emitEvent(&g_cpuSyncEvent);
IfxCpu_waitEvent(&g_cpuSyncEvent, 1);

init_GPIOs();
initStm0();
Cpu0_req_sleep();

while(1)
{
}
return (1);
}
62 changes: 62 additions & 0 deletions Cpu1_Main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**********************************************************************************************************************
* \file Cpu1_Main.c
* \copyright Copyright (C) Infineon Technologies AG 2019
*
* Use of this file is subject to the terms of use agreed between (i) you or the company in which ordinary course of
* business you are acting and (ii) Infineon Technologies AG or its licensees. If and as long as no such terms of use
* are agreed, use of this file is subject to following:
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and
* accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute,
* and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the
* Software is furnished to do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including the above license grant, this restriction
* and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all
* derivative works of the Software, unless such copies or derivative works are solely in the form of
* machine-executable object code generated by a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*********************************************************************************************************************/
#include "Ifx_Types.h"
#include "IfxCpu.h"
#include "IfxScuWdt.h"
#include <scu_sleep.h>
#include <bsp_stm.h>
#include <bsp_led_button.h>

extern IfxCpu_syncEvent g_cpuSyncEvent;

int core1_main(void)
{
IfxCpu_enableInterrupts();

/* !!WATCHDOG1 IS DISABLED HERE!!
* Enable the watchdog and service it periodically if it is required
*/
IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword());

/* Wait for CPU sync event */
IfxCpu_emitEvent(&g_cpuSyncEvent);
IfxCpu_waitEvent(&g_cpuSyncEvent, 1);

IfxCpu_setCoreMode(&MODULE_CPU1, IfxCpu_CoreMode_idle);

while(1)
{
if (_flag1 == TRUE)
{
_flag1 = FALSE;
led_toggle(LED1);
runStm1();
IfxCpu_setCoreMode(&MODULE_CPU1, IfxCpu_CoreMode_idle);
}
}
return (1);
}
56 changes: 56 additions & 0 deletions Cpu2_Main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**********************************************************************************************************************
* \file Cpu2_Main.c
* \copyright Copyright (C) Infineon Technologies AG 2019
*
* Use of this file is subject to the terms of use agreed between (i) you or the company in which ordinary course of
* business you are acting and (ii) Infineon Technologies AG or its licensees. If and as long as no such terms of use
* are agreed, use of this file is subject to following:
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and
* accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute,
* and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the
* Software is furnished to do so, all subject to the following:
*
* The copyright notices in the Software and this entire statement, including the above license grant, this restriction
* and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all
* derivative works of the Software, unless such copies or derivative works are solely in the form of
* machine-executable object code generated by a source language processor.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*********************************************************************************************************************/
#include "Ifx_Types.h"
#include "IfxCpu.h"
#include "IfxScuWdt.h"
#include <scu_sleep.h>
#include <bsp_led_button.h>
#include <bsp_stm.h>

extern IfxCpu_syncEvent g_cpuSyncEvent;

int core2_main(void)
{
IfxCpu_enableInterrupts();

/* !!WATCHDOG2 IS DISABLED HERE!!
* Enable the watchdog and service it periodically if it is required
*/
IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword());

/* Wait for CPU sync event */
IfxCpu_emitEvent(&g_cpuSyncEvent);
IfxCpu_waitEvent(&g_cpuSyncEvent, 1);

initStm1();
IfxCpu_setCoreMode(&MODULE_CPU2, IfxCpu_CoreMode_idle);

while(1)
{
}
return (1);
}
34 changes: 34 additions & 0 deletions Debug/Configurations/Debug/subdir.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../Configurations/Debug/sync_on_halt.c

OBJS += \
./Configurations/Debug/sync_on_halt.o

COMPILED_SRCS += \
./Configurations/Debug/sync_on_halt.src

C_DEPS += \
./Configurations/Debug/sync_on_halt.d


# Each subdirectory must supply rules for building sources it contributes
Configurations/Debug/%.src: ../Configurations/Debug/%.c Configurations/Debug/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: TASKING C/C++ Compiler'
cctc -D__CPU__=tc27xd "-fC:/Users/74067/AURIX-v1.7.2-workspace/demo/Debug/TASKING_C_C___Compiler-Include_paths.opt" --iso=99 --c++14 --language=+volatile --exceptions --anachronisms --fp-model=3 -O0 --tradeoff=4 --compact-max-size=200 -g -Wc-w544 -Wc-w557 -Ctc27xd -o "$@" "$<" -cs --dep-file="$(@:.src=.d)" --misrac-version=2012 -N0 -Z0 -Y0 2>&1;
@echo 'Finished building: $<'
@echo ' '

Configurations/Debug/%.o: ./Configurations/Debug/%.src Configurations/Debug/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: TASKING Assembler'
astc -Og -Os --no-warnings= --error-limit=42 -o "$@" "$<" --list-format=L1 --optimize=gs
@echo 'Finished building: $<'
@echo ' '


46 changes: 46 additions & 0 deletions Debug/Libraries/Infra/Platform/Tricore/Compilers/subdir.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../Libraries/Infra/Platform/Tricore/Compilers/CompilerDcc.c \
../Libraries/Infra/Platform/Tricore/Compilers/CompilerGhs.c \
../Libraries/Infra/Platform/Tricore/Compilers/CompilerGnuc.c \
../Libraries/Infra/Platform/Tricore/Compilers/CompilerTasking.c

OBJS += \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerDcc.o \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerGhs.o \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerGnuc.o \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerTasking.o

COMPILED_SRCS += \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerDcc.src \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerGhs.src \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerGnuc.src \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerTasking.src

C_DEPS += \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerDcc.d \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerGhs.d \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerGnuc.d \
./Libraries/Infra/Platform/Tricore/Compilers/CompilerTasking.d


# Each subdirectory must supply rules for building sources it contributes
Libraries/Infra/Platform/Tricore/Compilers/%.src: ../Libraries/Infra/Platform/Tricore/Compilers/%.c Libraries/Infra/Platform/Tricore/Compilers/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: TASKING C/C++ Compiler'
cctc -D__CPU__=tc27xd "-fC:/Users/74067/AURIX-v1.7.2-workspace/demo/Debug/TASKING_C_C___Compiler-Include_paths.opt" --iso=99 --c++14 --language=+volatile --exceptions --anachronisms --fp-model=3 -O0 --tradeoff=4 --compact-max-size=200 -g -Wc-w544 -Wc-w557 -Ctc27xd -o "$@" "$<" -cs --dep-file="$(@:.src=.d)" --misrac-version=2012 -N0 -Z0 -Y0 2>&1;
@echo 'Finished building: $<'
@echo ' '

Libraries/Infra/Platform/Tricore/Compilers/%.o: ./Libraries/Infra/Platform/Tricore/Compilers/%.src Libraries/Infra/Platform/Tricore/Compilers/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: TASKING Assembler'
astc -Og -Os --no-warnings= --error-limit=42 -o "$@" "$<" --list-format=L1 --optimize=gs
@echo 'Finished building: $<'
@echo ' '


46 changes: 46 additions & 0 deletions Debug/Libraries/Service/CpuGeneric/StdIf/subdir.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../Libraries/Service/CpuGeneric/StdIf/IfxStdIf_DPipe.c \
../Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Pos.c \
../Libraries/Service/CpuGeneric/StdIf/IfxStdIf_PwmHl.c \
../Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Timer.c

OBJS += \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_DPipe.o \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Pos.o \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_PwmHl.o \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Timer.o

COMPILED_SRCS += \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_DPipe.src \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Pos.src \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_PwmHl.src \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Timer.src

C_DEPS += \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_DPipe.d \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Pos.d \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_PwmHl.d \
./Libraries/Service/CpuGeneric/StdIf/IfxStdIf_Timer.d


# Each subdirectory must supply rules for building sources it contributes
Libraries/Service/CpuGeneric/StdIf/%.src: ../Libraries/Service/CpuGeneric/StdIf/%.c Libraries/Service/CpuGeneric/StdIf/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: TASKING C/C++ Compiler'
cctc -D__CPU__=tc27xd "-fC:/Users/74067/AURIX-v1.7.2-workspace/demo/Debug/TASKING_C_C___Compiler-Include_paths.opt" --iso=99 --c++14 --language=+volatile --exceptions --anachronisms --fp-model=3 -O0 --tradeoff=4 --compact-max-size=200 -g -Wc-w544 -Wc-w557 -Ctc27xd -o "$@" "$<" -cs --dep-file="$(@:.src=.d)" --misrac-version=2012 -N0 -Z0 -Y0 2>&1;
@echo 'Finished building: $<'
@echo ' '

Libraries/Service/CpuGeneric/StdIf/%.o: ./Libraries/Service/CpuGeneric/StdIf/%.src Libraries/Service/CpuGeneric/StdIf/subdir.mk
@echo 'Building file: $<'
@echo 'Invoking: TASKING Assembler'
astc -Og -Os --no-warnings= --error-limit=42 -o "$@" "$<" --list-format=L1 --optimize=gs
@echo 'Finished building: $<'
@echo ' '


Loading

0 comments on commit 6f0ad00

Please sign in to comment.