Giter VIP home page Giter VIP logo

Comments (9)

MrPointer avatar MrPointer commented on May 25, 2024

@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.

andrzejo avatar andrzejo commented on May 25, 2024

Sure! It's valid now.

from arduino-cmake-ng.

MrPointer avatar MrPointer commented on May 25, 2024

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.

andrzejo avatar andrzejo commented on May 25, 2024

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.

view build.sh

Other way is to clone lib into libraries directory:
git clone https://github.com/marcoschwartz/LiquidCrystal_I2C.git

from arduino-cmake-ng.

MrPointer avatar MrPointer commented on May 25, 2024

Thanks again, I'll check this out in the following days

from arduino-cmake-ng.

theunkn0wn1 avatar theunkn0wn1 commented on May 25, 2024

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.

MrPointer avatar MrPointer commented on May 25, 2024

@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.

MrPointer avatar MrPointer commented on May 25, 2024

@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.

andrzejo avatar andrzejo commented on May 25, 2024

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)

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.