Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Undefined reference to countPulseASM when using pulseIn function #75

Open
@dominicap

Description

@dominicap

OS: macOS
OS Version: 10.14.2
Platform: Arduino
Platform SDK Version: [Arduino SDK version 1.8.8]

When trying to use the built in "pulseIn" function, I receive an undefined reference to `countPulseASM'

Build Output:

====================[ Build | auto_car | Default ]==============================
/usr/local/bin/cmake --build /Users/Dominic/Desktop/auto-car/build --target auto_car -- -j 4
[ 92%] Built target mega_atmega2560_core_lib
[ 96%] Linking CXX executable auto_car.elf
/var/folders/vh/n3x031n547v4qhvxs1p_wtf00000gn/T//ccNcSGia.ltrans0.ltrans.o: In function `pulseIn':
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_pulse.c:46: undefined reference to `countPulseASM'
collect2: error: ld returned 1 exit status
make[3]: *** [auto_car.elf] Error 1
make[2]: *** [CMakeFiles/auto_car.dir/all] Error 2
make[1]: *** [CMakeFiles/auto_car.dir/rule] Error 2
make: *** [auto_car] Error 2

CMakeLists.txt:

cmake_minimum_required(VERSION 3.13.3)
project(auto_car LANGUAGES C CXX)

get_board_id(board_id mega atmega2560)

add_arduino_executable(auto_car ${board_id} src/auto_car.cpp)

Source file:

#include <Arduino.h>

#define PIN 14

void setup()
{
    // Setup
}

void loop()
{
    pulseIn(PIN, HIGH, 40000);
}

I believe this might be related to issue 364 in the Arduino-Makefile community and issue 23 from the original Arduino CMake Build System.

Help would be appreciated, thanks!

Metadata

Metadata

Assignees

Labels

bugPotential bug in codepriority: minorMinor priority - Probably won't be implemented soon

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions