ESP32 IDF can't compile custom component from Loboris microPython

serkam
Posts: 7
Joined: Thu Nov 10, 2016 1:31 pm

ESP32 IDF can't compile custom component from Loboris microPython

Postby serkam » Wed Dec 05, 2018 12:26 pm

Hi
I am trying to use FTP component from Loboris microPython project.
I copied py and extmod folders to my components folder inside my project. Inside ./components/py and ./components/extmod I place an empty components.mk file in each folder. Follows my project tree:

- Project
Makefile
sdkconfig
- main
main_module.c
- components
- py
component.mk
.... *.c *.h
- extmod
component.mk
.... *.c *.h
- build

But, when I try to compile with "make all", in first module inside extmod folder, the compiler can't locate py/objlist.h file:

sergio2@sergio2-Ubuntu16:~/Desktop/Projetos/ESP32_Projetos$ cd esp32_ftp_server_v10/
sergio2@sergio2-Ubuntu16:~/Desktop/Projetos/ESP32_Projetos/esp32_ftp_server_v10$ ls
build components main Makefile sdkconfig sdkconfig.old
sergio2@sergio2-Ubuntu16:~/Desktop/Projetos/ESP32_Projetos/esp32_ftp_server_v10$ make all
Toolchain path: /home/sergio2/ESP-32/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
Python requirements from /home/sergio2/ESP-32/esp-idf/requirements.txt are satisfied.
CC build/extmod/modutimeq.o
/home/sergio2/Desktop/Projetos/ESP32_Projetos/esp32_ftp_server_v10/components/extmod/modutimeq.c:31:24: fatal error: py/objlist.h: No such file or directory
compilation terminated.
/home/sergio2/ESP-32/esp-idf/make/component_wrapper.mk:291: recipe for target 'modutimeq.o' failed
make[1]: *** [modutimeq.o] Error 1
/home/sergio2/ESP-32/esp-idf/make/project.mk:523: recipe for target 'component-extmod-build' failed
make: *** [component-extmod-build] Error 2
sergio2@sergio2-Ubuntu16:~/Desktop/Projetos/ESP32_Projetos/esp32_ftp_server_v10$



What I need to do to modules from extmod folder to reach py folder and vice-versa?

Any help will welcome.

Sergio

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 IDF can't compile custom component from Loboris microPython

Postby loboris » Wed Dec 05, 2018 2:11 pm

FTP server library is not an independent esp-idf component, but deeply integrated with other MicroPython components.
There are other FTP-server componnents on GitHub which may be easier to use.

serkam
Posts: 7
Joined: Thu Nov 10, 2016 1:31 pm

Re: ESP32 IDF can't compile custom component from Loboris microPython

Postby serkam » Wed Dec 05, 2018 4:57 pm

Thank you Loboris.

I will search for a good one there.

Sergio

Who is online

Users browsing this forum: No registered users and 125 guests