mirror of
https://github.com/kakopappa/how-to-make-a-precompiled-arduino-library-for-esp8266-esp32.git
synced 2025-06-07 21:50:13 +03:00
Update ReadMe.md
This commit is contained in:
parent
d3baec5d28
commit
af2dc1f617
14
ReadMe.md
14
ReadMe.md
@ -1,19 +1,23 @@
|
|||||||
**Step 1:**
|
**Step 1:**
|
||||||
|
|
||||||
Create hello.cpp and hello.h and add the implementation.
|
Create ```hello.cpp``` and ```hello.h``` and add the implementation. Example in the lib folder returns the sum of two integers
|
||||||
|
|
||||||
Example files are in lib folder.
|
|
||||||
|
|
||||||
**Step 2:**
|
**Step 2:**
|
||||||
|
|
||||||
Make the archive file (.a) using xtensa-esp32-elf-gcc.exe for ESP32 and use xtensa-lx106-elf-gcc for ESP8266
|
Make the archive file (.a) using ```xtensa-esp32-elf-gcc.exe``` for ESP32 and use ```xtensa-lx106-elf-gcc``` for ESP8266
|
||||||
|
|
||||||
|
For ESP32
|
||||||
|
|
||||||
|
```
|
||||||
xtensa-esp32-elf-gcc.exe -c hello.cpp -o libhello.o
|
xtensa-esp32-elf-gcc.exe -c hello.cpp -o libhello.o
|
||||||
xtensa-esp32-elf-ar.exe crf libhello.a libhello.o
|
xtensa-esp32-elf-ar.exe crf libhello.a libhello.o
|
||||||
|
```
|
||||||
|
|
||||||
Note: xtensa-esp32-elf-gcc.exe is located here if you have installed ESP32 in your arduino IDE.
|
Note: ```xtensa-esp32-elf-gcc.exe``` is located here if you have installed ESP32 in your arduino IDE.
|
||||||
You may want to add this path to system env for easy access.
|
You may want to add this path to system env for easy access.
|
||||||
|
```
|
||||||
C:\Users\<USERNAME>\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2-patch3\bin\
|
C:\Users\<USERNAME>\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2-patch3\bin\
|
||||||
|
```
|
||||||
|
|
||||||
Now you should have a libhello.a in the path.
|
Now you should have a libhello.a in the path.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user