From af2dc1f61712b4bd3d0dfc394d0579a8a906bd81 Mon Sep 17 00:00:00 2001 From: Aruna Tennakoon Date: Wed, 27 Jul 2022 08:47:53 +0700 Subject: [PATCH] Update ReadMe.md --- ReadMe.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 2bf4232..6dc83a2 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,19 +1,23 @@ **Step 1:** -Create hello.cpp and hello.h and add the implementation. - -Example files are in lib folder. +Create ```hello.cpp``` and ```hello.h``` and add the implementation. Example in the lib folder returns the sum of two integers **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-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. +``` C:\Users\\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.