Changes

CW308T-STM32F

2,653 bytes removed, 18:07, 11 March 2020
Example Projects
|content= CW308T-STM32F/ChipWhisperer_Bootloader}}
{{CollapsibleSection|intro = === Running ST Example with ST-Link ===If instead of using the bootloader, you want to use a ST|content= CW308T-Link you can instead plug your programmer into the 20 pin JTAG connector (J6 on the UFO board):STM32F/ST_Link}}
[[File:Stm32-jtag.jpg{{CollapsibleSection|600px]] Then, the details of this step will depend on your programmer. If you're using an ST-Link programmer, open the ST-Link utility and connect to the device: [[File:Stm32-connect.png]] Load your `.hex` file and program the device with the Program and Verify button: [[File:Stm32-program.png]] After this, you're ready to go - you can use the ChipWhisperer terminal to talk to your target. You might need to reset the target before you do anything else. intro = === Building and Debugging via ST's System Workbench ===It's also possible to work on the example projects using [http://www.st.com/en/development-tools/sw4stm32.html ST's System Workbench IDE]. This IDE also supports debugging, which is helpful for working out all the kinks in your firmware. To build the ChipWhisperer examples in System Workbench: 1. Create a new Mcu project by going to ''File > New > C Project'' and selecting ''<nowiki/>'<nowiki/>''Ac6 STM32 MCU Project'''.'' When you get to Target Configuration, click the Mcu tab and select the microcontroller that you want to target: [[File:STM32 New Project.PNG|400px]] [[File:STM32 MCUcontent= CW308T-Selection.PNG|400px]] 2. 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).: [[File:STM32 Import.PNG|400px]] 3. Set up the build command. In ''File > Properties'', go to ''CSTM32F/C++ Build > Behavior'' and remove 'all''<nowiki/>''' from 'Build' and deselect 'Enable parallel 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:STM32 Behaviour.PNG|400px]] [[File:STM32 Build-Settings.PNG|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. Go to ''in File > Properties'' select Run/Debug Settings and create a new debug configuration. Under Debugger, click 'Show generator options...' and setup your Connection Setup based on your debugger. Change 'Reset Mode' to 'Software System reset': [[File:STM32 Debugging.PNG|400px]] 2. 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!Debugging_with_ST_Link}}
== Schematic ==
Approved_users, administrator
366
edits