Skip to content

Commit

Permalink
Merge pull request #10 from leaphy-robotics/min-change
Browse files Browse the repository at this point in the history
chore: min change
  • Loading branch information
koen1711 authored Apr 22, 2024
2 parents 271523c + 98dc910 commit d3c9864
Show file tree
Hide file tree
Showing 123 changed files with 41,720 additions and 37,070 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** @leaphy-robotics/webbased-code-owners
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build pull request

env:
EM_VERSION: 3.1.56
EM_VERSION: 3.1.57
EM_CACHE_FOLDER: 'emsdk-cache'

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build avrdude with Emscripten

env:
EM_VERSION: 3.1.56
EM_VERSION: 3.1.57
EM_CACHE_FOLDER: 'emsdk-cache'

on:
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules/
cmake-build-release-emscripten/
.idea/
release-build
.idea
src/CMakeFiles
.DS_Store
.deps/
Expand Down Expand Up @@ -57,6 +59,9 @@ cscope.out
out/
build/
build_*/
CMakeFiles/
/CMakeCache.txt
cmake_install.cmake

# Visual Studio
.vs/
Expand Down
1 change: 0 additions & 1 deletion .gitmodules

This file was deleted.

51 changes: 38 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
cmake_minimum_required(VERSION 3.5)
project(avrdude VERSION 7.3 LANGUAGES C CXX)

# check if we are doing emscripten
if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
# print a message
message(STATUS "Building for Emscripten")
set(EMSCRIPTEN 1)
add_subdirectory(libserial)
endif ()

set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED True)
Expand Down Expand Up @@ -130,7 +137,6 @@ if(USE_STATIC_LIBS)
set(PREFERRED_LIBFTDI1 libftdi1.a ftdi1)
set(PREFERRED_LIBREADLINE libreadline.a readline)
set(PREFERRED_LIBSERIALPORT libserialport.a serialport)
set(PREFERRED_LIBGPIOD libgpiod.a gpiod)
else()
set(PREFERRED_LIBELF elf)
set(PREFERRED_LIBUSB usb)
Expand All @@ -140,7 +146,6 @@ else()
set(PREFERRED_LIBFTDI1 ftdi1)
set(PREFERRED_LIBREADLINE readline)
set(PREFERRED_LIBSERIALPORT serialport)
set(PREFERRED_LIBGPIOD gpiod)
endif()

# -------------------------------------
Expand Down Expand Up @@ -231,15 +236,33 @@ elseif(MSVC)
set(HAVE_LIBREADLINE 1)
endif()

add_subdirectory(libserial)

# -------------------------------------
# Find libgpiod, if needed
# Find libgpiod using pkg-config, if needed
if(HAVE_LINUXGPIO)
find_library(HAVE_LIBGPIOD NAMES ${PREFERRED_LIBGPIOD})
if(HAVE_LIBGPIOD)
set(LIB_LIBGPIOD ${HAVE_LIBGPIOD})
set(CMAKE_REQUIRED_LIBRARIES ${LIB_LIBGPIOD})
# defaults/fallbacks
set(HAVE_LIBGPIOD 0)
set(HAVE_LIBGPIOD_V2 0)

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
# check whether we have version >= 2.0
pkg_check_modules(LIBGPIODV2 libgpiod>=2.0)
if(LIBGPIODV2_FOUND)
set(HAVE_LIBGPIOD 1)
set(HAVE_LIBGPIOD_V2 1)
set(CMAKE_REQUIRED_LIBRARIES ${LIBGPIODV2_LIBRARIES})
set(LIB_LIBGPIOD ${LIBGPIODV2_LINK_LIBRARIES})
else()
# check whether we have at least an older version
pkg_check_modules(LIBGPIOD libgpiod)
if(LIBGPIOD_FOUND)
set(HAVE_LIBGPIOD 1)
set(CMAKE_REQUIRED_LIBRARIES ${LIBGPIOD_LIBRARIES})
set(LIB_LIBGPIOD ${LIBGPIOD_LINK_LIBRARIES})
endif()
endif()
else()
message(WARNING "For using libgpiod, pkg-config would be required which is not available.")
endif()
endif()

Expand Down Expand Up @@ -336,7 +359,8 @@ if (DEBUG_CMAKE)
message(STATUS "HAVE_LIBUSB_1_0_LIBUSB_H: ${HAVE_LIBUSB_1_0_LIBUSB_H}")
message(STATUS "HAVE_HIDAPI_HIDAPI_H: ${HAVE_HIDAPI_HIDAPI_H}")
message(STATUS "LIBUSB_COMPAT_DIR: ${LIBUSB_COMPAT_DIR}")
message(STATUS "HAVE_LIBGPIOD: ${HAVE_LIBGPIOD}")
message(STATUS "LIBGPIODV2_FOUND: ${LIBGPIODV2_FOUND}")
message(STATUS "LIBGPIOD_FOUND: ${LIBGPIOD_FOUND}")
message(STATUS "----------------------")
endif()

Expand Down Expand Up @@ -406,7 +430,9 @@ endif()

if(HAVE_LINUXGPIO)
message(STATUS "ENABLED linuxgpio")
if (HAVE_LIBGPIOD)
if (LIBGPIODV2_FOUND)
message(STATUS "DO HAVE libgpiod (v2.x)")
elseif(LIBGPIOD_FOUND)
message(STATUS "DO HAVE libgpiod")
else()
message(STATUS "DON'T HAVE libgpiod")
Expand All @@ -423,5 +449,4 @@ endif()

message(STATUS "----------------------")

add_subdirectory(interface)
add_subdirectory(test)
add_subdirectory(test)
33 changes: 30 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ Changes since version 7.3:
* New programmers supported:

* Issues fixed:
- Avrintel.h missing from installation #1683
- Avrintel.h missing from installation #1683
- Use of undeclared identifier 'AVRDUDE_FULL_VERSION' #1706
- Wrong message level in jtag3_prmsg() #1726
- Old avrdude_message() can go away #1719
- avr_{read,write}_mem fail to initialize progress reporting #1718
- avr*timestamp() oddities #1722
- -F option not honored bug #1740
- "jtag2 is not a unique start of a programmer name" #1739

* Pull requests:
- Remove 32bit MSYS2 mingw32 and clang32 build #1687
Expand All @@ -27,6 +34,26 @@ Changes since version 7.3:
- Allow slash in part variant name for -p #1702
- Fix reporting of read/write times for files with holes #1700
- Change port array in PROGRAMMER to be const char * #1699
- Fix cmake build errors related to ac_cfg.h #1707
- Add benchmark option -b for test-avrdude #1709
- Replace msg_info() by msg_debug() in jtag3_prmsg()
and jtag3_prevent() #1727
- Remove unused avrdude_message() #1730
- Add lmsg_xyz() functions to start message at left margin #1728
- Document progress reporting in source code #1724
- Change type for avr_(ms|us)timestamp() to uint64_t #1729
- Use Static Libs for macOS arduino_packing build #1731
- Add arduino_packing_release github action #1690
- Fix message levels in jtag3_print_data() #1741
- Consult -F option when signature cannot be read #1745
- Check all programmer ids for exact match #1746
- Update avrintel files #1747
- Add buspirate hiz and pullups feature #1733
- Add support for libgpiod v2+ API #1725
- Remove deprecated ucr2 part #1749
- Move static variables to PDATA region in programmer code
#1750


* Internals:

Expand Down Expand Up @@ -1664,7 +1691,7 @@ Version 4.1.0
* Add support for avr910 type programmers (mcu00100, pavr avr910, etc).

* Support new devices: ATmega8535, ATtiny26


Version 4.0.0

Expand Down Expand Up @@ -1893,4 +1920,4 @@ Version 1.3.0 :

Version 1.2.2 :

* Initial public release.
* Initial public release.
10 changes: 0 additions & 10 deletions interface/CMakeLists.txt

This file was deleted.

26 changes: 0 additions & 26 deletions interface/developer_opts.h

This file was deleted.

Loading

0 comments on commit d3c9864

Please sign in to comment.