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/Debugging with ST Link

2,157 bytes added, 18:06, 11 March 2020
Created page with "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, wh..."
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 MCU-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 ''C/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!
Approved_users, administrator
366
edits

Navigation menu