CTXz / stm32f1-picopwner

Dump read-out protected STM32F1's with a Pi Pico - A Pi Pico implementation of @JohannesObermaier's, Marc Schink's and Kosma Moczek's Glitch and FPB attack to bypass RDP (read-out protection) level 1 on STM32F1 chips
166 stars 23 forks source link

Error: 'stdio_usb' undeclared (first use in this function) #29

Closed AEROBATlCS closed 3 months ago

AEROBATlCS commented 3 months ago

Hi all! The problem is this. When it comes to compiling with the cmake command, I have this in the report:

[ 22%] Building C object CMakeFiles/attack.dir/attack.c.obj
/home/************/Downloads/stm32f1-picopwner/attack/attack.c: In function 'main':
/home/************/Downloads/stm32f1-picopwner/attack/attack.c:70:35: error: 'stdio_usb' undeclared (first use in this function); did you mean 'stdio_flush'?
   70 |         stdio_set_translate_crlf(&stdio_usb, false);
      |                                   ^~~~~~~~~
      |                                   stdio_flush
/home/************/Downloads/stm32f1-picopwner/attack/attack.c:70:35: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [CMakeFiles/attack.dir/build.make:76: CMakeFiles/attack.dir/attack.c.obj] Ошибка 1
make[1]: *** [CMakeFiles/Makefile2:1491: CMakeFiles/attack.dir/all] Ошибка 2
make: *** [Makefile:91: all] Ошибка 2

************@************:~/Downloads/stm32f1-picopwner/attack/build$ git submodule add https://github.com/mordae/pico-stdio-usb-simple.git

**error: 'stdio_usb' undeclared ((((((((**
CTXz commented 3 months ago

Related to this warning

CMake Warning at /usr/share/pico-sdk/src/rp2_common/tinyusb/CMakeLists.txt:10 (message):
  TinyUSB submodule has not been initialized; USB support will be unavailable

  hint: try 'git submodule update --init' from your SDK directory
  (/usr/share/pico-sdk).

The warning literally says what's wrong and the issue has even already been discussed here: https://github.com/CTXz/stm32f1-picopwner/issues/26

This issue is related to your pico-sdk set-up and not this project. A simple google search of the error or warning or even a just look into this repo's resolved issues would've solved this...