Skip to content

Running the Examples

Piotr Esden-Tempski edited this page Jul 27, 2023 · 2 revisions

Troubleshooting STM32

If you are using STM32 and are receiving errors when you try to cargo run --release, please check the following:

  • You are specifying the correct --chip on the command line, OR
  • You have set .cargo/config.toml's run line to the correct chip, AND
  • You have changed examples//Cargo.toml's embassy-stm32 dependency's feature to use the correct chip (replace the existing stm32xxxx feature)
  • At this point the project should run. If you do not see a blinky LED for blinky, for example, be sure to check the code is toggling your board's LED pin.

Strange output on the console

If you are trying to run an example with cargo run --release and you see the following output:

0.000000 INFO Hello World!
└─ <invalid location: defmt frame-index: 14>
0.000000 DEBUG rcc: Clocks { sys: Hertz(80000000), apb1: Hertz(80000000), apb1_tim: Hertz(80000000), apb2: Hertz(80000000), apb2_tim: Hertz(80000000), ahb1: Hertz(80000000), ahb2: Hertz(80000000), ahb3: Hertz(80000000) }
└─ <invalid location: defmt frame-index: 124>
0.000061 TRACE allocating type=Interrupt mps=8 interval_ms=255, dir=In
└─ <invalid location: defmt frame-index: 68>
0.000091 TRACE   index=1
└─ <invalid location: defmt frame-index: 72>

To get rid of the frame-index error add the following to your Cargo.toml:

[profile.release]
debug = 2