Comments (6)
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 incompiler.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.
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.
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.
Thanks for the update!
from arduino-cmake-ng.
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.
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)
- Project is dead HOT 1
- upload_arduino_target does not work (avrdude problem?) HOT 4
- Problem when with determining link language. HOT 3
- Include library header from another library HOT 9
- Undefined reference error when linking 3rd party libraries. HOT 4
- Refactor upload API
- Undefined reference to countPulseASM when using pulseIn function HOT 8
- Newbie: need some hand holding. HOT 2
- RegisterHardwarePlatform doesn't work HOT 3
- Install for library depending on platform HOT 6
- FastLED library linker errors HOT 1
- vidor 4000 HOT 1
- SDK not found on Debian 9 with official Arduino binary HOT 2
- Provide means to override `avrdude`
- find_arduino_library simply doesn't work HOT 6
- ARDUINO_SDK_PATH variable is forgotten during compiler check (v0.6.1) HOT 2
- Support for Third-Party Boards - Game plan HOT 4
- Reduce search-paths for version.txt file
- Board 'nano33ble' not working, unrecorgnized command -mcpu=cortex-m4 HOT 1
- SD card library is not being found. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-cmake-ng.