Comments (9)
@andrzejo Hello and welcome to the project!
Can you fix the url pointing to your files please? It's currently invalid.
from arduino-cmake-ng.
Sure! It's valid now.
from arduino-cmake-ng.
Thanks.
One more thing - Since I don't know much about Arduino development (Ironic, I know) I need some help finding the exact libraries you're working with.
Could you point me to the repo/url of the LiquidCrystal_I2C library you're using? 😃
from arduino-cmake-ng.
I prepare console build script (required bash & linux), when you clone my test repo and run ./build.sh
script it should download required libraries (and cmake) and try to build application. If you running linux the build script should be helpful.
Other way is to clone lib into libraries directory:
git clone https://github.com/marcoschwartz/LiquidCrystal_I2C.git
from arduino-cmake-ng.
Thanks again, I'll check this out in the following days
from arduino-cmake-ng.
I am also having issues with using the Wire
arduino library, Arduino-cmake is refusing to load it, which may be relevant to the OP's issue
relevant portion of the CMakeLists.txt
:
cmake_minimum_required(VERSION 3.8)
project(Robotics LANGUAGES C CXX ASM)
get_board_id(board_id mega atmega2560)
#set(SD_RECURSE True)
#set(Wire_RECURSE True)
# define our main executable
add_arduino_executable(Robotics
${board_id}
i2c_playground.cpp
)
find_arduino_library(WireLib Wire ${board_id})
cmake output
D:\programfiles\Jetbrains\apps\CLion\ch-0\182.4505.18\bin\cmake\win\bin\cmake.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=Arduino-CMake-NG/cmake/Arduino-Toolchain.cmake -G "CodeBlocks - MinGW Makefiles" D:\Clion\skool\cs1b\robotics
-- Arduino SDK version 1.8.7: D:/Program Files (x86)/Arduino
-- Determined Platform Header: D:/Program Files (x86)/Arduino/hardware/arduino/avr/cores/arduino/Arduino.h
-- Arduino SDK version 1.8.7: D:/Program Files (x86)/Arduino
-- Determined Platform Header: D:/Program Files (x86)/Arduino/hardware/arduino/avr/cores/arduino/Arduino.h
-- Arduino SDK version 1.8.7: D:/Program Files (x86)/Arduino
-- Determined Platform Header: D:/Program Files (x86)/Arduino/hardware/arduino/avr/cores/arduino/Arduino.h
CMake Error at Arduino-CMake-NG/cmake/Platform/Targets/ArduinoLibraryTarget.cmake:125 (message):
Couldn't find library named Wire
Call Stack (most recent call first):
CMakeLists.txt:13 (find_arduino_library)
CMake Error at CMakeLists.txt:14 (link_arduino_library):
link_arduino_library Function invoked with incorrect arguments for function
named: link_arduino_library
from arduino-cmake-ng.
@theunkn0wn1 Hi there - Your issue seems a completely different one, could you please open a separate issue for this?
Edit: No need to open a separate issue, I've just noticed that your not using the API correctly. This is actually our fault since the docs don't specify anything about using platform libraries directly.
What you should do instead of finding a platform library, is simply linking it. This logic may seem somewhat strange at a first glance, but the intention here is that you shouldn't mess with platform libraries yourself (or anything else regarding the platform), so just passing the name of library to a linking function instead of a target is perfectly valid.
In other words, you should use the link_platform_library
function, passing it your target name, the actual library name (such as Wire in your case) and the board_id. Then it will work.
from arduino-cmake-ng.
@andrzejo I couldn't reproduce your issue but found another one instead, I'll integrate the fix soon.
However, I suspect you're not using the latest version of the framework.
After the fix will be integrated, please checkout the updated version of the master branch and let me know if the bug is indeed fixed!
Edit: It was my bad, I didn't setup my environment exactly as you did @andrzejo - The issue is indeed there and should be fixed.
from arduino-cmake-ng.
It's working now :) Great job!
I've noticed that libraries/Wire/src/utility/twi.c
is included to compilation right now, maybe this is the missing file and this cause error.
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.