iotivity / iotivity-lite

To contribute code to the project, please visit
https://iotivity.org/get-involved
Apache License 2.0
124 stars 67 forks source link

What is the proper develop flow about esp32 port? #262

Open cmsong-shina opened 2 years ago

cmsong-shina commented 2 years ago

I did

  1. install iotivity-lite with [setup tool](https://github.com/openconnectivity/IOTivity-Lite-setup)

    $ curl  https://openconnectivity.github.io/IOTivity-Lite-setup/install-master.sh | bash
  2. install esp-idf with [instruction](https://github.com/iotivity/iotivity-lite/tree/master/port/esp32)

    $ git clone --recursive https://gitlab.iotivity.org/iotivity/iotivity-lite.git
    $ sudo apt install -y git wget flex bison gperf python3 python3-pip python3-setuptools \
    python3-serial python3-click python3-cryptography python3-future python3-pyparsing \
    python3-pyelftools cmake ninja-build ccache libffi-dev libssl-dev libusb-1.0-0
    
    $ cd ./iotivity-lite/port/esp32
    $ git clone https://github.com/espressif/esp-idf.git
    $ (cd esp-idf && git checkout 457ce080aec9811faee26a1ea5293fff17049fee && git submodule init && git submodule update)
    $ ./esp-idf/install.sh
    $ . ./esp-idf/export.sh
  3. edit build.sh

    build.sh

    #!/bin/bash
    cd ./iotivity-lite/port/esp32/
    make -f devbuildmake DYNAMIC=1 device_builder_server $1 $2 $3
    cd ../../..
  4. follow [develop flow](https://github.com/openconnectivity/IOTivity-Lite-setup#development-flow)

    $ ./gen.sh && ./build.sh

And the last step, I met a error:

devbuildmake:13: Makefile: No such file or directory
make: *** No rule to make target 'Makefile'.  Stop.

So, here are two questions.

  1. What did I wrong?
  2. I expected it would generate iot-lite/iotivity-lite/port/esp32/main/main.c. Is that right? If yes, then can I follow [common steps](https://github.com/iotivity/iotivity-lite/tree/master/port/esp32#common-steps)?
jkralik commented 2 years ago

@cstevens Could you look at it ? Thx