-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- support for wolfHSM ML-DSA on simulator and AURIX (DMA only)
- consolidate AURIX scripts into wbaurixtool.sh - documentation updates
- Loading branch information
Showing
28 changed files
with
3,398 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>test-app-wolfHSM</name> | ||
<comment></comment> | ||
<projects> | ||
<project>wolfBoot-tc3xx-wolfHSM</project> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.infineon.aurix.buildsystem.builders.booster</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.infineon.aurix.buildsystem.builders.autodiscovery</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<triggers>clean,full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>com.infineon.aurix.buildsystem.aurixnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
</natures> | ||
<linkedResources> | ||
<link> | ||
<name>Configurations</name> | ||
<type>2</type> | ||
<locationURI>SDK_CONFIGURATION_DIR</locationURI> | ||
</link> | ||
<link> | ||
<name>Libraries</name> | ||
<type>2</type> | ||
<locationURI>SDK_DIR</locationURI> | ||
</link> | ||
</linkedResources> | ||
<variableList> | ||
<variable> | ||
<name>SDK_CONFIGURATION_DIR</name> | ||
<value>$%7BPARENT-1-PROJECT_LOC%7D/Configurations</value> | ||
</variable> | ||
<variable> | ||
<name>SDK_DIR</name> | ||
<value>$%7BPARENT-1-PROJECT_LOC%7D/SDK</value> | ||
</variable> | ||
</variableList> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* Cpu0_Main.c | ||
* | ||
* Copyright (C) 2014-2024 wolfSSL Inc. | ||
* | ||
* This file is part of wolfBoot. | ||
* | ||
* wolfBoot is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* wolfBoot is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with wolfBoot. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include "Bsp.h" | ||
#include "IfxCpu.h" | ||
#include "IfxPort.h" | ||
#include "IfxScuWdt.h" | ||
#include "Ifx_Types.h" | ||
#include "wolfboot/wolfboot.h" | ||
|
||
IFX_ALIGN(4) IfxCpu_syncEvent g_cpuSyncEvent = 0; | ||
|
||
|
||
#define LED &MODULE_P00, 5 /* LED: Port, Pin definition */ | ||
#define BLINK_TIME_BASE 500 /* Wait time constant in milliseconds */ | ||
#define BLINK_TIME_UPDATE 100 /* Wait time constant in milliseconds */ | ||
|
||
#define BASE_FW_VERSION 1 | ||
|
||
/* This function initializes the port pin which drives the LED */ | ||
static void initLED(void) | ||
{ | ||
/* Initialization of the LED used in this example */ | ||
IfxPort_setPinModeOutput(LED, | ||
IfxPort_OutputMode_pushPull, | ||
IfxPort_OutputIdx_general); | ||
|
||
/* Switch OFF the LED (low-level active) */ | ||
IfxPort_setPinLow(LED); | ||
} | ||
|
||
void core0_main(void) | ||
{ | ||
size_t blinkTime; | ||
|
||
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); | ||
|
||
initLED(); | ||
|
||
if (wolfBoot_current_firmware_version() <= BASE_FW_VERSION) { | ||
/* We are booting into the base firmware, so stage the update and set | ||
* the LED to blink slow */ | ||
wolfBoot_update_trigger(); | ||
blinkTime = BLINK_TIME_BASE; | ||
} | ||
else { | ||
/* we are booting into the updated firmware so acknowledge the update | ||
* (to prevent rollback) and set the LED to blink fast */ | ||
wolfBoot_success(); | ||
blinkTime = BLINK_TIME_UPDATE; | ||
} | ||
|
||
while (1) { | ||
IfxPort_togglePin(LED); | ||
waitTime(IfxStm_getTicksFromMilliseconds(BSP_DEFAULT_TIMER, blinkTime)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* Cpu1_Main.c | ||
* | ||
* Copyright (C) 2014-2024 wolfSSL Inc. | ||
* | ||
* This file is part of wolfBoot. | ||
* | ||
* wolfBoot is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* wolfBoot is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with wolfBoot. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include "Ifx_Types.h" | ||
#include "IfxCpu.h" | ||
#include "IfxScuWdt.h" | ||
|
||
extern IfxCpu_syncEvent g_cpuSyncEvent; | ||
|
||
void 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); | ||
|
||
while(1) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* Cpu2_Main.c | ||
* | ||
* Copyright (C) 2014-2024 wolfSSL Inc. | ||
* | ||
* This file is part of wolfBoot. | ||
* | ||
* wolfBoot is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* wolfBoot is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with wolfBoot. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include "Ifx_Types.h" | ||
#include "IfxCpu.h" | ||
#include "IfxScuWdt.h" | ||
|
||
extern IfxCpu_syncEvent g_cpuSyncEvent; | ||
|
||
void 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); | ||
|
||
while(1) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.