Skip to content

double trouble ?

KurfuerstPilz edited this page Mar 23, 2021 · 22 revisions

fear no more !

Crowbars

Flashing/Running etc

delete everything via CubeProgrammer (see here)

BuildProblems

- project-> clean -> all

- build secure
- build nonsecure

installation

problem solutions.

I can't download the CubeIDE

make sure that you open the link sent to you via eMail in the same browser instance in which you requested the download.

My CubeProgrammer installation keeps disappearing

  • no it doesn't, it just doesn't register in any of the windows entries for apps or the like.
  • Just open "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin" or your installation path.

Building/Compiling/Assembling

Problem solutions.

everything works for me but not for someone else

  • Make sure that if new files are added, they are specified with relative paths (there should be no C:/ or similar in the .project file, only things like $%7BPARENT-2-PROJECT_LOC%7D/)

"undefined reference to `Secure[...]"

  • first build secure then build non-secure, see crowbar

Flashing

Problem solutions.

See programmer for this.

  • disconnect cubeprogrammer when flashing a new sketch

"Data mismatch found at [...]"

  • Make sure that the trustzone configuration currently on the board matches the one of the project

"target not halted"

  • boot into rss-mode as described here

"Error in STM32CubeProgrammer"

  • Make sure that the board configuration is correct, e.g. that the watermark region is set correctly, see also here

running/debugging

Problem solutions.

Problems with the OS? e.g. that a thread is not executed properly, or osDelay hangs in a continuous loop?

  • is probably because the corresponding thread needs a bigger stack.
    • go to the .ioc file under freeRTOS -> tasks and queues -> corresponding thread and increase the stack size.

Nothing happens somehow

The debugger does not get a connection

  • Make sure your USB cable supports data transfer#

The debugger loses its connection again immediately

  • This is supposed to happen when you press "run" instead of "debug".

The debugger does not toggle breakpoints / is in a continuous loop

  • press the black reset button once

Other problems

Problem solutions.

Disable TrustZone and Read Out Protection.

  1. connect CubeProgrammer
  2. set RDP to 0.5 (aka 0x55) but keep nBOOT0 and nSWBOOT0 OB activated as this is the only way to get the board into RSS-mode from which the regression can be done
  3. apply
  4. get Device into RSS mode
    • connect Boot0 pin to vdd
    • push reset button (the black one on the board itself)
    • blue and red should light up
  5. connect CubeProgrammer via HotPlug mode
  6. set RDP to 0 and TZEN also
  7. apply and done TZ is now disabled

If you can't find a solution for your problem here, but you think it's our fault, feel free to contact us! Maybe you can find a solution in the Issues we already encountered.

Clone this wiki locally