As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com.

Changes

Jump to: navigation, search

CW308T-STM32F

87 bytes added, 17:00, 8 February 2018
Hardware AES
== Hardware AES ==
The STM32F21x, and STM32F41x/43x have hardware crypto modules (AES, DES, TDES) along with hardware hash (SHA1, MD5). Hardware crypto for the STM32F4 has been integrated into the Hal build system on the develop branch. To use the hardware crypto, call HW_AES128_Init() at the beginning of your program. You can update the key with HW_AES128_LoadKey(), encrypt plaintext with HW_AES128_Enc(), and decrypt data with HW_AES128_Dec().
== CAN Connection ==
To build the ChipWhisperer examples in System Workbench:
1. Create a ''Makefile C Ac6 STM32 MCU Project with Existing Code.'' When you get to Target Configuration, click the Mcu tab and enter select the firmware's location microcontroller that you want to target (in Existing Code Locationthis case, the STM32F415RGTx):
[[File:Stm32-st-1STM32 New Project.pngPNG|400px]]
2. Link the external files into the project. To do this, under ''[[File > Import'', select ''File System'':STM32 MCU-Selection. In the `chipwhisperer\hardware\victims\firmware` directory, select all of the relevant files and folders (Makefile in base folder, Makefile in HAL folder, STM32Fx HAL folder). Ensure that make links to these files (instead of directly importing them):PNG|400px]]
[[File:Stm32-st-2.png]]Link the external files into the project. To do this, under ''File > Import'', select ''File System''. In the `chipwhisperer\hardware\victims\firmware` directory, select all of the relevant files and folders (Makefile in base folder, Makefile in HAL folder, STM32Fx HAL folder).:
3. Set up the build command. In ''[[File > Properties'', go to ''C/C++ Build'' and deselect 'Use default build command':STM32 Import. Enter the command you would normally enter on the command line:PNG|400px]]
3. Set up the build command. In ''File > Properties'', go to ''C/C++ Build > Behavior'' and remove 'all''<nowiki/>''' from 'Build'. Next, click the ''Builder Settings'' tab and deselect 'Use default build command' and 'Generate Makefiles Automatically'. Enter the command you would normally enter on the command line and change 'Build directory' to the folder you want to build in: [[File:Stm32STM32 Behaviour.PNG|400px]] [[File:STM32 Build-st-3Settings.pngPNG|400px]]
4. Build the project and confirm that the build works from the output in the IDE console.
Then, if you want to set up debugging:
1. Find STGo to 's list of debugging targets (check around `C:\STMicro\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.debug_1.12.1.201703061527\resources\openocd\scripts\board`). Make a config file for your target. This file's contents should be something like (adjust for your board):<prein File ># This is an CW308T_STM32F0 board with a single STM32F071R8Tx chip.# Generated by System Workbench for STM32 source [find ../interface/stlink-v2-1.cfg] set WORKAREASIZE 0x2000transport select "hla_swd" set CHIPNAME STM32F071R8Tx source [find ../target/stm32f0x_stlink.cfg] # use hardware reset, connect under resetreset_config srst_only srst_nogate</pre> 2. In Properties''select Run > /Debug Configurations'', make Settings and create a new ''Ac6 STM32 Debugging'' debug configuration. Under the 'Debugger' tab, select click 'Show generator options...'Use local scriptand setup your Connection Setup based on your debugger. Change 'Reset Mode'to 'Software System reset' and select your custom script:
[[File:Stm32-st-4STM32 Debugging.pngPNG|400px]]
32. Enter Click Apply and enter debugging mode.
'''Caveat''': the I/O register map in the debugger appears to use the last known device (ie: if you debugged an STM32F4 project before your Makefile project, it sticks with F4's registers). Check that the registers' addresses are correct before you trust them!
Approved_users, administrator
366
edits

Navigation menu