Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building image for esp32s3 target #63

Closed
halsbox opened this issue Sep 16, 2024 · 12 comments
Closed

Building image for esp32s3 target #63

halsbox opened this issue Sep 16, 2024 · 12 comments

Comments

@halsbox
Copy link

halsbox commented Sep 16, 2024

Hi!
What branch/tag should I use for building esp32s3 images?
What's the command to build for esp32s3?
What env variables should be set when building image?
Where in source tree (including git submodules) should I search for and add my own board .h files (e.g. to set LED type/pins)
I did a brief grep through source tree (including *-sdk) on master branch and tried running cmake with ESP_PLATFORM=1 but didn't manage to get it building.
Will appreciate any help.

@polhenarejos
Copy link
Owner

You don't need nothing special.

If you have configured your VS Code with ESP32 plugin, the project is built smoothly.

https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/install.md

@halsbox
Copy link
Author

halsbox commented Sep 17, 2024

Thanks! Got it building with custom vid/pid.
On linux I had to patch pico-keys-sdk/src/esp_compat.h:

diff --git a/src/esp_compat.h b/src/esp_compat.h
index 0379c13..6266058 100644
--- a/src/esp_compat.h
+++ b/src/esp_compat.h
@@ -20,7 +20,7 @@
 
 #ifdef ESP_PLATFORM
 
-#include "freertos/freertos.h"
+#include "freertos/FreeRTOS.h"
 #include "freertos/queue.h"
 typedef QueueHandle_t queue_t;
 #define queue_init(a,b,c) do { *(a) = xQueueCreate(c, b); } while(0)

Also found nothing VSCode specific. Any or no IDE is OK, general instructions would be:

git clone --recursive https://github.com/espressif/esp-idf.git && cd esp-idf
./install.sh esp32s3
. ./export.sh
cd /path/to/pico-fido/
idf.py -DUSB_VID=0x**** -DUSB_PID=0x**** all
idf.py flash

@metabo7000
Copy link

Thanks! Got it building with custom vid/pid. On linux I had to patch pico-keys-sdk/src/esp_compat.h:

diff --git a/src/esp_compat.h b/src/esp_compat.h
index 0379c13..6266058 100644
--- a/src/esp_compat.h
+++ b/src/esp_compat.h
@@ -20,7 +20,7 @@
 
 #ifdef ESP_PLATFORM
 
-#include "freertos/freertos.h"
+#include "freertos/FreeRTOS.h"
 #include "freertos/queue.h"
 typedef QueueHandle_t queue_t;
 #define queue_init(a,b,c) do { *(a) = xQueueCreate(c, b); } while(0)

Also found nothing VSCode specific. Any or no IDE is OK, general instructions would be:

git clone --recursive https://github.com/espressif/esp-idf.git && cd esp-idf
./install.sh esp32s3
. ./export.sh
cd /path/to/pico-fido/
idf.py -DUSB_VID=0x**** -DUSB_PID=0x**** all
idf.py flash

Can you show me how you do this?
I would be very grateful for a tutorial video!
Developer does not help!

@halsbox
Copy link
Author

halsbox commented Sep 18, 2024

Hi, @metabo7000!
Please provide what OS do you use.
I did build it using my Linux desktop. For linux you need git installed and do:
1.

git clone --recursive https://github.com/polhenarejos/pico-fido.git
  1. change #include "freertos/freertos.h" to #include "freertos/FreeRTOS.h" in pico-fido/pico-keys-sdk/src/esp_compat.h
  2. Follow "Step 1. Install Prerequisites" from https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html#get-started-prerequisites
  3. (replace asterisks with your desired vid and pid)
git clone --recursive https://github.com/espressif/esp-idf.git && cd esp-idf
./install.sh esp32s3
. ./export.sh
cd ../pico-fido/
idf.py -DUSB_VID=0x**** -DUSB_PID=0x**** all
idf.py flash

@halsbox
Copy link
Author

halsbox commented Sep 18, 2024

@metabo7000 just checked docker build is OK.
If you own any OS with docker installed you can build using docker.

  1. clone https://github.com/polhenarejos/pico-fido.git including submodules using you preffered tool.
  2. patch pico-fido/pico-keys-sdk/src/esp_compat.h to include case sensitive "freertos/FreeRTOS.h" as I mentioned above
  3. go to cloned directory (e.g. cd pico-fido) and run:
docker run --rm -v $PWD:/pico -w /pico -u $UID -e HOME=/tmp espressif/idf idf.py -DUSB_VID=0x**** -DUSB_PID=0x**** all
  1. your build firmware binaries are located in build subfolder.

polhenarejos added a commit that referenced this issue Sep 19, 2024
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
@metabo7000
Copy link

Hi, @metabo7000! Please provide what OS do you use. I did build it using my Linux desktop. For linux you need git installed and do: 1.

git clone --recursive https://github.com/polhenarejos/pico-fido.git
  1. change #include "freertos/freertos.h" to #include "freertos/FreeRTOS.h" in pico-fido/pico-keys-sdk/src/esp_compat.h
  2. Follow "Step 1. Install Prerequisites" from https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/linux-macos-setup.html#get-started-prerequisites
  3. (replace asterisks with your desired vid and pid)
git clone --recursive https://github.com/espressif/esp-idf.git && cd esp-idf
./install.sh esp32s3
. ./export.sh
cd ../pico-fido/
idf.py -DUSB_VID=0x**** -DUSB_PID=0x**** all
idf.py flash

Snap009
Snap010
Snap011
Snap012
I did as I described! But I get these errors! I only worked in arduino ide environment in window os!

@halsbox
Copy link
Author

halsbox commented Sep 21, 2024

@metabo7000 you skipped all steps except for first one and last one, that's why you get all this errors. If you are not familiar with command line and still want to build pico-fido by yourself, I'd recommend using VSCode and following
https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/install.md (choose Express setup option).
As soon as you have VSCode with ESP-IDF Extension installed, you should open pico-fido project, select esp32s3 target (1) and click build (3) in ESP-IDF explorer (2):
screncapture

@metabo7000
Copy link

Snap015
This translation of 5.12 idf 2000 lines is just a mistake!

@metabo7000
Copy link

metabo7000 commented Sep 21, 2024

@metabo7000 you skipped all steps except for first one and last one, that's why you get all this errors. If you are not familiar with command line and still want to build pico-fido by yourself, I'd recommend using VSCode and following https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/install.md (choose Express setup option). As soon as you have VSCode with ESP-IDF Extension installed, you should open pico-fido project, select esp32s3 target (1) and click build (3) in ESP-IDF explorer (2): screncapture

Please make me a fido firmware bin esp32s3 in which 1050/0407 vid/pid settings are ready!
You can send it to metabo7000@gmail.com Tankyou! !
The translation cannot solve your problem, see the attached pictures!

@metabo7000
Copy link

idf v5.4 ,v5.3 version compile error!
video
https://drive.google.com/file/d/17NbH_wvGrV0PUWCVdCHUyRRd1avLqcIu/view?usp=sharing

@halsbox
Copy link
Author

halsbox commented Sep 21, 2024

Snap015 This translation of 5.12 idf 2000 lines is just a mistake!

Check your email and please stop spamming issues on this repo. Github issues are not intended for that kind of support you are seeking here. If you have problems with operating VSCode or ISP-IDF you should ask on corresponding resources.

@halsbox halsbox closed this as completed Sep 21, 2024
@metabo7000
Copy link

Snap015 This translation of 5.12 idf 2000 lines is just a mistake!

Check your email and please stop spamming issues on this repo. Github issues are not intended for that kind of support you are seeking here. If you have problems with operating VSCode or ISP-IDF you should ask on corresponding resources.

The supported resources are those who help others as you do! There are those who, for example, only understand others, but also open or eat in other areas! Thank you for the filmware files!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants