Skip to content

Instantly share code, notes, and snippets.

View robotdad's full-sized avatar

Marc Goodner robotdad

  • Microsoft
  • Kirkland, WA
View GitHub Profile
@robotdad
robotdad / disabletrustzone.md
Created March 5, 2023 03:30
Disable TrustZone on STM32 boards

Sometimes you need to disable TrustZone on a board to run a sample that isn't configured for it. I've never been able to do that with the interactive STM programmer tool, but these instructions have been pretty solid.

Connect your board. Use the interactive STM32CubeProgrammer to see if the option byte TZEN is enabled. If so run the following steps if you need to disable TrustZone for other demos.

I have seen the need to occasionally reconnect the board between some of these steps. You'll know to do that if you get errors, particularly about an unsupported device.

Run the following commands in a command prompt. Note that the programmer might be under C:\Program Files (x86).

set ST_PROGRAMMER_PATH="C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe"
@robotdad
robotdad / CppCon-Embedded-Links.md
Created September 15, 2022 01:21
Links for CppCon embedded talk
@robotdad
robotdad / embedded_world_2022.md
Last active March 15, 2023 06:03
VS and VS Code embedded development references

This page collects links to embedded development topics related to VS and VS Code from the C++ team at Microsoft.

We are seeking feedback on our embedded experiences from developers, it would be a great help to us if you could take our short survey. Even if you are not using our products today your feedback would be very helpful.

@robotdad
robotdad / vs_cpp_winget.md
Last active April 29, 2024 04:37
Installing VS C++ workloads with winget

This is a short outline of how to install the C++ workload with Visual Studio or the build tools using winget.

To find VS releases with winget use search. winget search buildtools

The install command will install the VS installer with the core of the selected product installed. That isn't much. So if you use either of these commands to insll VS or the build tools you will need to launch the VS installer afterwards and select the relevant C++ workloads you need.

winget install Microsoft.VisualStudio.2022.BuildTools

winget install Microsoft.VisualStudio.2022.Community
@robotdad
robotdad / tasks.vs.json
Created January 13, 2018 23:09
Visual Studio task to copy mbed output to board
{
"version": "0.2.1",
"tasks": [
{
"taskName": "flash",
"appliesTo": "BUILD/Nucleo_blink_led.bin",
"type": "launch",
"command": "${env.COMSPEC}",
"args": [
"copy BUILD\\Nucleo_blink_led.bin D:"
sudo apt-get update
sudo apt-get install -y git cmake
git clone https://github.com/Kitware/CMake.git
cd CMake
Make sure you are on a supported release
git checkout tags/v3.9.0
mkdir out
cd out
@robotdad
robotdad / launch.json
Created June 6, 2017 22:25
Black Magic Probe launch.json for 1bitsy debugging
{
"version": "0.2.0",
"configurations": [
{
"name": "BMP JTAG Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/fancyblink.elf",
"args": [],
"stopAtEntry": true,
@robotdad
robotdad / debug.xml
Created April 22, 2017 00:32
debug.xml for VS targeting an ARM board with openocd
<?xml version="1.0" encoding="utf-8"?>
<LocalLaunchOptions xmlns="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014"
MIDebuggerPath="c:\tools\armgcc\6-2017-q1-update\bin\arm-none-eabi-gdb.exe"
MIDebuggerServerAddress="localhost:3333"
ExePath="BUILD\mbed_blinky.elf"
TargetArchitecture="arm">
<SetupCommands>
<Command>
target remote localhost:3333
</Command>
@robotdad
robotdad / launch.json
Created April 22, 2017 00:29
launch.json for debugging an ARM board
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/BUILD/mbed_blinky.elf",
"args": [],
"stopAtEntry": false,
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"windows": {
"command": "cmd",
"args": ["/C"]
},
"linux": {
"command": "sh",