Jump to: navigation, search


2,035 bytes added, 17:17, 26 April 2017
Building and Debugging via ST's System Workbench
It's also possible to work on the example projects using [ 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 ''Makefile Project with Existing Code'' and enter the firmware's location in Existing Code Location: [[File:Stm32-st-1.png]] 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). Ensure that make links to these files (instead of directly importing them): [[File:Stm32-st-2.png]] 3. Set up the build command. In ''File > Properties'', go to ''C/C++ Build'' and deselect 'Use default build command'. Enter the command you would normally enter on the command line: [[File:Stm32-st-3.png]] 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 ST'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):<pre># 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 ''Run > Debug Configurations'', make a new ''Ac6 STM32 Debugging'' configuration. Under the 'Debugger' tab, select ''Use local script'' and select your custom script: [[File:Stm32-st-4.png]] 3. Enter debugging mode.  '''Caveat''': the I/O register map in the debugger appears to use the last known device (TODOie: detailsif 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!
== Schematic ==

Navigation menu