Giter VIP home page Giter VIP logo

Comments (6)

toshi38 avatar toshi38 commented on May 25, 2024

Update:

So I followed the instructions here:
https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/debian_ubuntu.md

But the get_board_id still doesn't work, I did a bit of digging and it seems like initialize_arduino_platform function is only looking in the arduino-1.8.7/hardware/arduino/avr path but not searching the arduino-1.8.7/hardware/espressif/esp32 path.

Of course we can force the paths like so:

#Setup paths to use esp32
set(ARDUINO_SDK_PATH "/usr/share/arduino-1.8.7/")
set(ARDUINO_CMAKE_PLATFORM_NAME "espressif" CACHE STRING "")
set(ARDUINO_CMAKE_PLATFORM_ARCHITECTURE "esp32" CACHE STRING "")
string(CONCAT platform_path "${ARDUINO_SDK_PATH}"
       /hardware/
       "${ARDUINO_CMAKE_PLATFORM_NAME}/"
       "${ARDUINO_CMAKE_PLATFORM_ARCHITECTURE}")
set(ARDUINO_CMAKE_PLATFORM_PATH "${platform_path}" CACHE PATH "")

# Include Arduino-CMake Toolchain
set(CMAKE_TOOLCHAIN_FILE contrib/CMake-Framework/Arduino-Toolchain.cmake)

But then we run into the issue that all the tools are incorrect as seen in the _find_required_programs:

function(_find_required_programs)

    # Find ASM compiler

So the question is:

  • Should these not be loaded from platform.txt which seems to reference the correct places for such things in compiler.c.cmd, compiler.cpp.cmd etc?
  • Is this expected behaviour?
  • Is adding boards with non avr architecture supported/planned/PR welcome? :)

Background info in my case the platform.txt's contain:
In espressif/esp32/platform.txt:

compiler.c.cmd=xtensa-esp32-elf-gcc
compiler.c.flags=-std=gnu99 -Os -g3 -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c

compiler.cpp.cmd=xtensa-esp32-elf-g++
compiler.cpp.flags=-std=gnu++11 -fno-exceptions -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c
....continued

In the arduino/avrplatform.txt:

compiler.c.cmd=avr-gcc
compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects
compiler.c.elf.flags={compiler.warning_flags} -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections
compiler.c.elf.cmd=avr-gcc
compiler.S.flags=-c -g -x assembler-with-cpp -flto -MMD
compiler.cpp.cmd=avr-g++
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno
..... continued

from arduino-cmake-ng.

toshi38 avatar toshi38 commented on May 25, 2024

It looks like https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification has a pretty good description of which files define what.

It seems like a good start would be to search here for the avr things instead of requiring them to be installed globally and then expand that to search all architectures?

from arduino-cmake-ng.

MrPointer avatar MrPointer commented on May 25, 2024

Hello @toshi38 and thank you for all you efforts to dig into this and find a solution!
Unfortunately though, 3rd party platforms such as ESP are currently not supported. If you were mistaken by the Readme, I've updated it now to make this clearer.

When the time comes and I'll have the opportunity to add this feature, I'll definitely draw insight from your ideas here since they're all correct 😃

from arduino-cmake-ng.

toshi38 avatar toshi38 commented on May 25, 2024

Thanks for the update!

from arduino-cmake-ng.

tschaffter avatar tschaffter commented on May 25, 2024

Hi, is there any update regarding the support of 3rd Party platforms (such as ESP32, pinoccio, etc.)?

Thanks for your contribution to this nice project!

from arduino-cmake-ng.

MrPointer avatar MrPointer commented on May 25, 2024

I'm afraid not.
Moreover, I've abandoned this project a while ago, and I'm looking for new active maintainers.

from arduino-cmake-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.