I see that result Blink.cpp.
From Blink.cpp i cut all library and code lines.
I leave only :
void setup() {
asm(" movi.n a5, 100");
}
void loop() {
asm(" movi.n a4, 120");
}
I compile this file with XTENSA-LX106-ELF-GCC.EXE ( I leave all arguments that arduino make and i deleted all include folders).
I obtain a o file that decompiled with objdump.exe i see that is compiled corectly :
test.cpp.o: file format elf32-xtensa-le
Disassembly of section .text._Z5setupv:
00000000 <setup()>:
0: 64a052 movi a5, 100
3: f00d ret.n
Disassembly of section .text._Z4loopv:
00000000 <loop()>:
0: 78a042 movi a4, 120
3: f00d ret.n
Until now its ok!
Problems begin when i want compile o file with XTENSA-LX106-ELF-GCC.EXE to elf file.
I copied line where arduino compile o file to elf ,i deleted all include libraries and i succeded to create bin file ... but a empty file
test.cpp.elf: file format elf32-xtensa-le
not with asm inside !!!
My question is where find explanation for all arguments that XTENSA-LX106-ELF-GCC.EXE use?
If you want see all experiments that i speak here ... here is the link:
https://github.com/costycnc/test-compile-esp8285/tree/master/28.12.2018